mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
ARM: Samsung: Remove the MIPI PHY setup code
Generic PHY drivers are used to handle the MIPI CSIS and MIPI DSIM DPHYs so we can remove now unused code at arch/arm/plat-samsung. In case there is any board file for S5PV210 platforms using MIPI CSIS/DSIM (not any upstream currently) it should use the generic PHY API to bind the PHYs to respective PHY consumer drivers and a platform device for the PHY provider should be defined. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7e0be9f9f7
commit
e66f233dc7
5 changed files with 0 additions and 75 deletions
|
@ -44,11 +44,6 @@
|
||||||
#define S5P_DAC_PHY_CONTROL S5P_PMUREG(0x070C)
|
#define S5P_DAC_PHY_CONTROL S5P_PMUREG(0x070C)
|
||||||
#define S5P_DAC_PHY_ENABLE (1 << 0)
|
#define S5P_DAC_PHY_ENABLE (1 << 0)
|
||||||
|
|
||||||
#define S5P_MIPI_DPHY_CONTROL(n) S5P_PMUREG(0x0710 + (n) * 4)
|
|
||||||
#define S5P_MIPI_DPHY_ENABLE (1 << 0)
|
|
||||||
#define S5P_MIPI_DPHY_SRESETN (1 << 1)
|
|
||||||
#define S5P_MIPI_DPHY_MRESETN (1 << 2)
|
|
||||||
|
|
||||||
#define S5P_INFORM0 S5P_PMUREG(0x0800)
|
#define S5P_INFORM0 S5P_PMUREG(0x0800)
|
||||||
#define S5P_INFORM1 S5P_PMUREG(0x0804)
|
#define S5P_INFORM1 S5P_PMUREG(0x0804)
|
||||||
#define S5P_INFORM2 S5P_PMUREG(0x0808)
|
#define S5P_INFORM2 S5P_PMUREG(0x0808)
|
||||||
|
|
|
@ -147,10 +147,6 @@
|
||||||
#define S5P_HDMI_PHY_CONTROL S5P_CLKREG(0xE804)
|
#define S5P_HDMI_PHY_CONTROL S5P_CLKREG(0xE804)
|
||||||
#define S5P_USB_PHY_CONTROL S5P_CLKREG(0xE80C)
|
#define S5P_USB_PHY_CONTROL S5P_CLKREG(0xE80C)
|
||||||
#define S5P_DAC_PHY_CONTROL S5P_CLKREG(0xE810)
|
#define S5P_DAC_PHY_CONTROL S5P_CLKREG(0xE810)
|
||||||
#define S5P_MIPI_DPHY_CONTROL(x) S5P_CLKREG(0xE814)
|
|
||||||
#define S5P_MIPI_DPHY_ENABLE (1 << 0)
|
|
||||||
#define S5P_MIPI_DPHY_SRESETN (1 << 1)
|
|
||||||
#define S5P_MIPI_DPHY_MRESETN (1 << 2)
|
|
||||||
|
|
||||||
#define S5P_INFORM0 S5P_CLKREG(0xF000)
|
#define S5P_INFORM0 S5P_CLKREG(0xF000)
|
||||||
#define S5P_INFORM1 S5P_CLKREG(0xF004)
|
#define S5P_INFORM1 S5P_CLKREG(0xF004)
|
||||||
|
|
|
@ -390,11 +390,6 @@ config S3C24XX_PWM
|
||||||
Support for exporting the PWM timer blocks via the pwm device
|
Support for exporting the PWM timer blocks via the pwm device
|
||||||
system
|
system
|
||||||
|
|
||||||
config S5P_SETUP_MIPIPHY
|
|
||||||
bool
|
|
||||||
help
|
|
||||||
Compile in common setup code for MIPI-CSIS and MIPI-DSIM devices
|
|
||||||
|
|
||||||
config S3C_SETUP_CAMIF
|
config S3C_SETUP_CAMIF
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
|
|
|
@ -38,7 +38,6 @@ obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
|
||||||
obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o
|
obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o
|
||||||
|
|
||||||
obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o
|
obj-$(CONFIG_S3C_SETUP_CAMIF) += setup-camif.o
|
||||||
obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o
|
|
||||||
|
|
||||||
# DMA support
|
# DMA support
|
||||||
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2011 Samsung Electronics Co., Ltd.
|
|
||||||
*
|
|
||||||
* S5P - Helper functions for MIPI-CSIS and MIPI-DSIM D-PHY control
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/export.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/platform_device.h>
|
|
||||||
#include <linux/io.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <mach/regs-clock.h>
|
|
||||||
|
|
||||||
static int __s5p_mipi_phy_control(int id, bool on, u32 reset)
|
|
||||||
{
|
|
||||||
static DEFINE_SPINLOCK(lock);
|
|
||||||
void __iomem *addr;
|
|
||||||
unsigned long flags;
|
|
||||||
u32 cfg;
|
|
||||||
|
|
||||||
id = max(0, id);
|
|
||||||
if (id > 1)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
addr = S5P_MIPI_DPHY_CONTROL(id);
|
|
||||||
|
|
||||||
spin_lock_irqsave(&lock, flags);
|
|
||||||
|
|
||||||
cfg = __raw_readl(addr);
|
|
||||||
cfg = on ? (cfg | reset) : (cfg & ~reset);
|
|
||||||
__raw_writel(cfg, addr);
|
|
||||||
|
|
||||||
if (on) {
|
|
||||||
cfg |= S5P_MIPI_DPHY_ENABLE;
|
|
||||||
} else if (!(cfg & (S5P_MIPI_DPHY_SRESETN |
|
|
||||||
S5P_MIPI_DPHY_MRESETN) & ~reset)) {
|
|
||||||
cfg &= ~S5P_MIPI_DPHY_ENABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
__raw_writel(cfg, addr);
|
|
||||||
spin_unlock_irqrestore(&lock, flags);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int s5p_csis_phy_enable(int id, bool on)
|
|
||||||
{
|
|
||||||
return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(s5p_csis_phy_enable);
|
|
||||||
|
|
||||||
int s5p_dsim_phy_enable(struct platform_device *pdev, bool on)
|
|
||||||
{
|
|
||||||
return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(s5p_dsim_phy_enable);
|
|
Loading…
Reference in a new issue