diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-08-29 00:59:34 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2008-09-25 16:27:21 -0400 |
commit | 0b0740c3c120d1fd7b9a04f04ab79bee12c4cc38 (patch) | |
tree | 97f4d28666147d17dddd5e880bb043cddfa936b2 /arch/arm/mach-orion5x | |
parent | d323ade13b959dfcf14bf18902b600c5cc711dea (diff) |
[ARM] Orion: add RD88F6183AP-GE support
The RD88F6183AP-GE is an access point reference design for the
88F6183 SoC, with a 88E6161 six-port gigabit ethernet switch with
five PHYs (providing 1 WAN and 4 LAN ports and an interface to the
CPU), and a mini-PCIe slot for a wireless card.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 117 |
3 files changed, 124 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index c738f450f936..c0ecf22ae819 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -105,6 +105,12 @@ config MACH_RD88F5181L_FXO | |||
105 | Say 'Y' here if you want your kernel to support the | 105 | Say 'Y' here if you want your kernel to support the |
106 | Marvell Orion-VoIP FXO (88F5181L) RD. | 106 | Marvell Orion-VoIP FXO (88F5181L) RD. |
107 | 107 | ||
108 | config MACH_RD88F6183AP_GE | ||
109 | bool "Marvell Orion-1-90 AP GE Reference Design" | ||
110 | help | ||
111 | Say 'Y' here if you want your kernel to support the | ||
112 | Marvell Orion-1-90 (88F6183) AP GE RD. | ||
113 | |||
108 | endmenu | 114 | endmenu |
109 | 115 | ||
110 | endif | 116 | endif |
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 39e41a6b61e1..30681ed4c751 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile | |||
@@ -15,3 +15,4 @@ obj-$(CONFIG_MACH_MSS2) += mss2-setup.o | |||
15 | obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o | 15 | obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o |
16 | obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o | 16 | obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o |
17 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o | 17 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o |
18 | obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o | ||
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c new file mode 100644 index 000000000000..40e049539091 --- /dev/null +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/rd88f6183-ap-ge-setup.c | ||
3 | * | ||
4 | * Marvell Orion-1-90 AP GE Reference Design Setup | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/spi/spi.h> | ||
19 | #include <linux/spi/orion_spi.h> | ||
20 | #include <linux/spi/flash.h> | ||
21 | #include <linux/ethtool.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/gpio.h> | ||
24 | #include <asm/leds.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/pci.h> | ||
27 | #include <mach/orion5x.h> | ||
28 | #include "common.h" | ||
29 | #include "mpp.h" | ||
30 | |||
31 | static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { | ||
32 | .phy_addr = -1, | ||
33 | .speed = SPEED_1000, | ||
34 | .duplex = DUPLEX_FULL, | ||
35 | }; | ||
36 | |||
37 | static struct mtd_partition rd88f6183ap_ge_partitions[] = { | ||
38 | { | ||
39 | .name = "kernel", | ||
40 | .offset = 0x00000000, | ||
41 | .size = 0x00200000, | ||
42 | }, { | ||
43 | .name = "rootfs", | ||
44 | .offset = 0x00200000, | ||
45 | .size = 0x00500000, | ||
46 | }, { | ||
47 | .name = "nvram", | ||
48 | .offset = 0x00700000, | ||
49 | .size = 0x00080000, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = { | ||
54 | .type = "m25p64", | ||
55 | .nr_parts = ARRAY_SIZE(rd88f6183ap_ge_partitions), | ||
56 | .parts = rd88f6183ap_ge_partitions, | ||
57 | }; | ||
58 | |||
59 | static struct spi_board_info __initdata rd88f6183ap_ge_spi_slave_info[] = { | ||
60 | { | ||
61 | .modalias = "m25p80", | ||
62 | .platform_data = &rd88f6183ap_ge_spi_slave_data, | ||
63 | .irq = NO_IRQ, | ||
64 | .max_speed_hz = 20000000, | ||
65 | .bus_num = 0, | ||
66 | .chip_select = 0, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static void __init rd88f6183ap_ge_init(void) | ||
71 | { | ||
72 | /* | ||
73 | * Setup basic Orion functions. Need to be called early. | ||
74 | */ | ||
75 | orion5x_init(); | ||
76 | |||
77 | /* | ||
78 | * Configure peripherals. | ||
79 | */ | ||
80 | orion5x_ehci0_init(); | ||
81 | orion5x_eth_init(&rd88f6183ap_ge_eth_data); | ||
82 | spi_register_board_info(rd88f6183ap_ge_spi_slave_info, | ||
83 | ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); | ||
84 | orion5x_spi_init(); | ||
85 | orion5x_uart0_init(); | ||
86 | } | ||
87 | |||
88 | static struct hw_pci rd88f6183ap_ge_pci __initdata = { | ||
89 | .nr_controllers = 2, | ||
90 | .swizzle = pci_std_swizzle, | ||
91 | .setup = orion5x_pci_sys_setup, | ||
92 | .scan = orion5x_pci_sys_scan_bus, | ||
93 | .map_irq = orion5x_pci_map_irq, | ||
94 | }; | ||
95 | |||
96 | static int __init rd88f6183ap_ge_pci_init(void) | ||
97 | { | ||
98 | if (machine_is_rd88f6183ap_ge()) { | ||
99 | orion5x_pci_disable(); | ||
100 | pci_common_init(&rd88f6183ap_ge_pci); | ||
101 | } | ||
102 | |||
103 | return 0; | ||
104 | } | ||
105 | subsys_initcall(rd88f6183ap_ge_pci_init); | ||
106 | |||
107 | MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") | ||
108 | /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ | ||
109 | .phys_io = ORION5X_REGS_PHYS_BASE, | ||
110 | .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC, | ||
111 | .boot_params = 0x00000100, | ||
112 | .init_machine = rd88f6183ap_ge_init, | ||
113 | .map_io = orion5x_map_io, | ||
114 | .init_irq = orion5x_init_irq, | ||
115 | .timer = &orion5x_timer, | ||
116 | .fixup = tag_fixup_mem32, | ||
117 | MACHINE_END | ||