Add support for Eukrea CPU9260 SBC
PATCH 1/1 Add support for Eukrea CPU9260 SBC
CPUAT91 is built around Atmel's AT91SAM9260 and has up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and includes a 10/100 Ethernet PHY in RMII mode.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/eukrea/cpu9260/Makefile | 59 +++++++ board/eukrea/cpu9260/config.mk | 1 + board/eukrea/cpu9260/cpu9260.c | 209 +++++++++++++++++++++++ board/eukrea/cpu9260/cpu9260_led.c | 46 +++++ cpu/arm926ejs/at91/lowlevel_init.S | 2 +- include/configs/cpu9260.h | 326 ++++++++++++++++++++++++++++++++++++ 9 files changed, 650 insertions(+), 1 deletions(-) create mode 100644 board/eukrea/cpu9260/Makefile create mode 100644 board/eukrea/cpu9260/config.mk create mode 100644 board/eukrea/cpu9260/cpu9260.c create mode 100644 board/eukrea/cpu9260/cpu9260_led.c create mode 100644 include/configs/cpu9260.h
MAINTAINERS +4 -0
@@ -515,6 +515,10 @@ Dirk Behme <[email protected]> omap3_beagle ARM CORTEX-A8 (OMAP3530 SoC) +Eric Benard <[email protected]> + + cpu9260 ARM926EJS (AT91SAM9260 SoC) + Rishi Bhattacharya <[email protected]> omap5912osk ARM926EJS
MAKEALL +1 -0
@@ -592,6 +592,7 @@ LIST_at91=" \ at91sam9m10g45ek \ at91sam9rlek \ cmc_pu2 \ + cpu9260 \ csb637 \ kb9202 \ meesc \
Makefile +3 -0
@@ -2813,6 +2813,9 @@ at91sam9rlek_config : unconfig fi; @$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91 +cpu9260_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs cpu9260 eukrea at91 + meesc_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
board/eukrea/cpu9260/Makefile new file +59 -0
59 lines not on this page · raw message
board/eukrea/cpu9260/config.mk new file +1 -0
@@ -0,0 +1 @@ +TEXT_BASE = 0x21f00000
board/eukrea/cpu9260/cpu9260.c new file +209 -0
209 lines not on this page · raw message
board/eukrea/cpu9260/cpu9260_led.c new file +46 -0
46 lines not on this page · raw message
cpu/arm926ejs/at91/lowlevel_init.S +1 -1
@@ -194,7 +194,7 @@ SMRDATA: .word CONFIG_SYS_PIOD_PPUDR_VAL .word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR) .word CONFIG_SYS_PIOD_PPUDR_VAL -#elif defined(CONFIG_AT91SAM9261) +#elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9260) .word (AT91_BASE_SYS + AT91_PIOC + PIO_PDR) .word CONFIG_SYS_PIOC_PDR_VAL1 .word (AT91_BASE_SYS + AT91_PIOC + PIO_PUDR)
include/configs/cpu9260.h new file +326 -0
326 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 1/1 Add support for Eukrea CPU9260 SBC
Dear Eric Benard,
Quoted 3 lines · In message <[email protected]> you wrote:
CPUAT91 is built around Atmel's AT91SAM9260 and has up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and includes a 10/100 Ethernet PHY in RMII mode.
...
board/eukrea/cpu9260/cpu9260.c line 170
Quoted 6 lines
board/eukrea/cpu9260/cpu9260.c new file +6
-0+int dram_init (void ) +{ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; + gd->bd->bi_dram[0 ].size =PHYS_SDRAM_SIZE ; +return 0 ; +}
How about using get_ram_size() for auto-sizing and testing?
cpu/arm926ejs/at91/lowlevel_init.S SMRDATA: · line 197
Quoted 10 lines
cpu/arm926ejs/at91/lowlevel_init.S +1
-1@@ -194,7 +194,7 @@ SMRDATA: .word CONFIG_SYS_PIOD_PPUDR_VAL .word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR) .word CONFIG_SYS_PIOD_PPUDR_VAL -#elif defined(CONFIG_AT91SAM9261) +#elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9260)
Please swap to keep sorted:
#elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261)
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Common sense and a sense of humor are the same thing, moving at
different speeds. A sense of humor is just common sense, dancing.
- Clive JamesPATCH 1/1 Add support for Eukrea CPU9260 SBC
Dear Wolfgang Denk,
Wolfgang Denk a ?crit :
Quoted 5 lines
Quoted 3 lines · In message <[email protected]> you wrote:
CPUAT91 is built around Atmel's AT91SAM9260 and has up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and includes a 10/100 Ethernet PHY in RMII mode.
...
Quoted 9 lines
board/eukrea/cpu9260/cpu9260.c line 170
Quoted 6 lines
board/eukrea/cpu9260/cpu9260.c new file +6
-0+int dram_init (void ) +{ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; + gd->bd->bi_dram[0 ].size =PHYS_SDRAM_SIZE ; +return 0 ; +}How about using
get_ram_size()for auto-sizing and testing?
the RAM needs to be properly initialized in low level before being able to test it so its geometry (rom/columns) and timings must be known before being able to detect its size using get_ram_size.
I'm not sure it's possible to use a generic geometry/timings there else u-boot may never relocate.
How would you do this ?
Quoted 13 lines
cpu/arm926ejs/at91/lowlevel_init.S SMRDATA: · line 197
Quoted 10 lines
cpu/arm926ejs/at91/lowlevel_init.S +1
-1@@ -194,7 +194,7 @@ SMRDATA: .word CONFIG_SYS_PIOD_PPUDR_VAL .word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR) .word CONFIG_SYS_PIOD_PPUDR_VAL -#elif defined(CONFIG_AT91SAM9261) +#elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9260)Please swap to keep sorted:
Quoted 2 lines
#elif
defined(CONFIG_AT91SAM9260)||defined(CONFIG_AT91SAM9261)
OK will do.
Thanks
Eric
PATCH 1/1 Add support for Eukrea CPU9260 SBC
Dear =?ISO-8859-1?Q?Eric_B=E9nard?=,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines
How about using
get_ram_size()for auto-sizing and testing?the RAM needs to be properly initialized in low level before being able to test it so its geometry (rom/columns) and timings must be known before being able to detect its size using
get_ram_size.
Indeed. That's the same on all board - including the many that successfully use get_ram_size()
Quoted 3 lines
I'm not sure it's possible to use a generic geometry/timings there else u-boot may never relocate.
How would you do this ?
Well, normally you have 2 or 3 row/col combinations that have to be considered; you try these in turn until you find one where get_ram_size() returns a non-zero size; if several work, you use that which returns the biggest size.
See for example "board/tqc/tqm8xx/tqm8xx.c" - it tries 8, 9 and 10 column mode...
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lady Nancy Astor:
"Winston, if you were my husband, I'd put poison in your coffee."
Winston Churchill:
"Nancy, if you were my wife, I'd drink it."PATCH 1/1 Add support for Eukrea CPU9260 SBC
Dear Wolfgang,
Wolfgang Denk a ?crit :
Quoted 4 lines
Quoted 3 lines
I'm not sure it's possible to use a generic geometry/timings there else u-boot may never relocate.
How would you do this ?
Quoted 8 lines
Well, normally you have 2 or 3 row/col combinations that have to be considered; you try these in turn until you find one where
get_ram_size()returns a non-zero size; if several work, you use that which returns the biggest size.See for example "
board/tqc/tqm8xx/tqm8xx.c" - it tries 8, 9 and 10 column mode...
I've tried something very close to what is done in tqm8xx but I don't manage to get something reliable : either it hangs or I get data abort.
After checking the datasheet, I don't understand how we can change the geometry of this SDRAM controler while running from SDRAM : each time we increase the colum number, the address are modified thus we can't execute any more u-boot's code as it's no more where we are expecting it.
Eric
PATCH 1/1 Add support for Eukrea CPU9260 SBC
Quoted 5 lines
I've tried something very close to what is done in tqm8xx but I don't manage to get something reliable : either it hangs or I get data abort.
After checking the datasheet, I don't understand how we can change the geometry of this SDRAM controler while running from SDRAM
No, you can't. That part must be done while you run from flash. Actually, this is done in cpu/arm926ejs/at91/lowlevel_init.S, in the table SMRDATA1.
So, with the current code base, you can't autodetect ram size on the atmel 926x.
I have the same problem, as I have boards that ship as either 64M or 128M. I'd configure for 128M and look for aliases, reconfiguring for 64M if needed. This can be done in lowlevel_init.S or by setting up a temporary C environment with sp in static RAM and doing it in C.
In both cases, this doesn't fit the current code base and some refactoring would be needed to go mainline.
/alessandro
PATCH 1/1 Add support for Eukrea CPU9260 SBC
Hi Alessandro,
Alessandro Rubini a ?crit :
Quoted 11 lines
So, with the current code base, you can't autodetect ram size on the atmel 926x.
I have the same problem, as I have boards that ship as either 64M or 128M. I'd configure for 128M and look for aliases, reconfiguring for 64M if needed. This can be done in
lowlevel_init.Sor by setting up a temporary C environment with sp in static RAM and doing it in C.In both cases, this doesn't fit the current code base and some refactoring would be needed to go mainline.
OK, in our case auto detection is not required so my updated patch gives the choice between both configurations through the Makefile.
Eric
PATCH 1/1 Add support for Eukrea CPU9260 SBC
In reply to Alessandro RubiniDear Alessandro Rubini,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 5 lines
I've tried something very close to what is done in tqm8xx but I don't manage to get something reliable : either it hangs or I get data abort.
After checking the datasheet, I don't understand how we can change the geometry of this SDRAM controler while running from SDRAM
Quoted 6 lines
No, you can't. That part must be done while you run from flash. Actually, this is done in
cpu/arm926ejs/at91/lowlevel_init.S, in the table SMRDATA1.So, with the current code base, you can't autodetect ram size on the atmel 926x.
Argh. So this should be fixed.
Quoted 4 lines
I have the same problem, as I have boards that ship as either 64M or 128M. I'd configure for 128M and look for aliases, reconfiguring for 64M if needed. This can be done in
lowlevel_init.Sor by setting up a temporary C environment with sp in static RAM and doing it in C.
Other architectures (like PPC) do all this in C. This should be possible on ARM, too. It would be good to reuse existing and well-tested code like get_ram_size() which is fast and still a pretty reliable memory tester.
Quoted 2 lines
In both cases, this doesn't fit the current code base and some refactoring would be needed to go mainline.
Seems so :-(
Who is going to attack this - you, Alessandro?
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Operating-system software is the program that orchestrates all the basic functions of a computer. - The Wall Street Journal, Tuesday, September 15, 1987, page 40
PATCH 1/1 Add support for Eukrea CPU9260 SBC
Quoted 4 lines
Quoted 2 lines
So, with the current code base, you can't autodetect ram size on the atmel 926x.
Argh. So this should be fixed.
Yes.
Quoted 2 lines
Other architectures (like PPC) do all this in C. This should be possible on ARM, too.
Everything is possible. I fear it's not trivial to make a generic ARM implementation, since each platform has its own way to bring up stuff.
Quoted 1 line
Who is going to attack this - you, Alessandro?
I'm going to do it for 9263 next week, for a project I'm following. Then I'll be glad to study the general situation and see if I can suggest anything useful.
/alessandro
PATCH 1/1 Add support for Eukrea CPU9260 SBC
In reply to Eric BénardDear =?ISO-8859-1?Q?Eric_B=E9nard?=,
Quoted 5 lines · In message <[email protected]> you wrote:
After checking the datasheet, I don't understand how we can change the geometry of this SDRAM controler while running from SDRAM : each time we increase the colum number, the address are modified thus we can't execute any more u-boot's code as it's no more where we are expecting it.
You cannot - that's obvious. You must not meddle with the SDRAM controler at all while running from this bank of memory. This code should be running from flash (or SRAM, or wherever you boot from).
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If programming was easy, they wouldn't need something as complicated
as a human being to do it, now would they?
- L. Wall & R. L. Schwartz, _Programming Perl_