[U-Boot] [PATCH 2/4] egiga: Remove functional dependency on kirkwood
Albert ARIBAUD
albert.aribaud at free.fr
Mon Jul 5 19:59:34 CEST 2010
Le 05/07/2010 13:03, Prafulla Wadaskar a écrit :
>
>> -----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 . .
There is also a similar fix (move from kw_sdram_{bar,bs} to gd) to be
done on drivers/usb/host/ehci-kirkwood.c, apparently. As I wasn't
planning supporting USB with this patchset, I'd ignored it, but if you
want I can submit a separate patch for it too.
Amicalement,
--
Albert.
More information about the U-Boot
mailing list