summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/am335x_evm.h2
-rw-r--r--include/configs/am335x_shc.h2
-rw-r--r--include/configs/am335x_sl50.h2
-rw-r--r--include/configs/bav335x.h2
-rw-r--r--include/configs/k2e_evm.h1
-rw-r--r--include/configs/k2g_evm.h10
-rw-r--r--include/configs/k2hk_evm.h1
-rw-r--r--include/configs/k2l_evm.h1
-rw-r--r--include/configs/ti_am335x_common.h1
-rw-r--r--include/configs/ti_armv7_common.h15
-rw-r--r--include/configs/ti_armv7_keystone2.h5
-rw-r--r--include/configs/ti_omap5_common.h8
-rw-r--r--include/part.h69
-rw-r--r--include/part_efi.h1
14 files changed, 84 insertions, 36 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 2959befeb4..272c71b76b 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -297,8 +297,6 @@
#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
-/* To support eMMC booting */
-#define CONFIG_STORAGE_EMMC
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index db518a5823..553aaa38a8 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -283,8 +283,6 @@
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
#ifndef CONFIG_SPL_USBETH_SUPPORT
-/* To support eMMC booting */
-#define CONFIG_STORAGE_EMMC
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h
index 833c5c4659..9795d4112b 100644
--- a/include/configs/am335x_sl50.h
+++ b/include/configs/am335x_sl50.h
@@ -89,8 +89,6 @@
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
#ifndef CONFIG_SPL_USBETH_SUPPORT
-/* To support eMMC booting */
-#define CONFIG_STORAGE_EMMC
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index 0eb0c0308f..f1ae1a6c19 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -447,8 +447,6 @@ DEFAULT_LINUX_BOOT_ENV \
#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
-/* To support eMMC booting */
-#define CONFIG_STORAGE_EMMC
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#endif
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 7eaab875f2..8d6471ae88 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -18,7 +18,6 @@
#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
"boot=ubi\0" \
- "addr_mon=0x0c140000\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \
"name_fdt=keystone-k2e-evm.dtb\0" \
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index 71b00378ff..a14544526c 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -18,12 +18,12 @@
#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \
DEFAULT_MMC_TI_ARGS \
DEFAULT_PMMC_BOOT_ENV \
+ DEFAULT_FW_INITRAMFS_BOOT_ENV \
"boot=mmc\0" \
"console=ttyS0,115200n8\0" \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
"rd_spec=-\0" \
- "addr_mon=0x0c040000\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \
"name_fdt=keystone-k2g-evm.dtb\0" \
@@ -31,6 +31,8 @@
"name_ubi=k2g-evm-ubifs.ubi\0" \
"name_uboot=u-boot-spi-k2g-evm.gph\0" \
"init_mmc=run args_all args_mmc\0" \
+ "init_fw_rd_mmc=load mmc ${bootpart} ${rdaddr} " \
+ "${bootdir}/${name_fw_rd}; run set_rd_spec\0" \
"soc_variant=k2g\0" \
"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0"\
"get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
@@ -40,9 +42,9 @@
#define CONFIG_BOOTCOMMAND \
"run envboot; " \
- "run set_name_pmmc init_${boot} get_pmmc_${boot} run_pmmc " \
- "get_fdt_${boot} get_mon_${boot} get_kern_${boot} " \
- "run_mon run_kern"
+ "run set_name_pmmc init_${boot} init_fw_rd_${boot} " \
+ "get_pmmc_${boot} run_pmmc get_mon_${boot} run_mon " \
+ "get_fdt_${boot} get_kern_${boot} run_kern"
#include <configs/ti_armv7_keystone2.h>
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index 0256f0e567..913d4545b8 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -18,7 +18,6 @@
#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
"boot=ubi\0" \
- "addr_mon=0x0c5f0000\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \
"name_fdt=keystone-k2hk-evm.dtb\0" \
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index 2322ab288d..395e61c21d 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -18,7 +18,6 @@
#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
"boot=ubi\0" \
- "addr_mon=0x0c140000\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,4096\0" \
"name_fdt=keystone-k2l-evm.dtb\0" \
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 6b63fd29d3..d841b3f7b6 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -12,7 +12,6 @@
#ifndef __CONFIG_TI_AM335X_COMMON_H__
#define __CONFIG_TI_AM335X_COMMON_H__
-#define CONFIG_AM33XX
#define CONFIG_ARCH_CPU_INIT
#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
#define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index f039df51af..f5602b8c3e 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -193,16 +193,21 @@
/*
* Our platforms make use of SPL to initalize the hardware (primarily
- * memory) enough for full U-Boot to be loaded. We also support Falcon
- * Mode so that the Linux kernel can be booted directly from SPL
- * instead, if desired. We make use of the general SPL framework found
- * under common/spl/. Given our generally common memory map, we set a
- * number of related defaults and sizes here.
+ * memory) enough for full U-Boot to be loaded. We make use of the general
+ * SPL framework found under common/spl/. Given our generally common memory
+ * map, we set a number of related defaults and sizes here.
*/
#if !defined(CONFIG_NOR_BOOT) && \
!(defined(CONFIG_QSPI_BOOT) && defined(CONFIG_AM43XX))
#define CONFIG_SPL_FRAMEWORK
+
+/*
+ * We also support Falcon Mode so that the Linux kernel can be booted
+ * directly from SPL. This is not currently available on HS devices.
+ */
+#if !defined(CONFIG_TI_SECURE_DEVICE)
#define CONFIG_SPL_OS_BOOT
+#endif
/*
* Place the image at the start of the ROM defined image space (per
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 9c0614e566..c42dedbbd1 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -247,6 +247,7 @@
"addr_ubi=0x82000000\0" \
"addr_secdb_key=0xc000000\0" \
"name_kern=zImage\0" \
+ "addr_mon=0x87000000\0" \
"run_mon=mon_install ${addr_mon}\0" \
"run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}\0" \
"init_net=run args_all args_net\0" \
@@ -291,8 +292,8 @@
#ifndef CONFIG_BOOTCOMMAND
#define CONFIG_BOOTCOMMAND \
- "run init_${boot} init_fw_rd_${boot} get_fdt_${boot} " \
- "get_mon_${boot} get_kern_${boot} run_mon run_kern"
+ "run init_${boot} get_mon_${boot} run_mon init_fw_rd_${boot} " \
+ "get_fdt_${boot} get_kern_${boot} run_kern"
#endif
#define CONFIG_BOOTARGS \
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index ea11226620..a483850d19 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -144,6 +144,14 @@
*/
#define TI_OMAP5_SECURE_BOOT_RESV_SRAM_SZ 0x1000
#define CONFIG_SPL_TEXT_BASE 0x40301350
+/* If no specific start address is specified then the secure EMIF
+ * region will be placed at the end of the DDR space. In order to prevent
+ * the main u-boot relocation from clobbering that memory and causing a
+ * firewall violation, we tell u-boot that memory is protected RAM (PRAM)
+ */
+#if (CONFIG_TI_SECURE_EMIF_REGION_START == 0)
+#define CONFIG_PRAM (CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE) >> 10
+#endif
#else
/*
* For all booting on GP parts, the flash loader image is
diff --git a/include/part.h b/include/part.h
index 226b5be9df..09790059d0 100644
--- a/include/part.h
+++ b/include/part.h
@@ -28,6 +28,11 @@ struct block_drvr {
#define PART_TYPE_AMIGA 0x04
#define PART_TYPE_EFI 0x05
+/* maximum number of partition entries supported by search */
+#define DOS_ENTRY_NUMBERS 8
+#define ISO_ENTRY_NUMBERS 64
+#define MAC_ENTRY_NUMBERS 64
+#define AMIGA_ENTRY_NUMBERS 8
/*
* Type string for U-Boot bootable partitions
*/
@@ -146,6 +151,34 @@ int blk_get_device_by_str(const char *ifname, const char *dev_str,
int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
struct blk_desc **dev_desc,
disk_partition_t *info, int allow_whole_dev);
+
+/**
+ * part_get_info_by_name() - Search for a partition by name
+ * among all available registered partitions
+ *
+ * @param dev_desc - block device descriptor
+ * @param gpt_name - the specified table entry name
+ * @param info - returns the disk partition info
+ *
+ * @return - '0' on match, '-1' on no match, otherwise error
+ */
+int part_get_info_by_name(struct blk_desc *dev_desc,
+ const char *name, disk_partition_t *info);
+
+/**
+ * part_set_generic_name() - create generic partition like hda1 or sdb2
+ *
+ * Helper function for partition tables, which don't hold partition names
+ * (DOS, ISO). Generates partition name out of the device type and partition
+ * number.
+ *
+ * @dev_desc: pointer to the block device
+ * @part_num: partition number for which the name is generated
+ * @name: buffer where the name is written
+ */
+void part_set_generic_name(const struct blk_desc *dev_desc,
+ int part_num, char *name);
+
extern const struct block_drvr block_drvr[];
#else
static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
@@ -189,6 +222,7 @@ static inline int blk_get_device_part_str(const char *ifname,
struct part_driver {
const char *name;
int part_type;
+ const int max_entries; /* maximum number of entries to search */
/**
* get_info() - Get information about a partition
@@ -225,18 +259,6 @@ struct part_driver {
#include <part_efi.h>
/* disk/part_efi.c */
/**
- * part_get_info_efi_by_name() - Find the specified GPT partition table entry
- *
- * @param dev_desc - block device descriptor
- * @param gpt_name - the specified table entry name
- * @param info - returns the disk partition info
- *
- * @return - '0' on match, '-1' on no match, otherwise error
- */
-int part_get_info_efi_by_name(struct blk_desc *dev_desc,
- const char *name, disk_partition_t *info);
-
-/**
* write_gpt_table() - Write the GUID Partition Table to disk
*
* @param dev_desc - block device descriptor
@@ -343,4 +365,27 @@ int gpt_verify_partitions(struct blk_desc *dev_desc,
gpt_header *gpt_head, gpt_entry **gpt_pte);
#endif
+#ifdef CONFIG_DOS_PARTITION
+/**
+ * is_valid_dos_buf() - Ensure that a DOS MBR image is valid
+ *
+ * @param buf - buffer which contains the MBR
+ *
+ * @return - '0' on success, otherwise error
+ */
+int is_valid_dos_buf(void *buf);
+
+/**
+ * write_mbr_partition() - write DOS MBR
+ *
+ * @param dev_desc - block device descriptor
+ * @param buf - buffer which contains the MBR
+ *
+ * @return - '0' on success, otherwise error
+ */
+int write_mbr_partition(struct blk_desc *dev_desc, void *buf);
+
+#endif
+
+
#endif /* _PART_H */
diff --git a/include/part_efi.h b/include/part_efi.h
index c8fc8738f9..317c044795 100644
--- a/include/part_efi.h
+++ b/include/part_efi.h
@@ -27,7 +27,6 @@
#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
#define GPT_HEADER_REVISION_V1 0x00010000
#define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL
-#define GPT_ENTRY_NAME "gpt"
#define GPT_ENTRY_NUMBERS 128
#define GPT_ENTRY_SIZE 128