diff options
author | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-01 12:53:25 +0000 |
---|---|---|
committer | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-01 12:53:25 +0000 |
commit | 20face5dc2bfe22d6fb747c36ebfc70cad854fa4 (patch) | |
tree | e12a21f97b27b2388bba1ad2372da04f6282b241 /packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch | |
parent | 1c9196a130c2a4f78e89a871deebb3cd9ac60cc8 (diff) |
u-boot-1.1.4: Added additional patches from Atmel AT32STK1000 BSP 2.0.0 CD, mostly LCD/splash support.
u-boot-1.1.4/at32stk1000/ap7000-add-spi-device-and-lcdc-base-address.patch | 112 +
u-boot-1.1.4/at32stk1000/at32ap-add-define-for-sdram-test.patch | 117 +
u-boot-1.1.4/at32stk1000/at32ap-add-framebuffer-address.patch | 11
u-boot-1.1.4/at32stk1000/at32ap-add-spi-initcalls.patch | 16
u-boot-1.1.4/at32stk1000/at32ap-add-system-manager-header-file.patch | 252 ++
u-boot-1.1.4/at32stk1000/atstk1000-add-lcd-and-spi-to-config.patch | 124 +
u-boot-1.1.4/at32stk1000/atstk1000-ltv350qv-display-support.patch | 163 +
u-boot-1.1.4/at32stk1000/atstk1000-spi-support.patch | 98
u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch | 120 +
u-boot-1.1.4/at32stk1000/cmd-bmp-add-gzip-compressed-bmp.patch | 90
u-boot-1.1.4/at32stk1000/fix-mmc-data-timeout.patch | 101
u-boot-1.1.4/at32stk1000/lcd-add-24-bpp-support-and-atmel-lcdc-support.patch | 670 ++++++
u-boot-1.1.4/at32stk1000/lcdc-driver-for-avr32.patch | 755 +++++++
u-boot-1.1.4/at32stk1000/libavr32-add-spi-and-lcd-board-support.patch | 61
u-boot-1.1.4/at32stk1000/spi-driver-for-avr32.patch | 1026 ++++++++++
u-boot_1.1.4.bb | 48
Diffstat (limited to 'packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch')
-rw-r--r-- | packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch b/packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch new file mode 100644 index 0000000000..a1e9fe89e5 --- /dev/null +++ b/packages/u-boot/u-boot-1.1.4/at32stk1000/avr32-boards-fix-flash-read.patch @@ -0,0 +1,120 @@ +Index: u-boot-orig/board/atmel/ngw/flash.c +=================================================================== +--- u-boot-orig.orig/board/atmel/ngw/flash.c 2007-01-03 11:31:44.000000000 +0100 ++++ u-boot-orig/board/atmel/ngw/flash.c 2007-01-03 11:33:13.000000000 +0100 +@@ -161,7 +161,7 @@ + { + unsigned long flags; + uint16_t *base, *p, *s, *end; +- uint16_t word, status; ++ uint16_t word, status,status1; + int ret = ERR_OK; + + if (addr < info->start[0] +@@ -196,20 +196,36 @@ + sync_write_buffer(); + + /* Wait for completion */ +- do { ++ status1 = readw(p); ++ do { + /* TODO: Timeout */ +- status = readw(p); +- } while ((status != word) && !(status & 0x28)); +- ++ status = status1; ++ status1=readw(p); ++ } while ( ((status ^ status1) & 0x40) && // toggle bit has toggled ++ !(status1 & 0x28) // status is "working" ++ ); ++ ++ // We'll need to check once again for toggle bit because the toggle bit ++ // may stop toggling as I/O5 changes to "1" (ref at49bv642.pdf p9) ++ status1=readw(p); ++ status=readw(p); ++ if ((status ^ status1) & 0x40) ++ { ++ printf("Flash write error at address 0x%p: 0x%02x != 0x%02x\n", ++ p, status,word); ++ ret = ERR_PROG_ERROR; ++ writew(0xf0, base); ++ readw(base); ++ break; ++ } ++ // we can now verify status==word if we want to. ++ ++ // is this Product ID Exit command really required?? ++ // --If configuration is 00 (the default) the device is allready in read mode, ++ // and the instruction is not required! + writew(0xf0, base); + readw(base); + +- if (status != word) { +- printf("Flash write error at address 0x%p: 0x%02x\n", +- p, status); +- ret = ERR_PROG_ERROR; +- break; +- } + } + + local_irq_restore(flags); +Index: u-boot-orig/board/atstk1000/flash.c +=================================================================== +--- u-boot-orig.orig/board/atstk1000/flash.c 2007-01-03 11:31:44.000000000 +0100 ++++ u-boot-orig/board/atstk1000/flash.c 2007-01-03 11:33:13.000000000 +0100 +@@ -160,7 +160,7 @@ + { + unsigned long flags; + uint16_t *base, *p, *s, *end; +- uint16_t word, status; ++ uint16_t word, status,status1; + int ret = ERR_OK; + + if (addr < info->start[0] +@@ -195,20 +195,36 @@ + sync_write_buffer(); + + /* Wait for completion */ +- do { ++ status1 = readw(p); ++ do { + /* TODO: Timeout */ +- status = readw(p); +- } while ((status != word) && !(status & 0x28)); +- ++ status = status1; ++ status1=readw(p); ++ } while ( ((status ^ status1) & 0x40) && // toggle bit has toggled ++ !(status1 & 0x28) // status is "working" ++ ); ++ ++ // We'll need to check once again for toggle bit because the toggle bit ++ // may stop toggling as I/O5 changes to "1" (ref at49bv642.pdf p9) ++ status1=readw(p); ++ status=readw(p); ++ if ((status ^ status1) & 0x40) ++ { ++ printf("Flash write error at address 0x%p: 0x%02x != 0x%02x\n", ++ p, status,word); ++ ret = ERR_PROG_ERROR; ++ writew(0xf0, base); ++ readw(base); ++ break; ++ } ++ // we can now verify status==word if we want to. ++ ++ // is this Product ID Exit command really required?? ++ // --If configuration is 00 (the default) the device is allready in read mode, ++ // and the instruction is not required! + writew(0xf0, base); + readw(base); + +- if (status != word) { +- printf("Flash write error at address 0x%p: 0x%02x\n", +- p, status); +- ret = ERR_PROG_ERROR; +- break; +- } + } + + local_irq_restore(flags); |