[U-Boot] [PATCH] kirkwood_egiga: updates: fix DRAM mapping and typo
Prafulla Wadaskar
prafulla at marvell.com
Mon Jul 5 21:51:25 CEST 2010
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Monday, July 05, 2010 11:45 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] [PATCH] kirkwood_egiga: updates: fix DRAM
> mapping and typo
>
> 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 at free.fr>
> ---
> drivers/net/kirkwood_egiga.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/kirkwood_egiga.c
> b/drivers/net/kirkwood_egiga.c
> index 932792e..b7374b5 100644
> --- a/drivers/net/kirkwood_egiga.c
> +++ b/drivers/net/kirkwood_egiga.c
> @@ -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;
> --
> 1.6.4.4
Acked-by: Prafulla Wadaskar <prafulla at marvell.com>
Regards..
Prafulla . .
More information about the U-Boot
mailing list