]> git.sur5r.net Git - u-boot/commitdiff
kirkwood_egiga: updates: fix DRAM mapping and typo
authorAlbert Aribaud <albert.aribaud@free.fr>
Mon, 5 Jul 2010 18:15:25 +0000 (20:15 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 12 Jul 2010 07:11:27 +0000 (00:11 -0700)
DRAM window mapping uses kirkwood-provided functions instead
of global gd as do other drivers--fix this.

Also, fix a typo in a comment

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/kirkwood_egiga.c

index ea0c5223bbfba3ae67232e2ad54c2bdf4fa8f897..dca9f11c2a5bcd15ea49792af666a0bdc157971a 100644 (file)
@@ -38,6 +38,8 @@
 #include <asm/arch/kirkwood.h>
 #include "kirkwood_egiga.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define KIRKWOOD_PHY_ADR_REQUEST 0xee
 #define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)
 
@@ -245,9 +247,9 @@ static void set_dram_access(struct kwgbe_registers *regs)
                /* Enable full access */
                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 */
+               /* Get bank base and 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
@@ -268,7 +270,7 @@ static void set_dram_access(struct kwgbe_registers *regs)
                        win_param.attrib = EBAR_DRAM_CS3;
                        break;
                default:
-                       /* invalide bank, disable access */
+                       /* invalid bank, disable access */
                        win_param.enable = 0;
                        win_param.attrib = 0;
                        break;