]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_flash.c
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
[u-boot] / common / cmd_flash.c
index 9f27ab0dd94df253472f412dc1c7671b4a940cf3..3773412549bd66c7d2238b3e93a65bfc27154de5 100644 (file)
@@ -468,17 +468,19 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong bank;
        int i, n, sect_first, sect_last;
 #endif /* CONFIG_SYS_NO_FLASH */
+#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
        ulong addr_first, addr_last;
-       int p;
+#endif
 #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
        struct mtd_device *dev;
        struct part_info *part;
        u8 dev_type, dev_num, pnum;
 #endif
-       int rcode = 0;
 #ifdef CONFIG_HAS_DATAFLASH
        int status;
 #endif
+       int p;
+       int rcode = 0;
 
        if (argc < 3) {
                cmd_usage(cmdtp);