eliminate assumptions about [...]
PATCH 1/1 eliminate assumptions about [...]
Hello list,
inside the automatic U-Boot patch tracking system a new ticket [DNX#2006040142000062] was created:
<snip>
Quoted 76 lines
Hi,
the dataflash driver contains a hard-coded partition table which might suit one particular board (which I doubt, however) but certainly isn't generally applicable.
Furthermore, it write-protects the first two partitions, which violates the U-Boot standard of allowing the user enough rope to shoot himself in the foot.
Besides, the dataflash partitions aren't even on sector boundaries (the dataflash chips have rather unusual sector sizes; 528 or 1056 bytes, which makes one wonder what the folks at Atmel are smoking).
The patch below places the entire dataflash in one (writable) partition.
Cheers
AndersSigned-off-by Anders Larsen <[email protected]>CHANGELOG:
Don't write-protect arbitrary areas of Atmel dataflash Patch by Anders Larsen, 13 Oct 2005---
drivers/dataflash.c | 7 ++----- include/dataflash.h | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-)drivers/dataflash.c +2
-5@@ -33,10 +33,7 @@ int cs[][CFG_MAX_DATAFLASH_BANKS] = {/*define the area offsets*/ dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { - {0 ,0x7fff ,FLAG_PROTECT_SET },/* ROM code */ - {0x8000 ,0x1ffff ,FLAG_PROTECT_SET },/* u-boot code */ - {0x20000 ,0x27fff ,FLAG_PROTECT_CLEAR },/* u-boot environment */ - {0x28000 ,0x1fffff ,FLAG_PROTECT_CLEAR },/* data area size to tune */ + {0 ,0x1fffff ,FLAG_PROTECT_CLEAR },/* size tuned below */ };extern void AT91F_SpiInit (void );@@ -110,7 +107,7 @@ int AT91F_DataflashInit (void)break ; }/* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1 ].end = + area_list[NB_DATAFLASH_AREA -1 ].end = (dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size)-1 ;include/dataflash.h +2
-3@@ -37,8 +37,8 @@#include <asm/arch/hardware.h> #include "config.h" -/*number of protected area*/ -#define NB_DATAFLASH_AREA 4 +/*number of areas*/ +#define NB_DATAFLASH_AREA 1/*define the area structure*/ typedef struct { -------------------------------------------------------
Quoted 8 lines
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
</snip>
Your U-Boot support team