MA-10477[Android] Remove NAND partition definitions and operations in bcb
authorZhang Bo <bo.zhang@nxp.com>
Wed, 18 Oct 2017 06:23:20 +0000 (14:23 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:24 +0000 (02:37 +0800)
Remove NAND partitions definitions in .h file.
Remove NAND related bcb operations.

Change-Id: I38774732e80f0402d63ea6d3f862e385f3e01e31
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
drivers/usb/gadget/command.c
include/configs/imx8qm_arm2_android.h
include/configs/imx8qxp_arm2_android.h
include/configs/imx8qxp_mek_android.h
include/configs/mx6sabreandroid_common.h
include/configs/mx6sxsabreautoandroid.h

index f3254f8..e9f7d29 100644 (file)
@@ -6,12 +6,8 @@
 
 #include <common.h>
 #include <g_dnl.h>
-#ifdef CONFIG_FASTBOOT_STORAGE_NAND
-#include <nand.h>
-#endif
 #include "bcb.h"
 
-#ifndef CONFIG_FASTBOOT_STORAGE_NAND
 int bcb_read_command(char *command)
 {
        int ret = 0;
@@ -64,57 +60,3 @@ int bcb_write_command(char *bcb_command)
        free(p_block);
        return 0;
 }
-#else
-#define ALIGN_BYTES 64
-#define MISC_PAGES 3
-int bcb_read_command(char *command)
-{
-       char read_cmd[128];
-       char *addr_str;
-       char *nand_str;
-       ulong misc_info_size;
-       struct mtd_info *nand = nand_info[0];
-       if (command == NULL)
-               return -1;
-       memset(read_cmd, 0, 128);
-       misc_info_size = MISC_PAGES * nand->writesize;
-       nand_str = (char *)memalign(ALIGN_BYTES, misc_info_size);
-       sprintf(read_cmd, "nand read 0x%x ${misc_nand_offset} \
-                       0x%x", nand_str, misc_info_size);
-       run_command(read_cmd, 0);
-       /* The offset of bootloader_message is 1 PAGE.
-        * The offset of bootloader_message and the size of misc info
-        * need align with user space and recovery.
-        */
-       addr_str = nand_str + nand->writesize;
-       memcpy(command, (char *)addr_str, 32);
-       free(nand_str);
-       return 0;
-}
-int bcb_write_command(char *command)
-{
-       char cmd[128];
-       char *addr_str;
-       char *nand_str;
-       ulong misc_info_size;
-       struct mtd_info *nand = nand_info[0];
-       if (command == NULL)
-               return -1;
-       memset(cmd, 0, 128);
-       misc_info_size = MISC_PAGES * nand->writesize;
-       nand_str = (char *)memalign(ALIGN_BYTES, misc_info_size);
-       sprintf(cmd, "nand read 0x%x ${misc_nand_offset} \
-                       0x%x", nand_str, misc_info_size);
-       run_command(cmd, 0);
-       /* the offset of bootloader_message is 1 PAGE*/
-       addr_str = nand_str +  nand->writesize;
-       memcpy((char *)addr_str, command, 32);
-       /* erase 3 pages which hold BCB struct.*/
-       sprintf(cmd, "nand erase ${misc_nand_offset} 0x%x",nand->erasesize);
-       run_command(cmd, 0);
-       sprintf(cmd, "nand write 0x%x ${misc_nand_offset} 0x%x",nand_str, misc_info_size);
-       run_command(cmd, 0);
-       free(nand_str);
-       return 0;
-}
-#endif
index c84042c..022e7b9 100644 (file)
 #define CONFIG_FSL_FASTBOOT
 #define CONFIG_ANDROID_RECOVERY
 
-#if defined CONFIG_NAND_BOOT
-#define CONFIG_FASTBOOT_STORAGE_NAND
-#elif defined CONFIG_SYS_BOOT_SATA
+#if defined CONFIG_SYS_BOOT_SATA
 #define CONFIG_FASTBOOT_STORAGE_SATA
 #define CONFIG_FASTBOOT_SATA_NO 0
 #else
 #define CONFIG_FASTBOOT_STORAGE_MMC
 #endif
 
-#if defined(CONFIG_FASTBOOT_STORAGE_NAND)
-#define ANDROID_FASTBOOT_NAND_PARTS "16m@64m(boot) 16m@80m(recovery) 1m@96m(misc) 810m@97m(android_root)ubifs"
-#endif
-
 #define CONFIG_CMD_BOOTA
 #define CONFIG_SUPPORT_RAW_INITRD
 #define CONFIG_SERIAL_TAG
index 5e32475..fa60dad 100644 (file)
 #define CONFIG_FSL_FASTBOOT
 #define CONFIG_ANDROID_RECOVERY
 
-#if defined CONFIG_NAND_BOOT
-#define CONFIG_FASTBOOT_STORAGE_NAND
-#elif defined CONFIG_SYS_BOOT_SATA
+#if defined CONFIG_SYS_BOOT_SATA
 #define CONFIG_FASTBOOT_STORAGE_SATA
 #define CONFIG_FASTBOOT_SATA_NO 0
 #else
 #define CONFIG_FASTBOOT_STORAGE_MMC
 #endif
 
-#if defined(CONFIG_FASTBOOT_STORAGE_NAND)
-#define ANDROID_FASTBOOT_NAND_PARTS "16m@64m(boot) 16m@80m(recovery) 1m@96m(misc) 810m@97m(android_root)ubifs"
-#endif
-
 #define CONFIG_CMD_BOOTA
 #define CONFIG_SUPPORT_RAW_INITRD
 #define CONFIG_SERIAL_TAG
index a324c90..88d31ec 100644 (file)
 #define CONFIG_FSL_FASTBOOT
 #define CONFIG_ANDROID_RECOVERY
 
-#if defined CONFIG_NAND_BOOT
-#define CONFIG_FASTBOOT_STORAGE_NAND
-#elif defined CONFIG_SYS_BOOT_SATA
+#if defined CONFIG_SYS_BOOT_SATA
 #define CONFIG_FASTBOOT_STORAGE_SATA
 #define CONFIG_FASTBOOT_SATA_NO 0
 #else
 #define CONFIG_FASTBOOT_STORAGE_MMC
 #endif
 
-#if defined(CONFIG_FASTBOOT_STORAGE_NAND)
-#define ANDROID_FASTBOOT_NAND_PARTS "16m@64m(boot) 16m@80m(recovery) 1m@96m(misc) 810m@97m(android_root)ubifs"
-#endif
-
 #define CONFIG_CMD_BOOTA
 #define CONFIG_SUPPORT_RAW_INITRD
 #define CONFIG_SERIAL_TAG
index 20a3b10..224c647 100644 (file)
@@ -8,8 +8,7 @@
 #ifndef MX6_SABRE_ANDROID_COMMON_H
 #define MX6_SABRE_ANDROID_COMMON_H
 #include "mx_android_common.h"
-/* For NAND we don't support lock/unlock */
-#ifndef CONFIG_NAND_BOOT
+
 #define CONFIG_FASTBOOT_LOCK
 #define FSL_FASTBOOT_FB_DEV "mmc"
 #define FASTBOOT_ENCRYPT_LOCK
 #define CONFIG_CMD_FSL_CAAM_KB
 #define CONFIG_SHA1
 #define CONFIG_SHA256
-#endif
-
-#if defined(CONFIG_NAND_BOOT)
-#define ANDROID_FASTBOOT_NAND_PARTS "16m@64m(boot) 16m@80m(recovery) 1m@96m(misc) 810m@97m(android_root)ubifs"
-#endif
 
 #endif /* MX6_SABRE_ANDROID_COMMON_H */
index fcac0c2..7c19021 100644 (file)
@@ -10,8 +10,6 @@
 #define __MX6SX_SABREAUTO_ANDROID_H
 #include "mx_android_common.h"
 
-/* For NAND we don't support lock/unlock */
-#ifndef CONFIG_NAND_BOOT
 #define CONFIG_FASTBOOT_LOCK
 #define FSL_FASTBOOT_FB_DEV "mmc"
 #define FASTBOOT_ENCRYPT_LOCK
 #define CONFIG_CMD_FSL_CAAM_KB
 #define CONFIG_SHA1
 #define CONFIG_SHA256
-#endif
-
-
-#if defined(CONFIG_FASTBOOT_STORAGE_NAND)
-#define ANDROID_FASTBOOT_NAND_PARTS "16m@64m(boot) 16m@80m(recovery) 1m@96m(misc) 810m@97m(android_root)ubifs"
-#endif
 
 #endif