Hi,
Florian Fainelli <florian@openwrt.org> wrote:
>
> Le Wednesday 24 June 2009 13:28:56 Alexander Clouter, vous avez écrit :
>>
>> Florian Fainelli <florian@openwrt.org> wrote:
>>
>> > +/*
>> > + * Initializes basic routines and structures pointers, memory size (as
>> > + * given by the bios and saves the command line.
>> > + */
>> > +
>> > +void __init plat_mem_setup(void)
>> > +{
>> > + unsigned long io_base;
>> > +
>> > + _machine_restart = ar7_machine_restart;
>> > + _machine_halt = ar7_machine_halt;
>> > + pm_power_off = ar7_machine_power_off;
>> > + panic_timeout = 3;
>> > +
>> > + io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000);
>> > + if (!io_base)
>> > + panic("Can't remap IO base!\n");
>> > + set_io_port_base(io_base);
>> > +
>>
>> Casting a pointer to a unsigned long...hmmmm.
>>
arch/mips/sgi-ip32/crime.c:crime_init() has the much nicer feeling:
set_io_port_base((unsigned long) ioremap(AR7_REGS_BASE, 0x100000));
At least this approach hides the pointer to int cast'ing.
>> I have been slightly tracking the ar7 code for a while and I have to say
>> it is really looking much nicer now-a-days. Well done! If you ever are
>> in London, I'll buy you a beer.
>
> I am in Paris at the moment, but you can also come here ;)
>
Noted :)
Cheers
--
Alexander Clouter
.sigmonster says: I'm not proud.
|