diff options
author | Mark A. Greer <mgreer@mvista.com> | 2009-04-15 15:40:56 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-28 18:17:45 -0400 |
commit | 972412b648dcf0c4303dca7e515d5c24ce3cd1d5 (patch) | |
tree | 2531253bcc50ef71665405ad1aa0f8f2f035f41f /arch/arm/mach-davinci/board-dm646x-evm.c | |
parent | 65e866a9741126c678e6dcd5d4fa8c9eca18e945 (diff) |
davinci: Move emac platform_data to SoC-specific files
Since most of the emac platform_data is really SoC specific
and not board specific, move it to the SoC-specific files.
Put a pointer to the platform_data in the soc_info structure
so the board-specific code can set some of the platform_data
if it needs to.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm646x-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index becae51d6dd1..0de0637aed5e 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -52,11 +52,6 @@ | |||
52 | #define DM646X_EVM_PHY_MASK (0x2) | 52 | #define DM646X_EVM_PHY_MASK (0x2) |
53 | #define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ | 53 | #define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ |
54 | 54 | ||
55 | static struct emac_platform_data dm646x_evm_emac_pdata = { | ||
56 | .phy_mask = DM646X_EVM_PHY_MASK, | ||
57 | .mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY, | ||
58 | }; | ||
59 | |||
60 | static struct davinci_uart_config uart_config __initdata = { | 55 | static struct davinci_uart_config uart_config __initdata = { |
61 | .enabled_uarts = (1 << 0), | 56 | .enabled_uarts = (1 << 0), |
62 | }; | 57 | }; |
@@ -208,6 +203,7 @@ static struct memory_accessor *at24_mem_acc; | |||
208 | static void at24_setup(struct memory_accessor *mem_acc, void *context) | 203 | static void at24_setup(struct memory_accessor *mem_acc, void *context) |
209 | { | 204 | { |
210 | char mac_addr[ETH_ALEN]; | 205 | char mac_addr[ETH_ALEN]; |
206 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
211 | 207 | ||
212 | at24_mem_acc = mem_acc; | 208 | at24_mem_acc = mem_acc; |
213 | 209 | ||
@@ -215,7 +211,7 @@ static void at24_setup(struct memory_accessor *mem_acc, void *context) | |||
215 | if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) == | 211 | if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) == |
216 | ETH_ALEN) { | 212 | ETH_ALEN) { |
217 | pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); | 213 | pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); |
218 | memcpy(dm646x_evm_emac_pdata.mac_addr, mac_addr, ETH_ALEN); | 214 | memcpy(soc_info->emac_pdata->mac_addr, mac_addr, ETH_ALEN); |
219 | } | 215 | } |
220 | } | 216 | } |
221 | 217 | ||
@@ -271,9 +267,14 @@ static void __init davinci_map_io(void) | |||
271 | 267 | ||
272 | static __init void evm_init(void) | 268 | static __init void evm_init(void) |
273 | { | 269 | { |
270 | struct davinci_soc_info *soc_info = &davinci_soc_info; | ||
271 | |||
274 | evm_init_i2c(); | 272 | evm_init_i2c(); |
275 | davinci_serial_init(&uart_config); | 273 | davinci_serial_init(&uart_config); |
276 | dm646x_init_emac(&dm646x_evm_emac_pdata); | 274 | |
275 | soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK; | ||
276 | soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; | ||
277 | dm646x_init_emac(soc_info->emac_pdata); | ||
277 | } | 278 | } |
278 | 279 | ||
279 | static __init void davinci_dm646x_evm_irq_init(void) | 280 | static __init void davinci_dm646x_evm_irq_init(void) |