X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Fnand%2Flpc32xx.c;h=addc323b132599ce5d6be7de8b1e413cd3ae7d84;hb=16b6b5e7a86353dbc0c4823fe3d772c0faca7c1c;hp=653bcde1e9228cd4225e025c6b7eaf496e1e6268;hpb=2ed19d3b9ba6edbc631d26e52b95023c35632e3a;p=fw%2Fopenocd diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c index 653bcde1e..addc323b1 100644 --- a/src/flash/nand/lpc32xx.c +++ b/src/flash/nand/lpc32xx.c @@ -75,8 +75,7 @@ static dmac_ll_t dmalist[(2048/256) * 2 + 1]; NAND_DEVICE_COMMAND_HANDLER(lpc32xx_nand_device_command) { if (CMD_ARGC < 3) { - LOG_WARNING("incomplete 'lpc32xx' nand flash configuration"); - return ERROR_FLASH_BANK_INVALID; + return ERROR_COMMAND_SYNTAX_ERROR; } uint32_t osc_freq; @@ -214,7 +213,7 @@ static int lpc32xx_init(struct nand_device *nand) /* inform calling code about selected bus width */ nand->bus_width = bus_width; - if ((address_cycles != 3) && (address_cycles != 4)) { + if ((address_cycles < 3) || (address_cycles > 5)) { LOG_ERROR("LPC32xx driver doesn't support %i address cycles", address_cycles); return ERROR_NAND_OPERATION_NOT_SUPPORTED; }