diff options
author | Eric Miao <eric.miao@marvell.com> | 2009-02-18 03:38:22 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-03-22 22:11:35 -0400 |
commit | a6b993c6b5183fe2af98569cbb7dd8add01b8deb (patch) | |
tree | 2b2e055c7cf9a41e45212eb4fb4b878c522503b1 /arch/arm | |
parent | 9c291f0f835dc8349afc21d6311cb531140f6977 (diff) |
[ARM] pxa/aspenite: add support for debug ethernet
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index a9efa5cadbe8..4562452d4074 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -11,26 +11,89 @@ | |||
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/smc91x.h> | ||
14 | 16 | ||
15 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
16 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
17 | #include <mach/addr-map.h> | 19 | #include <mach/addr-map.h> |
18 | #include <mach/mfp-pxa168.h> | 20 | #include <mach/mfp-pxa168.h> |
19 | #include <mach/pxa168.h> | 21 | #include <mach/pxa168.h> |
22 | #include <mach/gpio.h> | ||
20 | 23 | ||
21 | #include "common.h" | 24 | #include "common.h" |
22 | 25 | ||
23 | static unsigned long common_pin_config[] __initdata = { | 26 | static unsigned long common_pin_config[] __initdata = { |
27 | /* Data Flash Interface */ | ||
28 | GPIO0_DFI_D15, | ||
29 | GPIO1_DFI_D14, | ||
30 | GPIO2_DFI_D13, | ||
31 | GPIO3_DFI_D12, | ||
32 | GPIO4_DFI_D11, | ||
33 | GPIO5_DFI_D10, | ||
34 | GPIO6_DFI_D9, | ||
35 | GPIO7_DFI_D8, | ||
36 | GPIO8_DFI_D7, | ||
37 | GPIO9_DFI_D6, | ||
38 | GPIO10_DFI_D5, | ||
39 | GPIO11_DFI_D4, | ||
40 | GPIO12_DFI_D3, | ||
41 | GPIO13_DFI_D2, | ||
42 | GPIO14_DFI_D1, | ||
43 | GPIO15_DFI_D0, | ||
44 | |||
45 | /* Static Memory Controller */ | ||
46 | GPIO18_SMC_nCS0, | ||
47 | GPIO34_SMC_nCS1, | ||
48 | GPIO23_SMC_nLUA, | ||
49 | GPIO25_SMC_nLLA, | ||
50 | GPIO28_SMC_RDY, | ||
51 | GPIO29_SMC_SCLK, | ||
52 | GPIO35_SMC_BE1, | ||
53 | GPIO36_SMC_BE2, | ||
54 | GPIO27_GPIO, /* Ethernet IRQ */ | ||
55 | |||
24 | /* UART1 */ | 56 | /* UART1 */ |
25 | GPIO107_UART1_RXD, | 57 | GPIO107_UART1_RXD, |
26 | GPIO108_UART1_TXD, | 58 | GPIO108_UART1_TXD, |
27 | }; | 59 | }; |
28 | 60 | ||
61 | static struct smc91x_platdata smc91x_info = { | ||
62 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
63 | }; | ||
64 | |||
65 | static struct resource smc91x_resources[] = { | ||
66 | [0] = { | ||
67 | .start = SMC_CS1_PHYS_BASE + 0x300, | ||
68 | .end = SMC_CS1_PHYS_BASE + 0xfffff, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .start = gpio_to_irq(27), | ||
73 | .end = gpio_to_irq(27), | ||
74 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
75 | } | ||
76 | }; | ||
77 | |||
78 | static struct platform_device smc91x_device = { | ||
79 | .name = "smc91x", | ||
80 | .id = 0, | ||
81 | .dev = { | ||
82 | .platform_data = &smc91x_info, | ||
83 | }, | ||
84 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
85 | .resource = smc91x_resources, | ||
86 | }; | ||
87 | |||
29 | static void __init common_init(void) | 88 | static void __init common_init(void) |
30 | { | 89 | { |
31 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); | 90 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); |
32 | 91 | ||
92 | /* on-chip devices */ | ||
33 | pxa168_add_uart(1); | 93 | pxa168_add_uart(1); |
94 | |||
95 | /* off-chip devices */ | ||
96 | platform_device_register(&smc91x_device); | ||
34 | } | 97 | } |
35 | 98 | ||
36 | MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") | 99 | MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") |