From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] arm: cm4008, cm41xx: Fix ROM relocation
Date: Thu, 12 Jul 2012 21:37:10 +0200 [thread overview]
Message-ID: <20120712213710.4d4f8ded@lilith> (raw)
In-Reply-To: <4FF5B064.2010905@gmail.com>
Hi Yann,
On Thu, 05 Jul 2012 17:19:00 +0200,
"Andreas Bie?mann" <andreas.devel@googlemail.com> wrote:
> Dear Yann Vernier,
>
> On 05.07.2012 15:22, Yann Vernier wrote:
> > Changed CONFIG_SYS_TEXT_BASE to actual address (required for
> > board_init_f) and moved it into cm4008.h, along with a warning that it
> > must match CONFIG_SYS_FLASH_BASE (since lowlevel_init relocates there).
> > lowlevel_init now uses CONFIG_SYS_FLASH_BASE to map ROM, although the
> > second bank is still mapped at 0x02400000-0x027fffff.
> > ---
> > Changes for v2:
> > - Update to use CONFIG_SYS_FLASH_ constants only (no PHYS_FLASH)
> > - Use tabs where appropriate
> > - Update cm41xx also
> > - Explain the lowlevel_init change
> >
> > Signed-off-by: Yann Vernier <yann.vernier@orsoc.se>
> > ---
> > arch/arm/cpu/arm920t/ks8695/lowlevel_init.S | 9 +++++++--
> > board/cm4008/config.mk | 1 -
> > board/cm41xx/config.mk | 1 -
> > include/configs/cm4008.h | 7 ++++---
> > include/configs/cm41xx.h | 7 ++++---
> > 5 files changed, 15 insertions(+), 10 deletions(-)
> > delete mode 100644 board/cm4008/config.mk
> > delete mode 100644 board/cm41xx/config.mk
> >
> > diff --git a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> > index df13de6..7bb9ede 100644
> > --- a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> > +++ b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> > @@ -92,11 +92,16 @@ lowlevel_init:
> > * ram from address 0, and flash at 32MB.
> > */
> > ldr r1, =(KS8695_IO_BASE+KS8695_MEM_CTRL0)
> > + /* Remap flash memory to 768MB size, such that it covers
> > + both 0 (boot) and 512MB (run) regions */
> > ldr r2, =0xbfc00040
> > str r2, [r1] /* large flash map */
> > - ldr pc, =(highflash+0x02000000-0x00f00000) /* jump to high flash address */
> > + /* Relies on CONFIG_SYS_FLASH_BASE==CONFIG_SYS_TEXT_BASE */
> > + ldr pc, =(highflash) /* jump to high flash address */
> > highflash:
> > - ldr r2, =0x8fe00040
> > + /* Move ROM to high address, and reconfigure to 4MiB size */
> > + ldr r2, =(((CONFIG_SYS_FLASH_BASE+0x3f0000)<<(22-16))| \
> > + (CONFIG_SYS_FLASH_BASE>>(16-12))|0x40)
>
> again some magic ... Well I do not know this architecture in detail and
> can nothing say about the register footprint. I just hope somebody with
> access to tech spec of this cpu is able to understand how 'Move ROM to
> high address, and reconfigure to 4MiB size' is related to this magic.
>
> Beside that I tend to ack this patch. Yann, have you some proposal to
> resolve my doubts?
Did not hear any answer to this. Do we get a V3 for this patch?
Or should I assume that the pversions to pick are V2 for 1/3 and 2/3,
and V3 for 3/3?
Amicalement,
--
Albert.
next prev parent reply other threads:[~2012-07-12 19:37 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 8:05 [U-Boot] [PATCH 3/3] cm4008: use common cfi_flash support Yann Vernier
2012-07-05 9:48 ` Andreas Bießmann
2012-07-05 13:11 ` [U-Boot] [PATCH v2] arm: cm4008, cm41xx: " Yann Vernier
2012-07-05 15:04 ` Andreas Bießmann
2012-07-06 8:27 ` [U-Boot] [PATCH v3] " Yann Vernier
2012-07-06 8:47 ` Andreas Bießmann
2012-07-06 11:33 ` Albert ARIBAUD
2012-08-09 13:33 ` [U-Boot] [PATCH 10/11] arm: ks8695: document bus speed Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 11/11] arm: cm4008, cm41xx: read MAC address from flash Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 00/11] ks8695 (cm4008, cm41xx) bugfixes, constant removals, configuration generalized Yann Vernier
2012-10-04 9:15 ` Albert ARIBAUD
2012-10-05 12:09 ` [U-Boot] [PATCH 00/11] ks8695 (cm4008, cm41xx) bugfixes, constant removals, configuration generalized (repost) Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 01/11] arm: ks8695: use defined constants for UART Yann Vernier
2012-10-26 21:34 ` Albert ARIBAUD
2012-10-05 12:09 ` [U-Boot] [PATCH 02/11] arm: ks8695: more macros for register values Yann Vernier
2012-10-18 18:57 ` Albert ARIBAUD
2012-11-19 11:55 ` [U-Boot] [PATCH] " Yann Vernier
2012-11-19 12:29 ` Yann Vernier
2012-11-20 0:05 ` Marek Vasut
2012-10-05 12:09 ` [U-Boot] [PATCH 03/11] arm: ks8695eth: Use MAC address from environment Yann Vernier
2012-10-18 19:00 ` Albert ARIBAUD
2012-10-18 20:55 ` Joe Hershberger
2012-10-19 8:02 ` Yann Vernier
2012-10-26 21:37 ` Albert ARIBAUD
2012-11-19 11:42 ` Yann Vernier
2012-12-01 19:23 ` Joe Hershberger
2012-10-05 12:09 ` [U-Boot] [PATCH 04/11] arm: cm4008, cm41xx: use common cfi_flash support Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 05/11] arm: cm4008, cm41xx: set gd->ram_size in dram_init Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 06/11] arm: cm4008, cm41xx: Fix ROM relocation Yann Vernier
2012-10-18 19:09 ` Albert ARIBAUD
2012-10-19 8:08 ` Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 07/11] arm: ks8695/cm4008/cm41xx: Parameterize SDRAM Yann Vernier
2012-10-18 19:11 ` Albert ARIBAUD
2012-10-05 12:09 ` [U-Boot] [PATCH 08/11] arm: cm4008, cm41xx: don't define to 1 Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 09/11] arm: ks8695/cm4xxx: don't reconfigure switch Yann Vernier
2012-10-18 19:13 ` Albert ARIBAUD
2012-10-05 12:09 ` [U-Boot] [PATCH 10/11] arm: ks8695: document bus speed Yann Vernier
2012-10-05 12:09 ` [U-Boot] [PATCH 11/11] arm: cm4008, cm41xx: read MAC address from flash Yann Vernier
2012-10-18 19:14 ` Albert ARIBAUD
2012-11-10 8:03 ` [U-Boot] [PATCH 00/11] ks8695 (cm4008, cm41xx) bugfixes, constant removals, configuration generalized (repost) Albert ARIBAUD
2012-11-13 12:46 ` Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 07/11] arm: ks8695/cm4008/cm41xx: Parameterize SDRAM Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 08/11] arm: cm4008, cm41xx: don't define to 1 Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 09/11] arm: ks8695/cm4xxx: don't reconfigure switch Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 03/11] arm: ks8695eth: Use MAC address from environment Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 04/11] arm: cm4008, cm41xx: use common cfi_flash support Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 06/11] arm: cm4008, cm41xx: Fix ROM relocation Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 05/11] arm: cm4008, cm41xx: set gd->ram_size in dram_init Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 02/11] arm: ks8695: more macros for register values Yann Vernier
2012-08-09 13:33 ` [U-Boot] [PATCH 01/11] arm: ks8695: use defined constants for UART Yann Vernier
2012-07-05 13:22 ` [U-Boot] [PATCH v2] arm: cm4008, cm41xx: Fix ROM relocation Yann Vernier
2012-07-05 13:41 ` Yann Vernier
2012-07-05 15:19 ` Andreas Bießmann
2012-07-12 19:37 ` Albert ARIBAUD [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-19 21:59 Yann Vernier
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=20120712213710.4d4f8ded@lilith \
--to=albert.u.boot@aribaud.net \
--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