New board support: Nokia RX-51 aka N900
PATCH v3 5/5 New board support: Nokia RX-51 aka N900
Hi Marek,
as part of the code is written by me I will answer to a couple of the questions
Quoted 10 lines
Dear Pali Roh?r,
Quoted 4 lines
Based on previous work by: Alistair Buxton
Signed-off-by Pali Roh?rCc ?????? ????????Can we please stick to ASCII instead of UTF8?
Cc Ivaylo Dimitrov (if I'm not mistaken)
You are not :). And if it comes to me, it does not matter whether cyrillic or latin will be used.
Quoted 17 lines
Review
Quoted 11 lines
(quoted diff) +11
-0+} + +static void omap3_emu_romcode_call(u32 service_id, u32 *parameters) +{ + u32 i, num_params = *parameters; + u32 *sram_scratch_space = (u32 *)OMAP3_PUBLIC_SRAM_SCRATCH_AREA; + + /* + * copy the parameters to an un-cached area to avoid coherency + * issues + */_WHAT_ ?!
Use
dcache_flush(). The Omap3 rom won't cope with cache memory? Actually -- why do you even do call into ROM ?
Quoted 10 lines
Review
Quoted 10 lines
(quoted diff) +10
-0+ for (i = 0; i < num_params; i++) { + __raw_writel(*parameters, sram_scratch_space); + parameters++; + sram_scratch_space++; + } + + /* Now make the PPA call */ + do_omap3_emu_romcode_call(service_id, OMAP3_PUBLIC_SRAM_SCRATCH_AREA); +} +
That part of the code is ported from existing code in u-boot:
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/omap3/board.c;h=9cee1d9b490692d02129d98470ba7b57b8e61ce2;hb=HEAD#l373
So I can't think of a reason to do it in a different way.
The ROM call is needed to enable workaround for ARM errata 430973. RX-51 being a high secure device does not allow writes to AUX control register outside of the secure world. So, this call is needed to enable IBE bit in AUXCR. I can elaborate more if needed.
Quoted 9 lines
Review
Quoted 8 lines
(quoted diff) +8
-0+ * Cortex-A8(r1p0..r1p2) errata 430973 workaround + * Set IBE bit in Auxiliary Control Register + */ + omap3_update_aux_cr_secure_rx51(1 << 6, 0); + + return 0; +} +
And here is the code where IBE bit (bit 6) set.
Have in mind there is a difference re how parameters are passed compared to beagleboard for example, RX-51 ROM expects first parameter to be the number of remaining parameters+1, while beagleboard(again, just an example) ROM expects only the number of the remaining parameters, so existing function in arch/arm/cpu/armv7/omap3/board.c cannot be called (even if it is not declared static).