summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Bo <bo.zhang@nxp.com>2017-10-18 14:23:20 +0800
committerZhang Bo <bo.zhang@nxp.com>2017-11-15 17:28:47 +0800
commitf8d69b49c95312d54ec41d0f102e5c8f7acce552 (patch)
treed768490f24cb8d2a14d6c47a344716f37a0d26f2
parent44e62b548a0f77aa68798cb5356fa36d55d55b13 (diff)
MA-10477[Android] Remove NAND partition definitions and operations in bcb
Remove NAND partitions definitions in .h file. Remove NAND related bcb operations. Change-Id: I38774732e80f0402d63ea6d3f862e385f3e01e31 Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
-rw-r--r--drivers/usb/gadget/command.c58
-rw-r--r--include/configs/imx8qm_arm2_android.h8
-rw-r--r--include/configs/imx8qxp_arm2_android.h8
-rw-r--r--include/configs/imx8qxp_mek_android.h8
-rw-r--r--include/configs/mx6sabreandroid_common.h8
-rw-r--r--include/configs/mx6sxsabreautoandroid.h8
6 files changed, 4 insertions, 94 deletions
diff --git a/drivers/usb/gadget/command.c b/drivers/usb/gadget/command.c
index f3254f8904..e9f7d29173 100644
--- a/drivers/usb/gadget/command.c
+++ b/drivers/usb/gadget/command.c
@@ -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
diff --git a/include/configs/imx8qm_arm2_android.h b/include/configs/imx8qm_arm2_android.h
index 7689761c7c..b2bf785eb0 100644
--- a/include/configs/imx8qm_arm2_android.h
+++ b/include/configs/imx8qm_arm2_android.h
@@ -38,19 +38,13 @@
#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
diff --git a/include/configs/imx8qxp_arm2_android.h b/include/configs/imx8qxp_arm2_android.h
index f5947d7e15..cc98c72c6b 100644
--- a/include/configs/imx8qxp_arm2_android.h
+++ b/include/configs/imx8qxp_arm2_android.h
@@ -38,19 +38,13 @@
#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
diff --git a/include/configs/imx8qxp_mek_android.h b/include/configs/imx8qxp_mek_android.h
index 1065b046b1..4537c3550b 100644
--- a/include/configs/imx8qxp_mek_android.h
+++ b/include/configs/imx8qxp_mek_android.h
@@ -39,19 +39,13 @@
#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
diff --git a/include/configs/mx6sabreandroid_common.h b/include/configs/mx6sabreandroid_common.h
index 20a3b105f5..224c647385 100644
--- a/include/configs/mx6sabreandroid_common.h
+++ b/include/configs/mx6sabreandroid_common.h
@@ -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
@@ -17,10 +16,5 @@
#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 */
diff --git a/include/configs/mx6sxsabreautoandroid.h b/include/configs/mx6sxsabreautoandroid.h
index fcac0c2397..7c190211ed 100644
--- a/include/configs/mx6sxsabreautoandroid.h
+++ b/include/configs/mx6sxsabreautoandroid.h
@@ -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
@@ -19,11 +17,5 @@
#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