public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Ивайло Димитров" <freemangordon@abv.bg>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 5/5] New board support: Nokia RX-51 aka N900
Date: Sun, 14 Oct 2012 13:04:25 +0300 (EEST)	[thread overview]
Message-ID: <436541957.26643.1350209065952.JavaMail.apache@mail83.abv.bg> (raw)

 Hi Marek,

as part of the code is written by me I will answer to a couple of the questions


 >Dear Pali Roh?r,
 >
 >> Based on previous work by: Alistair Buxton 
 >> 
 >> Signed-off-by: Pali Roh?r 
 >> Cc: ?????? ???????? 
 >
 >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.

 >> +}
 >> +
 >> +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 ?
 >
 >> +	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.

 >> +	 * 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).

             reply	other threads:[~2012-10-14 10:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 10:04 Ивайло Димитров [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-24 14:27 [U-Boot] [PATCH 00/14] Nokia RX-51 support Pali Rohár
2012-10-13 19:31 ` [U-Boot] [PATCH v3 0/5] " Pali Rohár
2012-10-13 19:32   ` [U-Boot] [PATCH v3 5/5] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-10-14  0:06     ` Marek Vasut
2012-10-14  8:31       ` Albert ARIBAUD
2012-10-16 14:43       ` Pali Rohár
2012-10-16 14:55         ` Marek Vasut
2012-10-16 15:46           ` Pali Rohár
2012-10-16 15:57             ` Marek Vasut
2012-10-16 16:15               ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=436541957.26643.1350209065952.JavaMail.apache@mail83.abv.bg \
    --to=freemangordon@abv.bg \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox