Hello Paul,

Paul Sokolovsky a écrit :
> Hello Pierre,
>
> Tuesday, January 23, 2007, 12:27:48 AM, you wrote:
>
>   
>> Finally, I cleaned up the code O:-) ...
>>     
>
>   
>> So, here is a new patch that should also work on X50 machines.
>> You just have to precise your Axim variant ("v" or not) when configuring
>> the kernel.
>> The RAM base address should be correctly managed now.
>> Testers/reviewers are welcome.
>>     
>
>   
>> Paul : what do you think about adding this patch to the HH kernel cvs now ?
>>     
>
>   Sounds good, and by now committed. Thanks for the cleanup you made -
> it is really visible. Thanks for dropping *_core driver - it is an
> artifact of hx4700 port, it was done that way to control device
> initialization order wrt to SoC used there (ASIC3). But since then,
> another, more clean solution was written ("SoC child devices"), and
> most ports adopted it. In other words, hx4700's "core" driver is
> candidate for rewrite.
>
>   Few other issues:
>
> 1. defconfig in the archive was apparently old, selecting aximx30
> port. I've fixed that, and with current aximx50_defconfig in CVS it
> builds ok. Can you please check that current vanilla CVS boots ok?
>   
I can not boot the HEAD cvs HH kernel.
In fact, I am not so surprized : see my remarks concerning DRAM_BASE below.
> 2. Nice solution with DRAM_BASE. But does it actually work?
>
> include/asm-arm/memory.h:
> =======
> ...
> #include <asm/arch/memory.h>
> ...
> #ifndef PHYS_OFFSET
> #define PHYS_OFFSET             (CONFIG_DRAM_BASE)
> #endif
> ...
> =======
>
> In our case asm/arch/memory.h will be linked to
> asm-arm/arch-pxa/memory.h, and it has:
> =======
> ...
> #define PHYS_OFFSET     UL(0xa0000000)
> ...
> =======
>
>   So, per above, PHYS_OFFSET shouldn't be redefined with
> CONFIG_DRAM_BASE. Can you please check what actually happens here? It
> could be just the case that PHYS_OFFSET is used just as some abstract
> base in the code, and the actual RAM area to use is passed by the
> bootloader (i.e. haret) via atags. In this case, we better remove
> DRAM_BASE patching, etc. - that would be a step towards having single
> common kernel for all PXA27x devices in the future. Btw, can you post
> harte-0.4.7's haretlog.txt? (I mostly interested to confirm that
> autodetection works as expected).
>   

I am afraid we have to rely on something like this, because PHYS_OFFSET
is used in head.S to map
the first MB of memory containing the kernel parameters...
No right PHYS_OFFSET probably means no atags...
Why not replace #define PHYS_OFFSET and use systematically DRAM_BASE in
include/asm-arm/arch-pxa/memory.h ? aka

#ifndef PHYS_OFFSET
#define PHYS_OFFSET             (CONFIG_DRAM_BASE)
#endif

And add consequently something like

config DRAM_BASE
    hex
    default 0xa8000000 if MACH_X50
    default 0xa0000000
    help
      You should not need to modify this value.

to mach-pxa/Kconfig ? At least, it will work for any architecture. The
default I see is that mach-pxa/Kconfig becomes x50-dependent, but it is
more or less already the case...
The other solution is to systematically move the DRAM definition in
sub-pxa directories. On the one hand, it is cleaner, but all the current
machine directories will have to be modified...

I will send the HaRET script I use and the corresponding boot log later
: my kernel is not significant for now.

> 3. Please make sure you consult
> http://handhelds.org/moin/moin.cgi/HandheldHardwareXref regarding
> existing drivers for devices aximx50 has. For example, please use
> gpio_keys drivers for buttons on PXA GPIO lines, for ads7846, current
> h4000_ts driver might be a good candidate (I really should make it
> full machine independent, but at least even now TS driver itself is
> separated from SSP communication driver), etc.
>
>   
Thanks for the link : it is really interesting.
MAXIM 2820 seems to be a bluetooth component, and not a Wifi one.
Thanks for the advice regarding the h4000 : it is not easy to find the
"good studient" in these ports.
> 4. include/asm-arm/arch-pxa/aximx50-gpio.h is clearly copied from
> hx4700-gpio.h, and thus contains lots of confusing cruft like
> GPIO_NR_X50_W3220_RESET_N. I suggest that you start that file from
> scratch, and put only GPIOs actually relevant and specific to aximx50.
> In this regard, defines like
>
> +#define GPIO_NR_X50_I2S_BCK                    28
> +#define GPIO_NR_X50_I2S_DIN                    29
> +#define GPIO_NR_X50_I2S_DOUT                   30
> +#define GPIO_NR_X50_I2S_SYNC                   31
>
> are superfluous - those functions for GPIOs are really standard for
> PXA, not just for aximx50. So, unless on axim50 they are used in other
> way (for example, as generic GPIO), there's no point to define them in
> aximx50-gpio.h, instead, pxa-regs.h symbols should be used. I know
> that many ports has those re-defines, but that's just another bad
> example, and subject to cleanup.
>   
Ok, I'll do a spring clean up in this header file ;-)

Pierre

-- 
_______________________________________________
Aximx50-port mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/aximx50-port

Reply via email to