All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Chemparathy <cyril@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM1176: Coexist with other ARM1176 platforms
Date: Fri, 30 Apr 2010 15:43:36 -0400	[thread overview]
Message-ID: <4BDB32E8.7080902@ti.com> (raw)
In-Reply-To: <4BD590D5.200@bumblecow.com>

Hi Tom,

[...]
>> +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
> 
> CONFIG_SKIP_LOWLEVEL_INIT is not used in the other patches.
> Why is this needed ?
> board/samsung/samsung/smdk6400 has a lowlevel_init.o function.
> It is confusing why this function is being if-def and not the real
> lowlevel_init..

Will remove.

>> +#ifdef CONFIG_ENABLE_MMU
> 
> This logic is may not be quite correct
>  From include/configs/smdk6400.h
> #if !defined(CONFIG_NAND_SPL) && (TEXT_BASE >= 0xc0000000)
> #define CONFIG_ENABLE_MMU
> #endif
> Please check

Thanks.  This logic was broken.

I have reworked this logic as follows, and removed the ifdef:

-       adr     r1, mmu_disable_phys
-       /* We presume we're within the first 1024 bytes */
-       and     r1, r1, #0x3fc
-       ldr     r2, _TEXT_PHY_BASE
-       ldr     r3, =0xfff00000
-       and     r2, r2, r3
-       orr     r2, r2, r1
+       adr     r2, mmu_disable_phys
+       sub     r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - TEXT_BASE)

The earlier implementation was masking out too many bits in trying to
convert the jump address from virtual to physical.  Any comments on this
change?

[...]
>>  	/* Prepare to disable the MMU */
>>  	adr	r1, mmu_disable_phys
>>  	/* We presume we're within the first 1024 bytes */
>> @@ -187,20 +189,60 @@ mmu_disable:
>>  	nop
>>  	nop
>>  	mov	pc, r2
>> +mmu_disable_phys:
>> +#else
>> +	mcr	p15, 0, r0, c1, c0, 0
> 
> Are the noop's above needed here?

I think the original author's intent was to entirely occupy one cache
line.  I don't know enough about the s3c64xx architecture to comment.

[...]
>>  	mcr	p15,0,r0,c15,c2,4       @ 256M (0x70000000 - 0x7fffffff)
>
> This comment '@ 256 .. ' is no longer valid.

Thanks. Will fix.

[...]
>> -	/* move to reserved a couple spots for abort stack */
>> +	/* reserved a couple spots for abort stack */
> 
> The old comment makes more sense.
> Revert this.

Thanks. Will fix.

[...]
>> +#define CONFIG_SKIP_RELOCATE_UBOOT
> 
> There is logic later in this file to undef this value.
> This is likely an error.
> If it isn't, add a comment.

I have removed the subsequent undef and verified that the generated
disassembly of start.S remains the same (with the exception of the
address computation change above) for both usb and non-usb smdk6400 builds.


Thanks
Cyril.

      reply	other threads:[~2010-04-30 19:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-11 17:17 [U-Boot] [PATCH] ARM1176: Coexist with other ARM1176 platforms Cyril Chemparathy
2010-03-14 20:53 ` Tom
2010-03-14 21:47   ` Chemparathy, Cyril
2010-03-16 13:09     ` Tom
2010-03-16 19:16       ` Chemparathy, Cyril
2010-04-26 13:10 ` Tom Rix
2010-04-30 19:43   ` Cyril Chemparathy [this message]

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=4BDB32E8.7080902@ti.com \
    --to=cyril@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.