aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-23 11:25:20 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-30 16:54:39 -0400
commitc49f91f51e3cca796494f69fd967a7f72df5d457 (patch)
treee61f4835373a274af951782dd5f314031b2c8e38 /arch/mips/txx9/generic/setup.c
parentf6727fb889c664be094fa041a0fdf0f1a1caefb6 (diff)
[MIPS] TXx9: Make tx4938-specific code more independent
Make some TX4938 SoC specific code independent from board specific code. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r--arch/mips/txx9/generic/setup.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 7b5705d18deb..b136c6692a5f 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -220,6 +220,33 @@ void __init txx9_wdt_init(unsigned long base)
220 platform_device_register_simple("txx9wdt", -1, &res, 1); 220 platform_device_register_simple("txx9wdt", -1, &res, 1);
221} 221}
222 222
223/* SPI support */
224void __init txx9_spi_init(int busid, unsigned long base, int irq)
225{
226 struct resource res[] = {
227 {
228 .start = base,
229 .end = base + 0x20 - 1,
230 .flags = IORESOURCE_MEM,
231 }, {
232 .start = irq,
233 .flags = IORESOURCE_IRQ,
234 },
235 };
236 platform_device_register_simple("spi_txx9", busid,
237 res, ARRAY_SIZE(res));
238}
239
240void __init txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr)
241{
242 struct platform_device *pdev =
243 platform_device_alloc("tc35815-mac", id);
244 if (!pdev ||
245 platform_device_add_data(pdev, ethaddr, 6) ||
246 platform_device_add(pdev))
247 platform_device_put(pdev);
248}
249
223/* wrappers */ 250/* wrappers */
224void __init plat_mem_setup(void) 251void __init plat_mem_setup(void)
225{ 252{