aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-dm644x-evm.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2009-04-15 15:40:56 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-28 18:17:45 -0400
commit972412b648dcf0c4303dca7e515d5c24ce3cd1d5 (patch)
tree2531253bcc50ef71665405ad1aa0f8f2f035f41f /arch/arm/mach-davinci/board-dm644x-evm.c
parent65e866a9741126c678e6dcd5d4fa8c9eca18e945 (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-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 cfe89c409735..987d27fcacb0 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -38,7 +38,6 @@
38 38
39#include <mach/dm644x.h> 39#include <mach/dm644x.h>
40#include <mach/common.h> 40#include <mach/common.h>
41#include <mach/emac.h>
42#include <mach/i2c.h> 41#include <mach/i2c.h>
43#include <mach/serial.h> 42#include <mach/serial.h>
44#include <mach/mux.h> 43#include <mach/mux.h>
@@ -61,11 +60,6 @@
61#define LXT971_PHY_ID (0x001378e2) 60#define LXT971_PHY_ID (0x001378e2)
62#define LXT971_PHY_MASK (0xfffffff0) 61#define LXT971_PHY_MASK (0xfffffff0)
63 62
64static struct emac_platform_data dm644x_evm_emac_pdata = {
65 .phy_mask = DM644X_EVM_PHY_MASK,
66 .mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY,
67};
68
69static struct mtd_partition davinci_evm_norflash_partitions[] = { 63static struct mtd_partition davinci_evm_norflash_partitions[] = {
70 /* bootloader (UBL, U-Boot, etc) in first 5 sectors */ 64 /* bootloader (UBL, U-Boot, etc) in first 5 sectors */
71 { 65 {
@@ -448,6 +442,7 @@ static struct memory_accessor *at24_mem_acc;
448static void at24_setup(struct memory_accessor *mem_acc, void *context) 442static void at24_setup(struct memory_accessor *mem_acc, void *context)
449{ 443{
450 char mac_addr[ETH_ALEN]; 444 char mac_addr[ETH_ALEN];
445 struct davinci_soc_info *soc_info = &davinci_soc_info;
451 446
452 at24_mem_acc = mem_acc; 447 at24_mem_acc = mem_acc;
453 448
@@ -455,7 +450,7 @@ static void at24_setup(struct memory_accessor *mem_acc, void *context)
455 if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) == 450 if (at24_mem_acc->read(at24_mem_acc, mac_addr, 0x7f00, ETH_ALEN) ==
456 ETH_ALEN) { 451 ETH_ALEN) {
457 printk(KERN_INFO "Read MAC addr from EEPROM: %pM\n", mac_addr); 452 printk(KERN_INFO "Read MAC addr from EEPROM: %pM\n", mac_addr);
458 memcpy(dm644x_evm_emac_pdata.mac_addr, mac_addr, ETH_ALEN); 453 memcpy(soc_info->emac_pdata->mac_addr, mac_addr, ETH_ALEN);
459 } 454 }
460} 455}
461 456
@@ -650,6 +645,7 @@ static int davinci_phy_fixup(struct phy_device *phydev)
650static __init void davinci_evm_init(void) 645static __init void davinci_evm_init(void)
651{ 646{
652 struct clk *aemif_clk; 647 struct clk *aemif_clk;
648 struct davinci_soc_info *soc_info = &davinci_soc_info;
653 649
654 aemif_clk = clk_get(NULL, "aemif"); 650 aemif_clk = clk_get(NULL, "aemif");
655 clk_enable(aemif_clk); 651 clk_enable(aemif_clk);
@@ -686,7 +682,9 @@ static __init void davinci_evm_init(void)
686 682
687 davinci_serial_init(&uart_config); 683 davinci_serial_init(&uart_config);
688 684
689 dm644x_init_emac(&dm644x_evm_emac_pdata); 685 soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK;
686 soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY;
687 dm644x_init_emac(soc_info->emac_pdata);
690 688
691 /* Register the fixup for PHY on DaVinci */ 689 /* Register the fixup for PHY on DaVinci */
692 phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK, 690 phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,