linux-mips
[Top] [All Lists]

Re: [PATCH 5/8] add Texas Instruments AR7 support

To: linux-mips@linux-mips.org
Subject: Re: [PATCH 5/8] add Texas Instruments AR7 support
From: Alexander Clouter <alex@digriz.org.uk>
Date: Wed, 24 Jun 2009 22:16:23 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200906041619.25359.florian@openwrt.org> <200906241112.58301.florian@openwrt.org> <o8f9h6-v4l.ln1@woodchuck.wormnet.eu> <200906241932.09909.florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-1-sparc64 (sparc64))
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.


<Prev in Thread] Current Thread [Next in Thread>