aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-09-09 15:02:02 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-01 03:32:14 -0400
commitab5605037c119f1bde0f01786ede16d0ea5dcd8a (patch)
treeaa322bc687a516657ac806eddd768b2e12b6cbef /arch
parent0b599603d8534bc3946a0f07e461c76d7947dfcf (diff)
ARM: imx: use platform ids for spi_imx devices
The driver recently learned to handle platform ids. Make use of this new feature. The up side is that the driver needs less knowledge about the spi interfaces used on different SoCs. Acked-by: Jason Wang <jason77.wang@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/clock-imx1.c2
-rw-r--r--arch/arm/mach-imx/clock-imx21.c6
-rw-r--r--arch/arm/mach-imx/clock-imx27.c6
-rw-r--r--arch/arm/mach-mx25/clock.c6
-rw-r--r--arch/arm/mach-mx3/clock-imx31.c6
-rw-r--r--arch/arm/mach-mx3/clock-imx35.c4
-rw-r--r--arch/arm/plat-mxc/devices/platform-spi_imx.c3
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h1
8 files changed, 18 insertions, 16 deletions
diff --git a/arch/arm/mach-imx/clock-imx1.c b/arch/arm/mach-imx/clock-imx1.c
index c05096c38301..daca30b2d5b1 100644
--- a/arch/arm/mach-imx/clock-imx1.c
+++ b/arch/arm/mach-imx/clock-imx1.c
@@ -592,7 +592,7 @@ static struct clk_lookup lookups[] __initdata = {
592 _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) 592 _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk)
593 _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) 593 _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk)
594 _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) 594 _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
595 _REGISTER_CLOCK("spi_imx.0", NULL, spi_clk) 595 _REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk)
596 _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk) 596 _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk)
597 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) 597 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
598 _REGISTER_CLOCK(NULL, "mshc", mshc_clk) 598 _REGISTER_CLOCK(NULL, "mshc", mshc_clk)
diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c
index bb419ef4d133..cf15ea516a72 100644
--- a/arch/arm/mach-imx/clock-imx21.c
+++ b/arch/arm/mach-imx/clock-imx21.c
@@ -1172,9 +1172,9 @@ static struct clk_lookup lookups[] = {
1172 _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0]) 1172 _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0])
1173 _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0]) 1173 _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0])
1174 _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1]) 1174 _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1])
1175 _REGISTER_CLOCK(NULL, "cspi1", cspi_clk[0]) 1175 _REGISTER_CLOCK("imx21-cspi.0", NULL, cspi_clk[0])
1176 _REGISTER_CLOCK(NULL, "cspi2", cspi_clk[1]) 1176 _REGISTER_CLOCK("imx21-cspi.1", NULL, cspi_clk[1])
1177 _REGISTER_CLOCK(NULL, "cspi3", cspi_clk[2]) 1177 _REGISTER_CLOCK("imx21-cspi.2", NULL, cspi_clk[2])
1178 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) 1178 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0])
1179 _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) 1179 _REGISTER_CLOCK(NULL, "csi", csi_clk[0])
1180 _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) 1180 _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0])
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
index 5a1aa15c8a16..07bf315bc078 100644
--- a/arch/arm/mach-imx/clock-imx27.c
+++ b/arch/arm/mach-imx/clock-imx27.c
@@ -640,9 +640,9 @@ static struct clk_lookup lookups[] = {
640 _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) 640 _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
641 _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) 641 _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
642 _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) 642 _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk)
643 _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) 643 _REGISTER_CLOCK("imx27-cspi.0", NULL, cspi1_clk)
644 _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) 644 _REGISTER_CLOCK("imx27-cspi.1", NULL, cspi2_clk)
645 _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) 645 _REGISTER_CLOCK("imx27-cspi.2", NULL, cspi3_clk)
646 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) 646 _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
647 _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) 647 _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk)
648 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) 648 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk)
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c
index 40c7cc41cee3..039464a8dacc 100644
--- a/arch/arm/mach-mx25/clock.c
+++ b/arch/arm/mach-mx25/clock.c
@@ -261,9 +261,9 @@ static struct clk_lookup lookups[] = {
261 _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) 261 _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk)
262 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) 262 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk)
263 _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) 263 _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
264 _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) 264 _REGISTER_CLOCK("imx25-cspi.0", NULL, cspi1_clk)
265 _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) 265 _REGISTER_CLOCK("imx25-cspi.1", NULL, cspi2_clk)
266 _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) 266 _REGISTER_CLOCK("imx25-cspi.2", NULL, cspi3_clk)
267 _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk) 267 _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk)
268 _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) 268 _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk)
269 _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) 269 _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk)
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c
index 9a9eb6de6127..18e98f1d4de0 100644
--- a/arch/arm/mach-mx3/clock-imx31.c
+++ b/arch/arm/mach-mx3/clock-imx31.c
@@ -525,9 +525,9 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk);
525 525
526static struct clk_lookup lookups[] = { 526static struct clk_lookup lookups[] = {
527 _REGISTER_CLOCK(NULL, "emi", emi_clk) 527 _REGISTER_CLOCK(NULL, "emi", emi_clk)
528 _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) 528 _REGISTER_CLOCK("imx31-cspi.0", NULL, cspi1_clk)
529 _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) 529 _REGISTER_CLOCK("imx31-cspi.1", NULL, cspi2_clk)
530 _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) 530 _REGISTER_CLOCK("imx31-cspi.2", NULL, cspi3_clk)
531 _REGISTER_CLOCK(NULL, "gpt", gpt_clk) 531 _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
532 _REGISTER_CLOCK(NULL, "pwm", pwm_clk) 532 _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
533 _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) 533 _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index f11ef990120c..708c2b36cf06 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -451,8 +451,8 @@ static struct clk_lookup lookups[] = {
451 _REGISTER_CLOCK(NULL, "ata", ata_clk) 451 _REGISTER_CLOCK(NULL, "ata", ata_clk)
452 _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) 452 _REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
453 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) 453 _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
454 _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) 454 _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk)
455 _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) 455 _REGISTER_CLOCK("imx35-cspi.1", NULL, cspi2_clk)
456 _REGISTER_CLOCK(NULL, "ect", ect_clk) 456 _REGISTER_CLOCK(NULL, "ect", ect_clk)
457 _REGISTER_CLOCK(NULL, "edio", edio_clk) 457 _REGISTER_CLOCK(NULL, "edio", edio_clk)
458 _REGISTER_CLOCK(NULL, "emi", emi_clk) 458 _REGISTER_CLOCK(NULL, "emi", emi_clk)
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c
index 412a81f24101..bd30d4b2b2f9 100644
--- a/arch/arm/plat-mxc/devices/platform-spi_imx.c
+++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c
@@ -11,6 +11,7 @@
11 11
12#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \ 12#define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \
13 { \ 13 { \
14 .devid = _devid, \
14 .id = _id, \ 15 .id = _id, \
15 .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR, \ 16 .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR, \
16 .iosize = _size, \ 17 .iosize = _size, \
@@ -83,6 +84,6 @@ struct platform_device *__init imx_add_spi_imx(
83 }, 84 },
84 }; 85 };
85 86
86 return imx_add_platform_device("spi_imx", data->id, 87 return imx_add_platform_device(data->devid, data->id,
87 res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); 88 res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
88} 89}
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 490fe7c3ed5f..32b8f3674cc9 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -77,6 +77,7 @@ struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase,
77 77
78#include <mach/spi.h> 78#include <mach/spi.h>
79struct imx_spi_imx_data { 79struct imx_spi_imx_data {
80 const char *devid;
80 int id; 81 int id;
81 resource_size_t iobase; 82 resource_size_t iobase;
82 resource_size_t iosize; 83 resource_size_t iosize;