
Dear Mateusz Kulikowski,
On 11/01/2013 08:26 PM, Mateusz Kulikowski wrote:
On 29.10.2013 10:12, Andreas Bießmann wrote:
+/*define the area offsets*/ +dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
- {0x00000000, 0x00001FFF, FLAG_PROTECT_SET, 0, "Bootstrap"},
- {0x00002000, 0x00003FFF, FLAG_PROTECT_CLEAR, 0, "Environment"},
- {0x00004000, 0xFFFFFFFF, FLAG_PROTECT_SET, 0, "U-Boot"},
+};
I would really like to see that removed. The dataflash thing is another part on my todo list. The common mtd code can handle these devices too (see for example at91sam9n12ek, at91sam9x5ek, ethernut5 sam5d3xek and top9000). I did some short testing on that for at91sam9263ek (at home, never sent to the list) and it worked basically. Will see if I find it this evening, clean up and post it this evening CET.
What kind of Dataflash have you used?
Dataflash on Calao (at45db021b) does not have read-id command. It also has different command set than more recent version (*021d). It may be tricky to probe and operate it without modifying SPI drivers.
Sorry, haven't realized that. I have to check which dataflash was attached to that board.
For now I will move partition code to "main" board file; If I figure out how to handle that Dataflash - I'll update the code.
fine!
<snip>
As for the memory concerns, I did little test:
- enabled debugs in board_[fr].c (they print nicely memory layout),
- Filled u-boot binary with commands/garbage to reach max size supported
by AT91bootstrap (200704)
- Flashed, booted the board. Below - log (parts):
<log> U-Boot 2013.10-00122-g509dca7-dirty (Nov 01 2013 - 20:09:46)
U-Boot code: 23F00000 -> 23F2C570 BSS: -> 23F31498
Your code uses 23f00000 up to 23f31498, is 197.15 KiB
CPU: AT91SAM9263 Crystal frequency: 12 MHz CPU clock : 180 MHz Master clock : 90 MHz DRAM: Monitor len: 00031498 Ram size: 04000000 Ram top: 24000000 TLB table from 23ff0000 to 23ff4000 Reserving 197k for U-Boot at: 23fbe000 Reserving 152k for malloc() at: 23f98000 Reserving 84 Bytes for Board Info at: 23f97fac Reserving 176 Bytes for Global Data at: 23f97efc
The relocated environment will use the top of RAM down to 23f97efc
RAM Configuration: Bank #0: 20000000 DRAM: 64 MiB New Stack Pointer is: 23f97ed0 Relocation Offset is: 000be000 Relocating to 23fbe000, new gd at 23f97efc, sp at 23f97ed0 image_copy: 23f00000 23f2c570 <- @setup_reloc() image_copy: 23fbe000 23fea570 <- @board_init_r() WARNING: Caches not enabled Now running in RAM - U-Boot at: 23fbe000
</log>
If I understand correctly, this means that we have plenty of space between start of stack, and end of non-relocated U-Boot (.
_plenty_ of space is not true here (in my understanding), but 410 KiB will be enough ;)
<snip>
Best regards
Andreas Bießmann