nuke obsolete kernel stuff
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / files / arch / mips / ar71xx / mach-pb42.c
1 /*
2 * Atheros PB42 board support
3 *
4 * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
10 */
11
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/spi/spi.h>
15 #include <linux/spi/flash.h>
16
17 #include <asm/mips_machine.h>
18 #include <asm/mach-ar71xx/ar71xx.h>
19 #include <asm/mach-ar71xx/pci.h>
20
21 #include "devices.h"
22
23 static struct spi_board_info pb42_spi_info[] = {
24 {
25 .bus_num = 0,
26 .chip_select = 0,
27 .max_speed_hz = 25000000,
28 .modalias = "m25p80",
29 }
30 };
31
32 static struct ar71xx_pci_irq pb42_pci_irqs[] __initdata = {
33 {
34 .slot = 0,
35 .pin = 1,
36 .irq = AR71XX_PCI_IRQ_DEV0,
37 }, {
38 .slot = 1,
39 .pin = 1,
40 .irq = AR71XX_PCI_IRQ_DEV1,
41 }, {
42 .slot = 2,
43 .pin = 1,
44 .irq = AR71XX_PCI_IRQ_DEV2,
45 }
46 };
47
48 static void __init pb42_init(void)
49 {
50 ar71xx_add_device_spi(NULL, pb42_spi_info,
51 ARRAY_SIZE(pb42_spi_info));
52
53 ar71xx_add_device_mdio(0xffe0ffff);
54
55 ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
56 ar71xx_eth0_data.phy_mask = 0x000f0000;
57
58 ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
59 ar71xx_eth1_data.phy_mask = 0x00100000;
60
61 ar71xx_add_device_eth(0);
62 ar71xx_add_device_eth(1);
63
64 ar71xx_add_device_usb();
65
66 ar71xx_pci_init(ARRAY_SIZE(pb42_pci_irqs), pb42_pci_irqs);
67 }
68
69 MIPS_MACHINE(AR71XX_MACH_PB42, "Atheros PB42", pb42_init);