diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-24 00:25:20 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 21:54:39 +0100 |
commit | c49f91f51e3cca796494f69fd967a7f72df5d457 (patch) | |
tree | e61f4835373a274af951782dd5f314031b2c8e38 /arch/mips/txx9/rbtx4938/setup.c | |
parent | f6727fb889c664be094fa041a0fdf0f1a1caefb6 (diff) | |
download | op-kernel-dev-c49f91f51e3cca796494f69fd967a7f72df5d457.zip op-kernel-dev-c49f91f51e3cca796494f69fd967a7f72df5d457.tar.gz |
[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/rbtx4938/setup.c')
-rw-r--r-- | arch/mips/txx9/rbtx4938/setup.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c index ff5fda2..3324a70 100644 --- a/arch/mips/txx9/rbtx4938/setup.c +++ b/arch/mips/txx9/rbtx4938/setup.c @@ -132,19 +132,7 @@ static int __init rbtx4938_ethaddr_init(void) if (sum) printk(KERN_WARNING "seeprom: bad checksum.\n"); } - for (i = 0; i < 2; i++) { - unsigned int id = - TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0); - struct platform_device *pdev; - if (!(__raw_readq(&tx4938_ccfgptr->pcfg) & - (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL))) - continue; - pdev = platform_device_alloc("tc35815-mac", id); - if (!pdev || - platform_device_add_data(pdev, &dat[4 + 6 * i], 6) || - platform_device_add(pdev)) - platform_device_put(pdev); - } + tx4938_ethaddr_init(&dat[4], &dat[4 + 6]); #endif /* CONFIG_PCI */ return 0; } @@ -301,24 +289,6 @@ static struct gpio_chip rbtx4938_spi_gpio_chip = { .ngpio = 3, }; -/* SPI support */ - -static void __init txx9_spi_init(unsigned long base, int irq) -{ - struct resource res[] = { - { - .start = base, - .end = base + 0x20 - 1, - .flags = IORESOURCE_MEM, - }, { - .start = irq, - .flags = IORESOURCE_IRQ, - }, - }; - platform_device_register_simple("spi_txx9", 0, - res, ARRAY_SIZE(res)); -} - static int __init rbtx4938_spi_init(void) { struct spi_board_info srtc_info = { @@ -341,7 +311,7 @@ static int __init rbtx4938_spi_init(void) gpio_direction_output(16 + SEEPROM2_CS, 1); gpio_request(16 + SEEPROM3_CS, "seeprom3"); gpio_direction_output(16 + SEEPROM3_CS, 1); - txx9_spi_init(TX4938_SPI_REG & 0xfffffffffULL, RBTX4938_IRQ_IRC_SPI); + tx4938_spi_init(0); return 0; } |