mtd: mxc-nand: Warn on unimplemented commands
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 10 Feb 2015 19:00:00 +0000 (20:00 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 11 Mar 2015 22:20:42 +0000 (15:20 -0700)
The PARAM command was long unimplemented and it probably wasn't
noticed because chip probing using only the few bytes returned by the
READID command are good enough in most cases to determine the chip in
use.

Still to notice such a shortcoming earlier in the future would be nice
in case it's something more vital.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/mxc_nand.c

index 0083b4ee4f3377c5a3d9c2963ccd53e15dc21ad5..372e0e38f59b323f4388c6d96416ea5ea35f3c69 100644 (file)
@@ -1160,6 +1160,10 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
                memcpy32_fromio(host->data_buf, host->main_area0, 512);
                host->buf_start = 0;
                break;
+       default:
+               WARN_ONCE(1, "Unimplemented command (cmd=%u)\n",
+                         command);
+               break;
        }
 }