[U-Boot] [PATCH 2/4] egiga: Remove functional dependency on kirkwood

Albert Aribaud albert.aribaud at free.fr
Fri Jul 2 18:53:21 CEST 2010


Set DRAM windows by using gd as other drivers do,
instead of calling kirkwood-specific functions.

Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
---
 drivers/net/egiga.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/egiga.c b/drivers/net/egiga.c
index 50e8ff3..cbe4748 100644
--- a/drivers/net/egiga.c
+++ b/drivers/net/egiga.c
@@ -38,6 +38,8 @@
 #include <asm/arch/kirkwood.h>
 #include "egiga.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define KIRKWOOD_PHY_ADR_REQUEST 0xee
 #define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)
 
@@ -246,8 +248,8 @@ static void set_dram_access(struct kwgbe_registers *regs)
 		win_param.access_ctrl = EWIN_ACCESS_FULL;
 		win_param.high_addr = 0;
 		/* Get bank base */
-		win_param.base_addr = kw_sdram_bar(i);
-		win_param.size = kw_sdram_bs(i);	/* Get bank size */
+		win_param.base_addr = gd->bd->bi_dram[i].start;
+		win_param.size = gd->bd->bi_dram[i].size;
 		if (win_param.size == 0)
 			win_param.enable = 0;
 		else
-- 
1.6.4.4



More information about the U-Boot mailing list