Hasjim Williams | 6 Dec 2007 04:33

Redboot - Cirrus EP9315 and Spansion S29GL512N problem

Hello everyone,

I'm having problems getting my ARM920T based EP9315 board to work with
64MB flash.  We have 64MB of RAM onboard.  We previously had S29GL128N
and S29GL256N parts on the board, and haven't been able to get Redboot
to boot up correctly with the S29GL512N.  It works fine with the
S29GL256N or S29GL128N still.

As soon as it boots up, it spits out this error message, constantly:

#dd$T0a0f:f06a0100;0d:f07e0400;#dd$T0a0f:f06a0100;0d:f07e0400;
#dd$T0a0f:f06a0100;0d:f07e0400;#dd$T0a0f:f06a0100;0d:f07e0400;

Can anyone suggest anything that I'm missing:

packages/devs/flash/arm/edb9312/current/cdl/flash_edb9312_a_amd.cdl:

    requires      CYGHWR_DEVS_FLASH_AMD_S29GL128N
    requires      CYGHWR_DEVS_FLASH_AMD_S29GL256N
    requires      CYGHWR_DEVS_FLASH_AMD_S29GL512N

packages/hal/arm/arm9/ep93xx/current/include/conf/mlt_arm9_edb9315a_romram.ldi:

MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x10000000
    rom : ORIGIN = 0x60000000, LENGTH = 0x8000000
}

packages/hal/arm/arm9/ep93xx/current/include/conf/mlt_arm9_edb9315a_romram.h:
(Continue reading)

Manfred Gruber | 6 Dec 2007 05:29

Re: Redboot - Cirrus EP9315 and Spansion S29GL512N problem

hi !

i have worked for a company where ep93xx and spansion flashes are used, please 
look at http://dev.contec.at, there i have made a redboot bootloader which 
can handle such flashes, but i have used flash_v2 branche, so it will not 
help u.

> #dd$T0a0f:f06a0100;0d:f07e0400;#dd$T0a0f:f06a0100;0d:f07e0400;
> #dd$T0a0f:f06a0100;0d:f07e0400;#dd$T0a0f:f06a0100;0d:f07e0400;

this things i have only seen if the mmu is set up wrong, so maybe it helps 
check your mmu settings in redboot. maybe the 512 chip adresses obverlap 
somewhere...

regards manfred
 mfg
	Manfred Gruber
	Software Engineering
	m.gruber <at> tirol.com
	http://www.manfred-gruber.at.tt
	http://www.myspace.com/fredl_grma  

Am Thursday 06 December 2007 schrieb Hasjim Williams:
> Hello everyone,
>
> I'm having problems getting my ARM920T based EP9315 board to work with
> 64MB flash.  We have 64MB of RAM onboard.  We previously had S29GL128N
> and S29GL256N parts on the board, and haven't been able to get Redboot
> to boot up correctly with the S29GL512N.  It works fine with the
> S29GL256N or S29GL128N still.
(Continue reading)

Hasjim Williams | 6 Dec 2007 06:29

Re: Redboot - Cirrus EP9315 and Spansion S29GL512N problem

I think I found the problem (which was MMU related):

--- packages/hal/arm/arm9/ep93xx/current/include/hal_platform_setup.h
+++ packages/hal/arm/arm9/ep93xx/current/include/hal_platform_setup.h
 <at>  <at>  -494,20 +494,20  <at>  <at> 
     //
     // Create a read-write mapping of FLASH at virtual address
     0x6000_0000.
     //
     add     r1, r0, #0x00001800
 #if defined(HAL_PLATFORM_EP9301) || defined(HAL_PLATFORM_EP9302)
     mov     r2, #0x00000040
 #else
     // If you are using a Flash size of 64MB you need this value here
-    // mov     r2, #0x00000100 // 64MB
-    mov     r2, #0x00000080 // 32MB
+    mov     r2, #0x00000100 // 64MB
+    // mov     r2, #0x00000080 // 32MB
#endif
     orr     r3, r12, #0x00000012
     orr     r3, r3, #0x00000c00
 map_flash_6:
         str     r3, [r1], #4
         add     r3, r3, #0x00100000
         subs    r2, r2, #4
         bne     map_flash_6

Thanks for your help...  Just didn't know where to look in redboot
source.

(Continue reading)

Hasjim Williams | 7 Dec 2007 00:29

Re: Redboot - Cirrus EP9315 and Spansion S29GL512N problem

We're still having problems...

Is there anywhere else in the code that I need to be looking?

On Thu, 06 Dec 2007 15:29:22 +1000, "Hasjim Williams"
<sourceware.ecos-devel <at> lists.futaris.org> said:
> I think I found the problem (which was MMU related):
> 
> --- packages/hal/arm/arm9/ep93xx/current/include/hal_platform_setup.h
> +++ packages/hal/arm/arm9/ep93xx/current/include/hal_platform_setup.h
>  <at>  <at>  -494,20 +494,20  <at>  <at> 
>      //
>      // Create a read-write mapping of FLASH at virtual address
>      0x6000_0000.
>      //
>      add     r1, r0, #0x00001800
>  #if defined(HAL_PLATFORM_EP9301) || defined(HAL_PLATFORM_EP9302)
>      mov     r2, #0x00000040
>  #else
>      // If you are using a Flash size of 64MB you need this value here
> -    // mov     r2, #0x00000100 // 64MB
> -    mov     r2, #0x00000080 // 32MB
> +    mov     r2, #0x00000100 // 64MB
> +    // mov     r2, #0x00000080 // 32MB
> #endif
>      orr     r3, r12, #0x00000012
>      orr     r3, r3, #0x00000c00
>  map_flash_6:
>          str     r3, [r1], #4
>          add     r3, r3, #0x00100000
(Continue reading)

Manfred Gruber | 7 Dec 2007 00:51

Re: Redboot - Cirrus EP9315 and Spansion S29GL512N problem

hi !

IMHO, there were 2 version from cirrus of the bootloader, one where the mmu 
tables were set up in C code and one version where mmu tables where set up in 
asm code.

i used the asm version, hal_platform_setup.h --> BuildPagetable:
do not use my version on dev.contec.at because i have added some asm code 
which detects which flash is connected.

but in BuildPagetable, IMHO in r2 the size of the flash has to be set:

    //
    // Create a read-write mapping of FLASH at virtual address 0x6000_0000.
    //
    add     r1, r0, #0x00001800
#if defined(HAL_PLATFORM_EP9301) || defined(HAL_PLATFORM_EP9302) 
    mov     r2, #0x00000040
#else 
    mov     r2, #0x00000080
#endif 
    orr     r3, r12, #0x00000012
    orr     r3, r3, #0x00000c00

and

    //
    // Create a read-write mapping of FLASH at virtual address 0xe000_0000.
    //
    add     r1, r0, #0x00003800
(Continue reading)


Gmane