diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2011-02-25 02:39:10 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-10 22:36:28 -0500 |
commit | d0371667d1393ec6655fa3bdd6e6008cfdea528c (patch) | |
tree | 42879fc3079a5c24d9803657e953d1a2abe211cf /arch/sh/kernel/cpu | |
parent | 0fe48601d819c838c04121bc8d6fffa3a7aaf8e3 (diff) |
sh: add platform_device for SPI
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 9c1de2633ac3..480f6651164f 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -124,12 +124,36 @@ static struct platform_device tmu1_device = { | |||
124 | .num_resources = ARRAY_SIZE(tmu1_resources), | 124 | .num_resources = ARRAY_SIZE(tmu1_resources), |
125 | }; | 125 | }; |
126 | 126 | ||
127 | static struct resource spi0_resources[] = { | ||
128 | [0] = { | ||
129 | .start = 0xfe002000, | ||
130 | .end = 0xfe0020ff, | ||
131 | .flags = IORESOURCE_MEM, | ||
132 | }, | ||
133 | [1] = { | ||
134 | .start = 86, | ||
135 | .flags = IORESOURCE_IRQ, | ||
136 | }, | ||
137 | }; | ||
138 | |||
139 | static struct platform_device spi0_device = { | ||
140 | .name = "sh_spi", | ||
141 | .id = 0, | ||
142 | .dev = { | ||
143 | .dma_mask = NULL, | ||
144 | .coherent_dma_mask = 0xffffffff, | ||
145 | }, | ||
146 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
147 | .resource = spi0_resources, | ||
148 | }; | ||
149 | |||
127 | static struct platform_device *sh7757_devices[] __initdata = { | 150 | static struct platform_device *sh7757_devices[] __initdata = { |
128 | &scif2_device, | 151 | &scif2_device, |
129 | &scif3_device, | 152 | &scif3_device, |
130 | &scif4_device, | 153 | &scif4_device, |
131 | &tmu0_device, | 154 | &tmu0_device, |
132 | &tmu1_device, | 155 | &tmu1_device, |
156 | &spi0_device, | ||
133 | }; | 157 | }; |
134 | 158 | ||
135 | static int __init sh7757_devices_setup(void) | 159 | static int __init sh7757_devices_setup(void) |