diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-07 06:19:40 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-26 07:18:16 -0700 |
commit | ac7b75b5bbbfd60b752869a22daa3be99b5b4f99 (patch) | |
tree | dac2408210f9e815f98f67c7c6e32216db99fa73 /arch/arm/mach-davinci/board-dm646x-evm.c | |
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/board-dm646x-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 94cb623b1ec..aedde3cdb82 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -45,6 +45,16 @@ #include <mach/psc.h> #include <mach/serial.h> #include <mach/i2c.h> +#include <mach/mmc.h> +#include <mach/emac.h> + +#define DM646X_EVM_PHY_MASK (0x2) +#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ + +static struct emac_platform_data dm646x_evm_emac_pdata = { + .phy_mask = DM646X_EVM_PHY_MASK, + .mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY, +}; static struct davinci_uart_config uart_config __initdata = { .enabled_uarts = (1 << 0), @@ -196,14 +206,16 @@ static struct memory_accessor *at24_mem_acc; static void at24_setup(struct memory_accessor *mem_acc, void *context) { - char mac_addr[6]; + char mac_addr[ETH_ALEN]; at24_mem_acc = mem_acc; /* Read MAC addr from EEPROM */ if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) == - ETH_ALEN) + ETH_ALEN) { pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); + memcpy(dm646x_evm_emac_pdata.mac_addr, mac_addr, ETH_ALEN); + } } static struct at24_platform_data eeprom_info = { @@ -261,6 +273,7 @@ static __init void evm_init(void) { evm_init_i2c(); davinci_serial_init(&uart_config); + dm646x_init_emac(&dm646x_evm_emac_pdata); } static __init void davinci_dm646x_evm_irq_init(void) |