summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/board-dm644x-evm.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2009-04-15 12:40:56 -0700
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-28 15:17:45 -0700
commit972412b648dcf0c4303dca7e515d5c24ce3cd1d5 (patch)
tree2531253bcc50ef71665405ad1aa0f8f2f035f41f /arch/arm/mach-davinci/board-dm644x-evm.c
parent65e866a9741126c678e6dcd5d4fa8c9eca18e945 (diff)
downloadlinux-3.10-972412b648dcf0c4303dca7e515d5c24ce3cd1d5.tar.gz
linux-3.10-972412b648dcf0c4303dca7e515d5c24ce3cd1d5.tar.bz2
linux-3.10-972412b648dcf0c4303dca7e515d5c24ce3cd1d5.zip
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-dm644x-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index cfe89c40973..987d27fcacb 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -38,7 +38,6 @@
#include <mach/dm644x.h>
#include <mach/common.h>
-#include <mach/emac.h>
#include <mach/i2c.h>
#include <mach/serial.h>
#include <mach/mux.h>
@@ -61,11 +60,6 @@
#define LXT971_PHY_ID (0x001378e2)
#define LXT971_PHY_MASK (0xfffffff0)
-static struct emac_platform_data dm644x_evm_emac_pdata = {
- .phy_mask = DM644X_EVM_PHY_MASK,
- .mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY,
-};
-
static struct mtd_partition davinci_evm_norflash_partitions[] = {
/* bootloader (UBL, U-Boot, etc) in first 5 sectors */
{
@@ -448,6 +442,7 @@ static struct memory_accessor *at24_mem_acc;
static void at24_setup(struct memory_accessor *mem_acc, void *context)
{
char mac_addr[ETH_ALEN];
+ struct davinci_soc_info *soc_info = &davinci_soc_info;
at24_mem_acc = mem_acc;
@@ -455,7 +450,7 @@ static void at24_setup(struct memory_accessor *mem_acc, void *context)
if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) ==
ETH_ALEN) {
printk(KERN_INFO "Read MAC addr from EEPROM: %pM\n", mac_addr);
- memcpy(dm644x_evm_emac_pdata.mac_addr, mac_addr, ETH_ALEN);
+ memcpy(soc_info->emac_pdata->mac_addr, mac_addr, ETH_ALEN);
}
}
@@ -650,6 +645,7 @@ static int davinci_phy_fixup(struct phy_device *phydev)
static __init void davinci_evm_init(void)
{
struct clk *aemif_clk;
+ struct davinci_soc_info *soc_info = &davinci_soc_info;
aemif_clk = clk_get(NULL, "aemif");
clk_enable(aemif_clk);
@@ -686,7 +682,9 @@ static __init void davinci_evm_init(void)
davinci_serial_init(&uart_config);
- dm644x_init_emac(&dm644x_evm_emac_pdata);
+ soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK;
+ soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY;
+ dm644x_init_emac(soc_info->emac_pdata);
/* Register the fixup for PHY on DaVinci */
phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,