diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-09-16 07:59:53 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-10-14 22:05:42 -0400 |
commit | e69dc9a91eeb0387e08d8e1d0e576c88b28902fc (patch) | |
tree | 4b4ef12b66ae33e79b77528f7e9568a62743f43a /arch | |
parent | 7f917a8df68985aa38a90b7110b5f42bfa0d7cda (diff) |
video: imxfb: remove cpu_is_xxx by using platform_device_id
It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.
As the result, mach/hardware.h inclusion gets removed from the driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/clk-imx1.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx21.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx25.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx27.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/devices-common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/platform-imx-fb.c | 11 |
6 files changed, 19 insertions, 17 deletions
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index 49a74440bc48..796d8b86e8b6 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c | |||
@@ -102,9 +102,9 @@ int __init mx1_clocks_init(unsigned long fref) | |||
102 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); | 102 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); |
103 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); | 103 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); |
104 | clk_register_clkdev(clk[per2], NULL, "imx-mmc.0"); | 104 | clk_register_clkdev(clk[per2], NULL, "imx-mmc.0"); |
105 | clk_register_clkdev(clk[per2], "per", "imx-fb.0"); | 105 | clk_register_clkdev(clk[per2], "per", "imx1-fb.0"); |
106 | clk_register_clkdev(clk[dummy], "ipg", "imx-fb.0"); | 106 | clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0"); |
107 | clk_register_clkdev(clk[dummy], "ahb", "imx-fb.0"); | 107 | clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0"); |
108 | clk_register_clkdev(clk[hclk], "mshc", NULL); | 108 | clk_register_clkdev(clk[hclk], "mshc", NULL); |
109 | clk_register_clkdev(clk[per3], "ssi", NULL); | 109 | clk_register_clkdev(clk[per3], "ssi", NULL); |
110 | clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0"); | 110 | clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0"); |
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c index 8aec572f84fe..fcdaa9b9cec7 100644 --- a/arch/arm/mach-imx/clk-imx21.c +++ b/arch/arm/mach-imx/clk-imx21.c | |||
@@ -157,9 +157,9 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) | |||
157 | clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1"); | 157 | clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1"); |
158 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.2"); | 158 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.2"); |
159 | clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2"); | 159 | clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2"); |
160 | clk_register_clkdev(clk[per3], "per", "imx-fb.0"); | 160 | clk_register_clkdev(clk[per3], "per", "imx21-fb.0"); |
161 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); | 161 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); |
162 | clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx-fb.0"); | 162 | clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0"); |
163 | clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0"); | 163 | clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0"); |
164 | clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0"); | 164 | clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0"); |
165 | clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0"); | 165 | clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0"); |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index 2add1ea22d44..08d98030e02f 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -219,9 +219,9 @@ int __init mx25_clocks_init(void) | |||
219 | clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); | 219 | clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); |
220 | clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); | 220 | clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); |
221 | clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); | 221 | clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); |
222 | clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx-fb.0"); | 222 | clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0"); |
223 | clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0"); | 223 | clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0"); |
224 | clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0"); | 224 | clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0"); |
225 | clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); | 225 | clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); |
226 | clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0"); | 226 | clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0"); |
227 | clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1"); | 227 | clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1"); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 46764d864232..4204092ab64a 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -221,9 +221,9 @@ int __init mx27_clocks_init(unsigned long fref) | |||
221 | clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0"); | 221 | clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0"); |
222 | clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1"); | 222 | clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1"); |
223 | clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2"); | 223 | clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2"); |
224 | clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0"); | 224 | clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0"); |
225 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); | 225 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); |
226 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0"); | 226 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); |
227 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | 227 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); |
228 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 228 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); |
229 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 229 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); |
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 4caf1c61e350..e4b790b9e2aa 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -108,6 +108,7 @@ struct platform_device *__init imx_add_imxdi_rtc( | |||
108 | 108 | ||
109 | #include <linux/platform_data/video-imxfb.h> | 109 | #include <linux/platform_data/video-imxfb.h> |
110 | struct imx_imx_fb_data { | 110 | struct imx_imx_fb_data { |
111 | const char *devid; | ||
111 | resource_size_t iobase; | 112 | resource_size_t iobase; |
112 | resource_size_t iosize; | 113 | resource_size_t iosize; |
113 | resource_size_t irq; | 114 | resource_size_t irq; |
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c index 4e6f85703918..abea28bea282 100644 --- a/arch/arm/mach-imx/devices/platform-imx-fb.c +++ b/arch/arm/mach-imx/devices/platform-imx-fb.c | |||
@@ -10,8 +10,9 @@ | |||
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include "devices-common.h" | 11 | #include "devices-common.h" |
12 | 12 | ||
13 | #define imx_imx_fb_data_entry_single(soc, _size) \ | 13 | #define imx_imx_fb_data_entry_single(soc, _devid, _size) \ |
14 | { \ | 14 | { \ |
15 | .devid = _devid, \ | ||
15 | .iobase = soc ## _LCDC_BASE_ADDR, \ | 16 | .iobase = soc ## _LCDC_BASE_ADDR, \ |
16 | .iosize = _size, \ | 17 | .iosize = _size, \ |
17 | .irq = soc ## _INT_LCDC, \ | 18 | .irq = soc ## _INT_LCDC, \ |
@@ -19,22 +20,22 @@ | |||
19 | 20 | ||
20 | #ifdef CONFIG_SOC_IMX1 | 21 | #ifdef CONFIG_SOC_IMX1 |
21 | const struct imx_imx_fb_data imx1_imx_fb_data __initconst = | 22 | const struct imx_imx_fb_data imx1_imx_fb_data __initconst = |
22 | imx_imx_fb_data_entry_single(MX1, SZ_4K); | 23 | imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K); |
23 | #endif /* ifdef CONFIG_SOC_IMX1 */ | 24 | #endif /* ifdef CONFIG_SOC_IMX1 */ |
24 | 25 | ||
25 | #ifdef CONFIG_SOC_IMX21 | 26 | #ifdef CONFIG_SOC_IMX21 |
26 | const struct imx_imx_fb_data imx21_imx_fb_data __initconst = | 27 | const struct imx_imx_fb_data imx21_imx_fb_data __initconst = |
27 | imx_imx_fb_data_entry_single(MX21, SZ_4K); | 28 | imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K); |
28 | #endif /* ifdef CONFIG_SOC_IMX21 */ | 29 | #endif /* ifdef CONFIG_SOC_IMX21 */ |
29 | 30 | ||
30 | #ifdef CONFIG_SOC_IMX25 | 31 | #ifdef CONFIG_SOC_IMX25 |
31 | const struct imx_imx_fb_data imx25_imx_fb_data __initconst = | 32 | const struct imx_imx_fb_data imx25_imx_fb_data __initconst = |
32 | imx_imx_fb_data_entry_single(MX25, SZ_16K); | 33 | imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K); |
33 | #endif /* ifdef CONFIG_SOC_IMX25 */ | 34 | #endif /* ifdef CONFIG_SOC_IMX25 */ |
34 | 35 | ||
35 | #ifdef CONFIG_SOC_IMX27 | 36 | #ifdef CONFIG_SOC_IMX27 |
36 | const struct imx_imx_fb_data imx27_imx_fb_data __initconst = | 37 | const struct imx_imx_fb_data imx27_imx_fb_data __initconst = |
37 | imx_imx_fb_data_entry_single(MX27, SZ_4K); | 38 | imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K); |
38 | #endif /* ifdef CONFIG_SOC_IMX27 */ | 39 | #endif /* ifdef CONFIG_SOC_IMX27 */ |
39 | 40 | ||
40 | struct platform_device *__init imx_add_imx_fb( | 41 | struct platform_device *__init imx_add_imx_fb( |