aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-04-06 13:17:21 -0400
committerSekhar Nori <nsekhar@ti.com>2011-04-25 04:49:31 -0400
commit9e7d24f622fc57ff5d58af3d44ba503430148354 (patch)
tree273aaa2f01dcd6ba946a9b7735c0e99eae42d5d6 /arch/arm
parent336f402790defe4c4d33838b41bcd239537a5431 (diff)
DA830: fix SPI1 base address
Commit 54ce6883d29630ff334bee4256a25e3f8719a181 (davinci: da8xx: add spi resources and registration routine) wrongly assumed that SPI1 is mapped at the same address on DA830/OMAP-L137 and DA850/OMAP-L138; actually, the base address was valid only for the latter SoC. Teach the code to pass the correct SPI1 memory resource for both SoCs... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 625d4b66718b..58a02dc7b15a 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -39,7 +39,8 @@
39#define DA8XX_GPIO_BASE 0x01e26000 39#define DA8XX_GPIO_BASE 0x01e26000
40#define DA8XX_I2C1_BASE 0x01e28000 40#define DA8XX_I2C1_BASE 0x01e28000
41#define DA8XX_SPI0_BASE 0x01c41000 41#define DA8XX_SPI0_BASE 0x01c41000
42#define DA8XX_SPI1_BASE 0x01f0e000 42#define DA830_SPI1_BASE 0x01e12000
43#define DA850_SPI1_BASE 0x01f0e000
43 44
44#define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 45#define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000
45#define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 46#define DA8XX_EMAC_MOD_REG_OFFSET 0x2000
@@ -762,8 +763,8 @@ static struct resource da8xx_spi0_resources[] = {
762 763
763static struct resource da8xx_spi1_resources[] = { 764static struct resource da8xx_spi1_resources[] = {
764 [0] = { 765 [0] = {
765 .start = DA8XX_SPI1_BASE, 766 .start = DA830_SPI1_BASE,
766 .end = DA8XX_SPI1_BASE + SZ_4K - 1, 767 .end = DA830_SPI1_BASE + SZ_4K - 1,
767 .flags = IORESOURCE_MEM, 768 .flags = IORESOURCE_MEM,
768 }, 769 },
769 [1] = { 770 [1] = {
@@ -832,5 +833,10 @@ int __init da8xx_register_spi(int instance, struct spi_board_info *info,
832 833
833 da8xx_spi_pdata[instance].num_chipselect = len; 834 da8xx_spi_pdata[instance].num_chipselect = len;
834 835
836 if (instance == 1 && cpu_is_davinci_da850()) {
837 da8xx_spi1_resources[0].start = DA850_SPI1_BASE;
838 da8xx_spi1_resources[0].end = DA850_SPI1_BASE + SZ_4K - 1;
839 }
840
835 return platform_device_register(&da8xx_spi_device[instance]); 841 return platform_device_register(&da8xx_spi_device[instance]);
836} 842}