diff options
author | Tanmay Upadhyay <tanmay.upadhyay@einfochips.com> | 2011-05-02 01:59:59 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2011-07-12 07:50:36 -0400 |
commit | 80def0dc35886328284dfbde525815643882e730 (patch) | |
tree | 551ab125a8fa5dbcc49ba23d5b56da48c5d096af /arch | |
parent | 26407f818e62a88ac9cee64f250ec844fb079862 (diff) |
ARM: pxa168: Add support for Ethernet
Add wrapper that creates resources for PXA168 Ethernet driver
Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 19 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/pxa168.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/regs-apmu.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 3 |
4 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 713be155a44d..8c782328b21c 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
@@ -305,4 +305,23 @@ | |||
305 | #define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7) | 305 | #define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7) |
306 | #define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7) | 306 | #define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7) |
307 | 307 | ||
308 | /* Fast Ethernet */ | ||
309 | #define GPIO86_TX_CLK MFP_CFG(GPIO86, AF5) | ||
310 | #define GPIO87_TX_EN MFP_CFG(GPIO87, AF5) | ||
311 | #define GPIO88_TX_DQ3 MFP_CFG(GPIO88, AF5) | ||
312 | #define GPIO89_TX_DQ2 MFP_CFG(GPIO89, AF5) | ||
313 | #define GPIO90_TX_DQ1 MFP_CFG(GPIO90, AF5) | ||
314 | #define GPIO91_TX_DQ0 MFP_CFG(GPIO91, AF5) | ||
315 | #define GPIO92_MII_CRS MFP_CFG(GPIO92, AF5) | ||
316 | #define GPIO93_MII_COL MFP_CFG(GPIO93, AF5) | ||
317 | #define GPIO94_RX_CLK MFP_CFG(GPIO94, AF5) | ||
318 | #define GPIO95_RX_ER MFP_CFG(GPIO95, AF5) | ||
319 | #define GPIO96_RX_DQ3 MFP_CFG(GPIO96, AF5) | ||
320 | #define GPIO97_RX_DQ2 MFP_CFG(GPIO97, AF5) | ||
321 | #define GPIO98_RX_DQ1 MFP_CFG(GPIO98, AF5) | ||
322 | #define GPIO99_RX_DQ0 MFP_CFG(GPIO99, AF5) | ||
323 | #define GPIO100_MII_MDC MFP_CFG(GPIO100, AF5) | ||
324 | #define GPIO101_MII_MDIO MFP_CFG(GPIO101, AF5) | ||
325 | #define GPIO103_RX_DV MFP_CFG(GPIO103, AF5) | ||
326 | |||
308 | #endif /* __ASM_MACH_MFP_PXA168_H */ | 327 | #endif /* __ASM_MACH_MFP_PXA168_H */ |
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h index 705e963574d9..7f005843a707 100644 --- a/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/arch/arm/mach-mmp/include/mach/pxa168.h | |||
@@ -14,6 +14,7 @@ extern void pxa168_clear_keypad_wakeup(void); | |||
14 | #include <video/pxa168fb.h> | 14 | #include <video/pxa168fb.h> |
15 | #include <plat/pxa27x_keypad.h> | 15 | #include <plat/pxa27x_keypad.h> |
16 | #include <mach/cputype.h> | 16 | #include <mach/cputype.h> |
17 | #include <linux/pxa168_eth.h> | ||
17 | 18 | ||
18 | extern struct pxa_device_desc pxa168_device_uart1; | 19 | extern struct pxa_device_desc pxa168_device_uart1; |
19 | extern struct pxa_device_desc pxa168_device_uart2; | 20 | extern struct pxa_device_desc pxa168_device_uart2; |
@@ -32,6 +33,7 @@ extern struct pxa_device_desc pxa168_device_ssp5; | |||
32 | extern struct pxa_device_desc pxa168_device_nand; | 33 | extern struct pxa_device_desc pxa168_device_nand; |
33 | extern struct pxa_device_desc pxa168_device_fb; | 34 | extern struct pxa_device_desc pxa168_device_fb; |
34 | extern struct pxa_device_desc pxa168_device_keypad; | 35 | extern struct pxa_device_desc pxa168_device_keypad; |
36 | extern struct pxa_device_desc pxa168_device_eth; | ||
35 | 37 | ||
36 | static inline int pxa168_add_uart(int id) | 38 | static inline int pxa168_add_uart(int id) |
37 | { | 39 | { |
@@ -119,4 +121,8 @@ static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data *data) | |||
119 | return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data)); | 121 | return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data)); |
120 | } | 122 | } |
121 | 123 | ||
124 | static inline int pxa168_add_eth(struct pxa168_eth_platform_data *data) | ||
125 | { | ||
126 | return pxa_register_device(&pxa168_device_eth, data, sizeof(*data)); | ||
127 | } | ||
122 | #endif /* __ASM_MACH_PXA168_H */ | 128 | #endif /* __ASM_MACH_PXA168_H */ |
diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-mmp/include/mach/regs-apmu.h index f7011ef70bf5..8447ac63e28f 100644 --- a/arch/arm/mach-mmp/include/mach/regs-apmu.h +++ b/arch/arm/mach-mmp/include/mach/regs-apmu.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define APMU_BUS APMU_REG(0x06c) | 29 | #define APMU_BUS APMU_REG(0x06c) |
30 | #define APMU_SDH2 APMU_REG(0x0e8) | 30 | #define APMU_SDH2 APMU_REG(0x0e8) |
31 | #define APMU_SDH3 APMU_REG(0x0ec) | 31 | #define APMU_SDH3 APMU_REG(0x0ec) |
32 | #define APMU_ETH APMU_REG(0x0fc) | ||
32 | 33 | ||
33 | #define APMU_FNCLK_EN (1 << 4) | 34 | #define APMU_FNCLK_EN (1 << 4) |
34 | #define APMU_AXICLK_EN (1 << 3) | 35 | #define APMU_AXICLK_EN (1 << 3) |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index dcb203be55d9..96d451dc305c 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -82,6 +82,7 @@ static APBC_CLK(keypad, PXA168_KPC, 0, 32000); | |||
82 | 82 | ||
83 | static APMU_CLK(nand, NAND, 0x01db, 208000000); | 83 | static APMU_CLK(nand, NAND, 0x01db, 208000000); |
84 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); | 84 | static APMU_CLK(lcd, LCD, 0x7f, 312000000); |
85 | static APMU_CLK(eth, ETH, 0x09, 0); | ||
85 | 86 | ||
86 | /* device and clock bindings */ | 87 | /* device and clock bindings */ |
87 | static struct clk_lookup pxa168_clkregs[] = { | 88 | static struct clk_lookup pxa168_clkregs[] = { |
@@ -102,6 +103,7 @@ static struct clk_lookup pxa168_clkregs[] = { | |||
102 | INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), | 103 | INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), |
103 | INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), | 104 | INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), |
104 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), | 105 | INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), |
106 | INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"), | ||
105 | }; | 107 | }; |
106 | 108 | ||
107 | static int __init pxa168_init(void) | 109 | static int __init pxa168_init(void) |
@@ -166,3 +168,4 @@ PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59); | |||
166 | PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); | 168 | PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); |
167 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); | 169 | PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); |
168 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); | 170 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); |
171 | PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff); | ||