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

Prafulla Wadaskar prafulla at marvell.com
Mon Jul 5 13:03:07 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: Friday, July 02, 2010 10:23 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] [PATCH 2/4] egiga: Remove functional 
> dependency on kirkwood
> 
> 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

this is good patch indeed to make the driver more generic, which is independent of this activity
please post this patch for current version i.e. kirkwood_egiga.c

Regards..
Prafulla . .


More information about the U-Boot mailing list