diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-07 09:19:40 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-26 10:18:16 -0400 |
commit | ac7b75b5bbbfd60b752869a22daa3be99b5b4f99 (patch) | |
tree | dac2408210f9e815f98f67c7c6e32216db99fa73 /arch/arm/mach-davinci/include | |
parent | 2dbf56aeb7986b54651c93ed171877e8179289bc (diff) |
davinci: EMAC platform support
Add SoC and platform-specific data and init for DaVinci EMAC network
driver.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm644x.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm646x.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/emac.h | 36 |
3 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h index 3dcb9f4e58b4..ace167aec460 100644 --- a/arch/arm/mach-davinci/include/mach/dm644x.h +++ b/arch/arm/mach-davinci/include/mach/dm644x.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/emac.h> | ||
27 | 28 | ||
28 | #define DM644X_EMAC_BASE (0x01C80000) | 29 | #define DM644X_EMAC_BASE (0x01C80000) |
29 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) | 30 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) |
@@ -33,5 +34,6 @@ | |||
33 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) | 34 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) |
34 | 35 | ||
35 | void __init dm644x_init(void); | 36 | void __init dm644x_init(void); |
37 | void dm644x_init_emac(struct emac_platform_data *pdata); | ||
36 | 38 | ||
37 | #endif /* __ASM_ARCH_DM644X_H */ | 39 | #endif /* __ASM_ARCH_DM644X_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index d917939af158..ea7b28e112f6 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -12,7 +12,16 @@ | |||
12 | #define __ASM_ARCH_DM646X_H | 12 | #define __ASM_ARCH_DM646X_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/emac.h> | ||
16 | |||
17 | #define DM646X_EMAC_BASE (0x01C80000) | ||
18 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) | ||
19 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) | ||
20 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) | ||
21 | #define DM646X_EMAC_MDIO_OFFSET (0x4000) | ||
22 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) | ||
15 | 23 | ||
16 | void __init dm646x_init(void); | 24 | void __init dm646x_init(void); |
25 | void dm646x_init_emac(struct emac_platform_data *pdata); | ||
17 | 26 | ||
18 | #endif /* __ASM_ARCH_DM646X_H */ | 27 | #endif /* __ASM_ARCH_DM646X_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/emac.h b/arch/arm/mach-davinci/include/mach/emac.h new file mode 100644 index 000000000000..549fcced2175 --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/emac.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * TI DaVinci EMAC platform support | ||
3 | * | ||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | ||
5 | * | ||
6 | * 2007 (c) Deep Root Systems, LLC. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef _MACH_DAVINCI_EMAC_H | ||
12 | #define _MACH_DAVINCI_EMAC_H | ||
13 | |||
14 | #include <linux/if_ether.h> | ||
15 | |||
16 | struct emac_platform_data { | ||
17 | char mac_addr[ETH_ALEN]; | ||
18 | u32 ctrl_reg_offset; | ||
19 | u32 ctrl_mod_reg_offset; | ||
20 | u32 ctrl_ram_offset; | ||
21 | u32 mdio_reg_offset; | ||
22 | u32 ctrl_ram_size; | ||
23 | u32 phy_mask; | ||
24 | u32 mdio_max_freq; | ||
25 | u8 rmii_en; | ||
26 | u8 version; | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | EMAC_VERSION_1, /* DM644x */ | ||
31 | EMAC_VERSION_2, /* DM646x */ | ||
32 | }; | ||
33 | void davinci_init_emac(struct emac_platform_data *pdata); | ||
34 | #endif | ||
35 | |||
36 | |||