aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNemui Trinomius <nemuisan_kawausogasuki@live.jp>2013-12-27 12:25:33 +0900
committerSpencer Oliver <spen@spen-soft.co.uk>2014-01-11 22:19:57 +0000
commitcb6836f9235cd8c57cd08c7cb4121d2328d50155 (patch)
tree74feebefc2c8efeb717c317831fa2d74ab99f7ae /src
parent5baed523908efc45dc9f90253ef2764527ee99d5 (diff)
downloadriscv-openocd-cb6836f9235cd8c57cd08c7cb4121d2328d50155.zip
riscv-openocd-cb6836f9235cd8c57cd08c7cb4121d2328d50155.tar.gz
riscv-openocd-cb6836f9235cd8c57cd08c7cb4121d2328d50155.tar.bz2
lpc2000: fix LPC810 programming support
IAP commands fail on programming LPC810 because it has only 1kByte of SRAM. This patch is fixing cmd51_max_buffer suitable size for LPC810,LPC811 and other LPC1000 series. Tested on a LPC810,LPC812,LPC11u14,and LPC1114(DIP28). Change-Id: Iecec9fd963cb63bdff4a7bd3bbf4f8b1a7c60fbd Signed-off-by: Nemui Trinomius <nemuisan_kawausogasuki@live.jp> Reviewed-on: http://openocd.zylin.com/1843 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/lpc2000.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c
index c0c7e41..259b42f 100644
--- a/src/flash/nor/lpc2000.c
+++ b/src/flash/nor/lpc2000.c
@@ -60,11 +60,11 @@
* - 176x (tested with LPC1768)
*
* lpc4300 (also available as lpc1800 - alias)
- * - 43x2 | 3 | 5 | 7 (tested with 4337)
+ * - 43x2 | 3 | 5 | 7 (tested with LPC4337/LPC4357)
* - 18x2 | 3 | 5 | 7
*
* lpc800:
- * - 810 | 1 | 2 (tested with 812)
+ * - 810 | 1 | 2 (tested with LPC810/LPC812)
*/
typedef enum {
@@ -230,15 +230,15 @@ static int lpc2000_build_sector_list(struct flash_bank *bank)
} else if (lpc2000_info->variant == lpc1700) {
switch (bank->size) {
case 4 * 1024:
- lpc2000_info->cmd51_max_buffer = 1024;
+ lpc2000_info->cmd51_max_buffer = 256;
bank->num_sectors = 1;
break;
case 8 * 1024:
- lpc2000_info->cmd51_max_buffer = 1024;
+ lpc2000_info->cmd51_max_buffer = 512;
bank->num_sectors = 2;
break;
case 16 * 1024:
- lpc2000_info->cmd51_max_buffer = 1024;
+ lpc2000_info->cmd51_max_buffer = 512;
bank->num_sectors = 4;
break;
case 32 * 1024:
@@ -303,9 +303,11 @@ static int lpc2000_build_sector_list(struct flash_bank *bank)
lpc2000_info->cmd51_max_buffer = 1024;
switch (bank->size) {
case 4 * 1024:
+ lpc2000_info->cmd51_max_buffer = 256;
bank->num_sectors = 4;
break;
case 8 * 1024:
+ lpc2000_info->cmd51_max_buffer = 512;
bank->num_sectors = 8;
break;
case 16 * 1024: