diff options
Diffstat (limited to 'include')
289 files changed, 2118 insertions, 1254 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 0af599f..68b5f0b 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -133,7 +133,7 @@ struct gpio_desc { * previously returned by gpio_request_by_name() * @return true if valid, false if not */ -static inline bool dm_gpio_is_valid(struct gpio_desc *desc) +static inline bool dm_gpio_is_valid(const struct gpio_desc *desc) { return desc->dev != NULL; } @@ -360,6 +360,18 @@ int gpio_lookup_name(const char *name, struct udevice **devp, int gpio_get_values_as_int(const int *gpio_list); /** + * dm_gpio_get_values_as_int() - Turn the values of a list of GPIOs into an int + * + * This puts the value of the first GPIO into bit 0, the second into bit 1, + * etc. then returns the resulting integer. + * + * @desc_list: List of GPIOs to collect + * @count: Number of GPIOs + * @return resulting integer value, or -ve on error + */ +int dm_gpio_get_values_as_int(const struct gpio_desc *desc_list, int count); + +/** * gpio_claim_vector() - claim a number of GPIOs for input * * @gpio_num_array: array of gpios to claim, terminated by -1 @@ -524,9 +536,9 @@ int gpio_free_list_nodev(struct gpio_desc *desc, int count); * previously returned by gpio_request_by_name() * @return GPIO value (0 for inactive, 1 for active) or -ve on error */ -int dm_gpio_get_value(struct gpio_desc *desc); +int dm_gpio_get_value(const struct gpio_desc *desc); -int dm_gpio_set_value(struct gpio_desc *desc, int value); +int dm_gpio_set_value(const struct gpio_desc *desc, int value); /** * dm_gpio_set_dir() - Set the direction for a GPIO @@ -565,6 +577,6 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags); * previously returned by gpio_request_by_name() * @return GPIO number, or -ve if not found */ -int gpio_get_number(struct gpio_desc *desc); +int gpio_get_number(const struct gpio_desc *desc); #endif /* _ASM_GENERIC_GPIO_H_ */ diff --git a/include/blk.h b/include/blk.h new file mode 100644 index 0000000..e83c144 --- /dev/null +++ b/include/blk.h @@ -0,0 +1,248 @@ +/* + * (C) Copyright 2000-2004 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef BLK_H +#define BLK_H + +#ifdef CONFIG_SYS_64BIT_LBA +typedef uint64_t lbaint_t; +#define LBAFlength "ll" +#else +typedef ulong lbaint_t; +#define LBAFlength "l" +#endif +#define LBAF "%" LBAFlength "x" +#define LBAFU "%" LBAFlength "u" + +/* Interface types: */ +enum if_type { + IF_TYPE_UNKNOWN = 0, + IF_TYPE_IDE, + IF_TYPE_SCSI, + IF_TYPE_ATAPI, + IF_TYPE_USB, + IF_TYPE_DOC, + IF_TYPE_MMC, + IF_TYPE_SD, + IF_TYPE_SATA, + IF_TYPE_HOST, + + IF_TYPE_COUNT, /* Number of interface types */ +}; + +/* + * With driver model (CONFIG_BLK) this is uclass platform data, accessible + * with dev_get_uclass_platdata(dev) + */ +struct blk_desc { + /* + * TODO: With driver model we should be able to use the parent + * device's uclass instead. + */ + enum if_type if_type; /* type of the interface */ + int devnum; /* device number */ + unsigned char part_type; /* partition type */ + unsigned char target; /* target SCSI ID */ + unsigned char lun; /* target LUN */ + unsigned char hwpart; /* HW partition, e.g. for eMMC */ + unsigned char type; /* device type */ + unsigned char removable; /* removable device */ +#ifdef CONFIG_LBA48 + /* device can use 48bit addr (ATA/ATAPI v7) */ + unsigned char lba48; +#endif + lbaint_t lba; /* number of blocks */ + unsigned long blksz; /* block size */ + int log2blksz; /* for convenience: log2(blksz) */ + char vendor[40+1]; /* IDE model, SCSI Vendor */ + char product[20+1]; /* IDE Serial no, SCSI product */ + char revision[8+1]; /* firmware revision */ +#ifdef CONFIG_BLK + struct udevice *bdev; +#else + unsigned long (*block_read)(struct blk_desc *block_dev, + lbaint_t start, + lbaint_t blkcnt, + void *buffer); + unsigned long (*block_write)(struct blk_desc *block_dev, + lbaint_t start, + lbaint_t blkcnt, + const void *buffer); + unsigned long (*block_erase)(struct blk_desc *block_dev, + lbaint_t start, + lbaint_t blkcnt); + void *priv; /* driver private struct pointer */ +#endif +}; + +#define BLOCK_CNT(size, blk_desc) (PAD_COUNT(size, blk_desc->blksz)) +#define PAD_TO_BLOCKSIZE(size, blk_desc) \ + (PAD_SIZE(size, blk_desc->blksz)) + +#ifdef CONFIG_BLK +struct udevice; + +/* Operations on block devices */ +struct blk_ops { + /** + * read() - read from a block device + * + * @dev: Device to read from + * @start: Start block number to read (0=first) + * @blkcnt: Number of blocks to read + * @buffer: Destination buffer for data read + * @return number of blocks read, or -ve error number (see the + * IS_ERR_VALUE() macro + */ + unsigned long (*read)(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt, void *buffer); + + /** + * write() - write to a block device + * + * @dev: Device to write to + * @start: Start block number to write (0=first) + * @blkcnt: Number of blocks to write + * @buffer: Source buffer for data to write + * @return number of blocks written, or -ve error number (see the + * IS_ERR_VALUE() macro + */ + unsigned long (*write)(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt, const void *buffer); + + /** + * erase() - erase a section of a block device + * + * @dev: Device to (partially) erase + * @start: Start block number to erase (0=first) + * @blkcnt: Number of blocks to erase + * @return number of blocks erased, or -ve error number (see the + * IS_ERR_VALUE() macro + */ + unsigned long (*erase)(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt); +}; + +#define blk_get_ops(dev) ((struct blk_ops *)(dev)->driver->ops) + +/* + * These functions should take struct udevice instead of struct blk_desc, + * but this is convenient for migration to driver model. Add a 'd' prefix + * to the function operations, so that blk_read(), etc. can be reserved for + * functions with the correct arguments. + */ +unsigned long blk_dread(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt, void *buffer); +unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt, const void *buffer); +unsigned long blk_derase(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt); + +/** + * blk_get_device() - Find and probe a block device ready for use + * + * @if_type: Interface type (enum if_type_t) + * @devnum: Device number (specific to each interface type) + * @devp: the device, if found + * @return - if found, -ENODEV if no device found, or other -ve error value + */ +int blk_get_device(int if_type, int devnum, struct udevice **devp); + +/** + * blk_first_device() - Find the first device for a given interface + * + * The device is probed ready for use + * + * @devnum: Device number (specific to each interface type) + * @devp: the device, if found + * @return 0 if found, -ENODEV if no device, or other -ve error value + */ +int blk_first_device(int if_type, struct udevice **devp); + +/** + * blk_next_device() - Find the next device for a given interface + * + * This can be called repeatedly after blk_first_device() to iterate through + * all devices of the given interface type. + * + * The device is probed ready for use + * + * @devp: On entry, the previous device returned. On exit, the next + * device, if found + * @return 0 if found, -ENODEV if no device, or other -ve error value + */ +int blk_next_device(struct udevice **devp); + +/** + * blk_create_device() - Create a new block device + * + * @parent: Parent of the new device + * @drv_name: Driver name to use for the block device + * @name: Name for the device + * @if_type: Interface type (enum if_type_t) + * @devnum: Device number, specific to the interface type + * @blksz: Block size of the device in bytes (typically 512) + * @size: Total size of the device in bytes + * @devp: the new device (which has not been probed) + */ +int blk_create_device(struct udevice *parent, const char *drv_name, + const char *name, int if_type, int devnum, int blksz, + lbaint_t size, struct udevice **devp); + +/** + * blk_prepare_device() - Prepare a block device for use + * + * This reads partition information from the device if supported. + * + * @dev: Device to prepare + * @return 0 if ok, -ve on error + */ +int blk_prepare_device(struct udevice *dev); + +/** + * blk_unbind_all() - Unbind all device of the given interface type + * + * The devices are removed and then unbound. + * + * @if_type: Interface type to unbind + * @return 0 if OK, -ve on error + */ +int blk_unbind_all(int if_type); + +#else +#include <errno.h> +/* + * These functions should take struct udevice instead of struct blk_desc, + * but this is convenient for migration to driver model. Add a 'd' prefix + * to the function operations, so that blk_read(), etc. can be reserved for + * functions with the correct arguments. + */ +static inline ulong blk_dread(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt, void *buffer) +{ + /* + * We could check if block_read is NULL and return -ENOSYS. But this + * bloats the code slightly (cause some board to fail to build), and + * it would be an error to try an operation that does not exist. + */ + return block_dev->block_read(block_dev, start, blkcnt, buffer); +} + +static inline ulong blk_dwrite(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt, const void *buffer) +{ + return block_dev->block_write(block_dev, start, blkcnt, buffer); +} + +static inline ulong blk_derase(struct blk_desc *block_dev, lbaint_t start, + lbaint_t blkcnt) +{ + return block_dev->block_erase(block_dev, start, blkcnt); +} +#endif /* !CONFIG_BLK */ + +#endif diff --git a/include/common.h b/include/common.h index 1563d64..f9f4605 100644 --- a/include/common.h +++ b/include/common.h @@ -596,12 +596,8 @@ void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); void reset_cpu (ulong addr); -#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP) void ft_cpu_setup(void *blob, bd_t *bd); -#ifdef CONFIG_PCI void ft_pci_setup(void *blob, bd_t *bd); -#endif -#endif void smp_set_core_boot_addr(unsigned long addr, int corenr); void smp_kick_all_cpus(void); @@ -660,10 +656,8 @@ int get_serial_clock(void); #if defined(CONFIG_MPC85xx) typedef MPC85xx_SYS_INFO sys_info_t; void get_sys_info ( sys_info_t * ); -# if defined(CONFIG_OF_LIBFDT) - void ft_fixup_cpu(void *, u64); - void ft_fixup_num_cores(void *); -# endif +void ft_fixup_cpu(void *, u64); +void ft_fixup_num_cores(void *); #endif #if defined(CONFIG_MPC86xx) typedef MPC86xx_SYS_INFO sys_info_t; @@ -813,7 +807,7 @@ void gzwrite_progress_finish(int retcode, * for files under 4GiB */ int gzwrite(unsigned char *src, int len, - struct block_dev_desc *dev, + struct blk_desc *dev, unsigned long szwritebuf, u64 startoffs, u64 szexpected); diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 37c6b43..ad9045e 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -90,6 +90,48 @@ BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS #endif +#ifdef CONFIG_EFI_LOADER +#if defined(CONFIG_ARM64) +#define BOOTEFI_NAME "bootaa64.efi" +#elif defined(CONFIG_ARM) +#define BOOTEFI_NAME "bootarm.efi" +#endif +#endif + +#ifdef BOOTEFI_NAME +#define BOOTENV_SHARED_EFI \ + "boot_efi_binary=" \ + "load ${devtype} ${devnum}:${distro_bootpart} " \ + "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ + "bootefi ${kernel_addr_r}\0" \ + \ + "load_efi_dtb=" \ + "load ${devtype} ${devnum}:${distro_bootpart} " \ + "${fdt_addr_r} ${prefix}${fdtfile}; " \ + "fdt addr ${fdt_addr_r}\0" \ + \ + "efi_dtb_prefixes=/ /dtb/ /dtb/current/\0" \ + "scan_dev_for_efi=" \ + "for prefix in ${efi_dtb_prefixes}; do " \ + "if test -e ${devtype} " \ + "${devnum}:${distro_bootpart} " \ + "${prefix}${fdtfile}; then " \ + "run load_efi_dtb; " \ + "fi;" \ + "done;" \ + "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ + "efi/boot/"BOOTEFI_NAME"; then " \ + "echo Found EFI removable media binary " \ + "efi/boot/"BOOTEFI_NAME"; " \ + "run boot_efi_binary; " \ + "echo EFI LOAD FAILED: continuing...; " \ + "fi; \0" +#define SCAN_DEV_FOR_EFI "run scan_dev_for_efi;" +#else +#define BOOTENV_SHARED_EFI +#define SCAN_DEV_FOR_EFI +#endif + #ifdef CONFIG_CMD_SATA #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata) #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV @@ -217,6 +259,7 @@ BOOTENV_SHARED_SCSI \ BOOTENV_SHARED_IDE \ BOOTENV_SHARED_UBIFS \ + BOOTENV_SHARED_EFI \ "boot_prefixes=/ /boot/\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \ "boot_script_dhcp=boot.scr.uimg\0" \ @@ -258,7 +301,9 @@ "for prefix in ${boot_prefixes}; do " \ "run scan_dev_for_extlinux; " \ "run scan_dev_for_scripts; " \ - "done\0" \ + "done;" \ + SCAN_DEV_FOR_EFI \ + "\0" \ \ "scan_dev_for_boot_part=" \ "part list ${devtype} ${devnum} -bootable devplist; " \ diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h index 0f85cd0..2ba7cf4 100644 --- a/include/config_distro_defaults.h +++ b/include/config_distro_defaults.h @@ -41,8 +41,6 @@ #define CONFIG_BOOTP_PXE_CLIENTARCH 0x9 #endif -#define CONFIG_OF_LIBFDT - #ifdef CONFIG_ARM64 #define CONFIG_CMD_BOOTI #else diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 8dfe2a8..2076ef0 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -49,8 +49,6 @@ /* * FDT options */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP #define CONFIG_LMB /* diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index 2e94b69..802ac75 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -52,8 +52,6 @@ /* * FDT options */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP #define CONFIG_LMB /* diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index bcbae50..2d9be20 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -503,15 +503,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h index 4b5ad0e..9c32a01 100644 --- a/include/configs/BSC9131RDB.h +++ b/include/configs/BSC9131RDB.h @@ -247,17 +247,6 @@ extern unsigned long get_sdram_size(void); #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #endif -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL #define CONFIG_SYS_FSL_I2C_SPEED 400000 diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h index 89907dc..9f7ceb8 100644 --- a/include/configs/BSC9132QDS.h +++ b/include/configs/BSC9132QDS.h @@ -431,17 +431,6 @@ combinations. this should be removed later #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #endif -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL #define CONFIG_SYS_FSL_I2C_SPEED 400800 /* I2C speed and slave address*/ diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h index 16920c6..4cbc9ad 100644 --- a/include/configs/C29XPCIE.h +++ b/include/configs/C29XPCIE.h @@ -396,17 +396,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL #define CONFIG_SYS_FSL_I2C_SPEED 400000 diff --git a/include/configs/CPCI4052.h b/include/configs/CPCI4052.h index 1e5285c..1b5b907 100644 --- a/include/configs/CPCI4052.h +++ b/include/configs/CPCI4052.h @@ -209,9 +209,6 @@ */ #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - /*----------------------------------------------------------------------- * FLASH organization */ diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h index 955ce62..9e9765c 100644 --- a/include/configs/MPC8308RDB.h +++ b/include/configs/MPC8308RDB.h @@ -23,10 +23,6 @@ #define CONFIG_MISC_INIT_R -/* new uImage format support */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 - #define CONFIG_MMC 1 #ifdef CONFIG_MMC @@ -329,9 +325,6 @@ #define CONFIG_SYS_HUSH_PARSER /* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index fa6dd6f..d440d88 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -359,11 +359,6 @@ #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - #define CONFIG_MPC83XX_GPIO 1 /* diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h index ba952e3..3b49f1c 100644 --- a/include/configs/MPC8315ERDB.h +++ b/include/configs/MPC8315ERDB.h @@ -305,11 +305,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h index a1d45d8..97f48e2 100644 --- a/include/configs/MPC8323ERDB.h +++ b/include/configs/MPC8323ERDB.h @@ -227,11 +227,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h index b3322ae..d218f59 100644 --- a/include/configs/MPC832XEMDS.h +++ b/include/configs/MPC832XEMDS.h @@ -307,11 +307,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index 71dcc6c..5b0900a 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -333,11 +333,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h index ded73b4..4346eda 100644 --- a/include/configs/MPC8349ITX.h +++ b/include/configs/MPC8349ITX.h @@ -366,11 +366,6 @@ boards, we say we have two, but don't display a message if we find only one. */ #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500) #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * PCI */ diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h index df47888..2475ae4 100644 --- a/include/configs/MPC837XEMDS.h +++ b/include/configs/MPC837XEMDS.h @@ -321,11 +321,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h index e77848e..aa66927 100644 --- a/include/configs/MPC837XERDB.h +++ b/include/configs/MPC837XERDB.h @@ -347,11 +347,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index 294be3b..9298c30 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -385,13 +385,6 @@ #define CONFIG_SYS_HUSH_PARSER /* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h index 921180f..0a6d5bc 100644 --- a/include/configs/MPC8540ADS.h +++ b/include/configs/MPC8540ADS.h @@ -236,11 +236,6 @@ #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h index d5805c1..79f81ec 100644 --- a/include/configs/MPC8541CDS.h +++ b/include/configs/MPC8541CDS.h @@ -259,11 +259,6 @@ extern unsigned long get_clock_freq(void); #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index 0fa5fd3..494c46f 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -209,11 +209,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index a84ebfd..8d29762 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -334,11 +334,6 @@ extern unsigned long get_clock_freq(void); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h index 84b8174..b64bbe5 100644 --- a/include/configs/MPC8555CDS.h +++ b/include/configs/MPC8555CDS.h @@ -257,11 +257,6 @@ extern unsigned long get_clock_freq(void); #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index 69ce13c..2284646 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -231,11 +231,6 @@ #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index 03ba806..a130001 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -242,11 +242,6 @@ extern unsigned long get_clock_freq(void); #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index f86d10f..0e003e5 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -253,11 +253,6 @@ extern unsigned long get_clock_freq(void); #ifdef CONFIG_SYS_HUSH_PARSER #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index b34a033..cfcd5b9 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -380,17 +380,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* new uImage format support */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index f8aef2e..ac219d1 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -236,14 +236,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree to kernel - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - - /* maximum size of the flat tree (8K) */ #define OF_FLAT_TREE_MAX_SIZE 8192 diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index a84db51..bd0a3f5 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -273,13 +273,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_HUSH_PARSER /* - * Pass open firmware flat tree to kernel - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 3c0faca..81af871 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -622,17 +622,6 @@ extern unsigned long get_sdram_size(void); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 6235bbb..bc4c733 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -443,17 +443,6 @@ #define CONFIG_VGA_AS_SINGLE_DEVICE #endif -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h index bc479f6..a53b1ac 100644 --- a/include/configs/P1023RDB.h +++ b/include/configs/P1023RDB.h @@ -175,17 +175,6 @@ extern unsigned long get_clock_freq(void); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index f250e7f..2d27fcf 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -339,15 +339,6 @@ unsigned long get_board_sys_clk(unsigned long dummy); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/PLU405.h b/include/configs/PLU405.h index 4eb5fe1..345affa 100644 --- a/include/configs/PLU405.h +++ b/include/configs/PLU405.h @@ -73,9 +73,6 @@ #define CONFIG_CMD_EEPROM #define CONFIG_CMD_USB -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - #define CONFIG_MAC_PARTITION #define CONFIG_DOS_PARTITION diff --git a/include/configs/PMC405DE.h b/include/configs/PMC405DE.h index ce0c49f..bb0c8bb 100644 --- a/include/configs/PMC405DE.h +++ b/include/configs/PMC405DE.h @@ -64,9 +64,6 @@ #define CONFIG_CMD_PCI #define CONFIG_CMD_PING -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - #undef CONFIG_WATCHDOG /* watchdog disabled */ #define CONFIG_SDRAM_BANK0 1 /* init onboard SDRAM bank 0 */ #define CONFIG_PRAM 0 diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h index 05ad315..dab4fa7 100644 --- a/include/configs/PMC440.h +++ b/include/configs/PMC440.h @@ -407,10 +407,6 @@ #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define CONFIG_API 1 #endif /* __CONFIG_H */ diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h index e5df784..f07b2d1 100644 --- a/include/configs/T102xQDS.h +++ b/include/configs/T102xQDS.h @@ -536,15 +536,6 @@ unsigned long get_board_ddr_clk(void); #endif #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 3cda3b1..1a22bee 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -534,15 +534,6 @@ unsigned long get_board_ddr_clk(void); #undef CONFIG_SYS_FLASH_EMPTY_INFO #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 2e7892f..aa0f802 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -435,15 +435,6 @@ unsigned long get_board_ddr_clk(void); #undef CONFIG_SYS_FLASH_EMPTY_INFO #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 5fc3497..84e195d 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -487,15 +487,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_rcw.cfg #endif #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index 3caf40b..5957fa8 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -459,15 +459,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* * I2C */ diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index b5290a1..e0769d0 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -419,15 +419,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* * I2C */ diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index c1a0a6c..faf06a0 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -213,15 +213,6 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 535dc6e..e646c00 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -730,9 +730,6 @@ * Open firmware flat tree support *----------------------------------------------------------------------- */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/TQM823L.h b/include/configs/TQM823L.h index 013e40e..d03f2e6 100644 --- a/include/configs/TQM823L.h +++ b/include/configs/TQM823L.h @@ -457,9 +457,6 @@ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM823M.h b/include/configs/TQM823M.h index fbb2f84..7d39766 100644 --- a/include/configs/TQM823M.h +++ b/include/configs/TQM823M.h @@ -453,9 +453,6 @@ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h index 58a17f5..9ed469a 100644 --- a/include/configs/TQM834x.h +++ b/include/configs/TQM834x.h @@ -327,11 +327,6 @@ #undef CONFIG_WATCHDOG /* watchdog disabled */ -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * For booting Linux, the board info and command line data * have to be in the first 256 MB of memory, since this is diff --git a/include/configs/TQM850L.h b/include/configs/TQM850L.h index 0077105..c70c4d7 100644 --- a/include/configs/TQM850L.h +++ b/include/configs/TQM850L.h @@ -441,9 +441,6 @@ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM850M.h b/include/configs/TQM850M.h index 4a443ed..52cba86 100644 --- a/include/configs/TQM850M.h +++ b/include/configs/TQM850M.h @@ -443,9 +443,6 @@ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM855L.h b/include/configs/TQM855L.h index 3fbc1ad..fb2652b 100644 --- a/include/configs/TQM855L.h +++ b/include/configs/TQM855L.h @@ -449,9 +449,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM855M.h b/include/configs/TQM855M.h index d2729d6..301a0a8 100644 --- a/include/configs/TQM855M.h +++ b/include/configs/TQM855M.h @@ -480,9 +480,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM860L.h b/include/configs/TQM860L.h index 764568d..a390e3f 100644 --- a/include/configs/TQM860L.h +++ b/include/configs/TQM860L.h @@ -448,9 +448,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM860M.h b/include/configs/TQM860M.h index 0894f59..0d2e119 100644 --- a/include/configs/TQM860M.h +++ b/include/configs/TQM860M.h @@ -453,9 +453,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM862L.h b/include/configs/TQM862L.h index 9650b8d..6fd08c7 100644 --- a/include/configs/TQM862L.h +++ b/include/configs/TQM862L.h @@ -453,9 +453,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM862M.h b/include/configs/TQM862M.h index 8b8db89..fcdc3e5 100644 --- a/include/configs/TQM862M.h +++ b/include/configs/TQM862M.h @@ -454,9 +454,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM866M.h b/include/configs/TQM866M.h index a011d2e..2a0fdf5 100644 --- a/include/configs/TQM866M.h +++ b/include/configs/TQM866M.h @@ -472,9 +472,6 @@ #define CONFIG_FEC_ENET #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h index 023736e..c9925ab 100644 --- a/include/configs/TQM885D.h +++ b/include/configs/TQM885D.h @@ -472,9 +472,6 @@ #define CONFIG_ETHPRIME "SCC" -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_HWCONFIG 1 #endif /* __CONFIG_H */ diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h index 2354009..139e629 100644 --- a/include/configs/UCP1020.h +++ b/include/configs/UCP1020.h @@ -345,17 +345,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL @@ -495,7 +484,6 @@ #define CONFIG_CMD_REGINFO #define CONFIG_CMD_ERRATA #define CONFIG_CMD_CRAMFS -#define CONFIG_CRAMFS_CMDLINE /* * USB diff --git a/include/configs/VOM405.h b/include/configs/VOM405.h index 6cbf1b7..a734c28 100644 --- a/include/configs/VOM405.h +++ b/include/configs/VOM405.h @@ -66,9 +66,6 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_EEPROM -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - #undef CONFIG_WATCHDOG /* watchdog disabled */ #define CONFIG_SDRAM_BANK0 1 /* init onboard SDRAM bank 0 */ diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index 4839ede..cf931a6 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -82,7 +82,6 @@ #define CONFIG_CMD_MTDPARTS #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS -#define CONFIG_FIT /* * IPB Bus clocking configuration. @@ -95,10 +94,6 @@ #undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 #endif -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - /* maximum size of the flat tree (8K) */ #define OF_FLAT_TREE_MAX_SIZE 8192 diff --git a/include/configs/a4m072.h b/include/configs/a4m072.h index 0ff5164..a883afb 100644 --- a/include/configs/a4m072.h +++ b/include/configs/a4m072.h @@ -354,9 +354,6 @@ * Open firmware flat tree support *----------------------------------------------------------------------- */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/ac14xx.h b/include/configs/ac14xx.h index 320be8f..750d8ff 100644 --- a/include/configs/ac14xx.h +++ b/include/configs/ac14xx.h @@ -557,9 +557,6 @@ #define CONFIG_ARP_TIMEOUT 200UL -#define CONFIG_FIT 1 -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 #define OF_CPU "PowerPC,5121@0" diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 6ebe0b3..150c523 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -19,9 +19,6 @@ #include <configs/ti_am335x_common.h> #ifndef CONFIG_SPL_BUILD -#ifndef CONFIG_FIT -# define CONFIG_FIT -#endif # define CONFIG_TIMESTAMP # define CONFIG_LZO #endif @@ -94,6 +91,7 @@ #define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot; " \ "run distro_bootcmd" #include <config_distro_bootcmd.h> @@ -123,13 +121,6 @@ "${optargs} " \ "root=${spiroot} " \ "rootfstype=${spirootfstype}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc ...; " \ - "env import -t -r $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${ramroot} " \ @@ -154,21 +145,10 @@ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "if run loadimage; then " \ - "run mmcloados;" \ - "fi;" \ - "fi ;" \ + "run envboot; " \ + "if run loadimage; then " \ + "run mmcloados;" \ + "fi;" \ "fi;\0" \ "spiboot=echo Booting from spi ...; " \ "run spiargs; " \ @@ -200,7 +180,6 @@ BOOTENV #endif - /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index 1bdb96e..e9e971e 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -13,9 +13,6 @@ #undef CONFIG_BOOTDELAY #ifndef CONFIG_SPL_BUILD -#ifndef CONFIG_FIT -# define CONFIG_FIT -#endif # define CONFIG_TIMESTAMP # define CONFIG_LZO #endif diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 5b689a8..fae8138 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -47,7 +47,6 @@ /* Display CPU and Board information */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO -#define CONFIG_OF_LIBFDT #define CONFIG_MISC_INIT_R #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 1428aa9..b982ed6 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -105,8 +105,10 @@ /* SPL USB Support */ #ifdef CONFIG_SPL_USB_HOST_SUPPORT #define CONFIG_SPL_USB_SUPPORT -#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 +#endif +#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD) +#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 #define CONFIG_CMD_USB #define CONFIG_USB_HOST #define CONFIG_USB_XHCI @@ -257,10 +259,6 @@ "${optargs} " \ "root=${usbroot} " \ "rootfstype=${usbrootfstype}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc ...; " \ - "env import -t $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${ramroot} " \ @@ -273,14 +271,6 @@ "setenv devtype mmc; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${devnum};" \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ "if run loadimage; then " \ "run loadfdt; " \ "echo Booting from mmc${mmcdev} ...; " \ @@ -327,6 +317,7 @@ #define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot;" \ "run mmcboot;" \ "run usbboot;" \ NANDBOOT \ diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 6308cab..1fffdb1 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -88,4 +88,8 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) +/* EEPROM */ +#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 +#define CONFIG_EEPROM_BUS_ADDRESS 0 + #endif /* __CONFIG_AM57XX_EVM_H */ diff --git a/include/configs/amcc-common.h b/include/configs/amcc-common.h index 60d6be7..0388ffc 100644 --- a/include/configs/amcc-common.h +++ b/include/configs/amcc-common.h @@ -121,11 +121,6 @@ #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port*/ #endif -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP /* Update size in "reg" property of NOR FLASH device tree nodes */ #define CONFIG_FDT_FIXUP_NOR_FLASH_SIZE diff --git a/include/configs/apf27.h b/include/configs/apf27.h index 5b286d2..018d586 100644 --- a/include/configs/apf27.h +++ b/include/configs/apf27.h @@ -161,8 +161,6 @@ #define CONFIG_SETUP_MEMORY_TAGS /* send memory definition to kernel */ #define CONFIG_INITRD_TAG /* send initrd params */ -#define CONFIG_OF_LIBFDT - #define CONFIG_BOOTDELAY 5 #define CONFIG_ZERO_BOOTDELAY_CHECK #define CONFIG_BOOTFILE __stringify(CONFIG_BOARD_NAME) "-linux.bin" diff --git a/include/configs/arcangel4.h b/include/configs/arcangel4.h index 63f61ae..8a860ee 100644 --- a/include/configs/arcangel4.h +++ b/include/configs/arcangel4.h @@ -41,9 +41,6 @@ /* * Command line configuration */ - -#define CONFIG_OF_LIBFDT - #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_MAXARGS 16 diff --git a/include/configs/aria.h b/include/configs/aria.h index c38bf3c..c56a2e3 100644 --- a/include/configs/aria.h +++ b/include/configs/aria.h @@ -572,8 +572,6 @@ #define CONFIG_BOOTCOMMAND "run flash_self" -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 #define OF_CPU "PowerPC,5121@0" diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h index 0b97ccc..efbf816 100644 --- a/include/configs/aristainetos-common.h +++ b/include/configs/aristainetos-common.h @@ -240,8 +240,6 @@ #define CONFIG_HW_WATCHDOG #define CONFIG_IMX_WATCHDOG -#define CONFIG_FIT - /* Framebuffer */ #define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 diff --git a/include/configs/armadillo-800eva.h b/include/configs/armadillo-800eva.h index dfbd60d..1ce9b9a 100644 --- a/include/configs/armadillo-800eva.h +++ b/include/configs/armadillo-800eva.h @@ -23,7 +23,6 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT #define BOARD_LATE_INIT #define CONFIG_BAUDRATE 115200 diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h index d692106..6525b5c 100644 --- a/include/configs/at91-sama5_common.h +++ b/include/configs/at91-sama5_common.h @@ -31,8 +31,6 @@ #define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT /* Device Tree support */ - /* general purpose I/O */ #define CONFIG_AT91_GPIO diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h index 9274024..5903f7c 100644 --- a/include/configs/at91rm9200ek.h +++ b/include/configs/at91rm9200ek.h @@ -59,7 +59,6 @@ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT /* diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h index cc3e69c..7820295 100644 --- a/include/configs/at91sam9260ek.h +++ b/include/configs/at91sam9260ek.h @@ -46,8 +46,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h index 64fb38b..c7ba9eb 100644 --- a/include/configs/at91sam9261ek.h +++ b/include/configs/at91sam9261ek.h @@ -31,9 +31,6 @@ #define CONFIG_DISPLAY_CPUINFO -#define CONFIG_OF_LIBFDT - - #define CONFIG_ATMEL_LEGACY #define CONFIG_SYS_TEXT_BASE 0x21f00000 diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h index 89ee9fe..c826427 100644 --- a/include/configs/at91sam9263ek.h +++ b/include/configs/at91sam9263ek.h @@ -46,8 +46,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - /* * Hardware drivers diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h index cc42c90..d4baf48 100644 --- a/include/configs/at91sam9m10g45ek.h +++ b/include/configs/at91sam9m10g45ek.h @@ -31,8 +31,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h index ba91d1f..14a8436 100644 --- a/include/configs/at91sam9n12ek.h +++ b/include/configs/at91sam9n12ek.h @@ -30,8 +30,6 @@ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_DISPLAY_CPUINFO -#define CONFIG_OF_LIBFDT - /* general purpose I/O */ #define CONFIG_AT91_GPIO diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h index a7a0502..0d45354 100644 --- a/include/configs/at91sam9rlek.h +++ b/include/configs/at91sam9rlek.h @@ -32,8 +32,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - #define CONFIG_ATMEL_LEGACY #define CONFIG_AT91_GPIO 1 diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h index 45bb861..cd91a7b 100644 --- a/include/configs/at91sam9x5ek.h +++ b/include/configs/at91sam9x5ek.h @@ -27,8 +27,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/axs101.h b/include/configs/axs101.h index 98fff63..006ddb3 100644 --- a/include/configs/axs101.h +++ b/include/configs/axs101.h @@ -39,8 +39,6 @@ #define CONFIG_BOARD_TYPES #define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_OF_LIBFDT - /* * NAND Flash configuration */ diff --git a/include/configs/baltos.h b/include/configs/baltos.h index e9b4fe1..b8c915c 100644 --- a/include/configs/baltos.h +++ b/include/configs/baltos.h @@ -41,7 +41,6 @@ /* FIT support */ #define CONFIG_SYS_BOOTM_LEN SZ_64M -#define CONFIG_OF_BOARD_SETUP /* UBI Support */ #define CONFIG_CMD_MTDPARTS diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h index e61a098..a9df0b3 100644 --- a/include/configs/bav335x.h +++ b/include/configs/bav335x.h @@ -21,12 +21,9 @@ #define CONFIG_ENV_IS_NOWHERE #ifndef CONFIG_SPL_BUILD -# define CONFIG_FIT # define CONFIG_TIMESTAMP # define CONFIG_LZO # ifdef CONFIG_ENABLE_VBOOT -# define CONFIG_FIT_SIGNATURE -# define CONFIG_RSA # endif #endif diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h index 1d4869b..344f89d 100644 --- a/include/configs/bcm_ep_board.h +++ b/include/configs/bcm_ep_board.h @@ -86,9 +86,6 @@ #define CONFIG_CMD_FAT #define CONFIG_FAT_WRITE -/* Enable devicetree support */ -#define CONFIG_OF_LIBFDT - /* SHA hashing */ #define CONFIG_CMD_HASH #define CONFIG_HASH_VERIFY diff --git a/include/configs/chromebook_samus.h b/include/configs/chromebook_samus.h new file mode 100644 index 0000000..b89ba41 --- /dev/null +++ b/include/configs/chromebook_samus.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * (C) Copyright 2008 + * Graeme Russ, graeme.russ@gmail.com. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * board/config.h - configuration options, board specific + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <configs/x86-common.h> +#include <configs/x86-chromebook.h> + +#undef CONFIG_CFB_CONSOLE + +#undef CONFIG_STD_DEVICES_SETTINGS +#define CONFIG_STD_DEVICES_SETTINGS "stdin=usbkbd,i8042-kbd,serial\0" \ + "stdout=vidconsole,serial\0" \ + "stderr=vidconsole,serial\0" + +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0x003f8000 + +#endif /* __CONFIG_H */ diff --git a/include/configs/cm5200.h b/include/configs/cm5200.h index 69b2674..3744af2 100644 --- a/include/configs/cm5200.h +++ b/include/configs/cm5200.h @@ -315,8 +315,6 @@ /* * Flat Device Tree support */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 180ea28..b36ba14 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -225,7 +225,6 @@ #define CONFIG_STACKSIZE (128 * 1024) #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */ -#define CONFIG_OF_BOARD_SETUP #define CONFIG_MISC_INIT_R /* SPL */ diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index 24ae14d..3910b46 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -48,8 +48,6 @@ #define CONFIG_MISC_INIT_R -#define CONFIG_OF_LIBFDT 1 - #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h index 7a07de4..d8a29f0 100644 --- a/include/configs/cm_t3517.h +++ b/include/configs/cm_t3517.h @@ -51,7 +51,6 @@ #define CONFIG_MISC_INIT_R -#define CONFIG_OF_LIBFDT /* * The early kernel mapping on ARM currently only maps from the base of DRAM * to the end of the kernel image. The kernel is loaded at DRAM base + 0x8000. diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h index 6d57cd6..c8c67c4 100644 --- a/include/configs/cm_t54.h +++ b/include/configs/cm_t54.h @@ -18,10 +18,6 @@ #undef CONFIG_SPL_OS_BOOT -/* Device Tree defines */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - /* EEPROM related defines */ #define CONFIG_SYS_I2C_OMAP34XX #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 0fc24a0..e8851e7 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -41,7 +41,6 @@ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_LZMA /* LZMA compression support */ -#define CONFIG_OF_LIBFDT /* * Serial Console Configuration diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 60aee8f..9c73cff 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -219,7 +219,6 @@ #define CONFIG_ENV_OFFSET (12 * 64 * 2048) #endif -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_SYS_NO_FLASH diff --git a/include/configs/conga-qeval20-qa3-e3845.h b/include/configs/conga-qeval20-qa3-e3845.h new file mode 100644 index 0000000..556d44e --- /dev/null +++ b/include/configs/conga-qeval20-qa3-e3845.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2016 Stefan Roese <sr@denx.de> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * board/config.h - configuration options, board specific + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <configs/x86-common.h> + +#define CONFIG_SYS_MONITOR_LEN (1 << 20) +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_ARCH_EARLY_INIT_R +#define CONFIG_ARCH_MISC_INIT + +#define CONFIG_PCI_PNP + +#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" + +#define CONFIG_SCSI_DEV_LIST \ + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA}, \ + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA_ALT} + +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC_SDMA +#define CONFIG_CMD_MMC + +#undef CONFIG_USB_MAX_CONTROLLER_COUNT +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 + +#define VIDEO_IO_OFFSET 0 +#define CONFIG_X86EMU_RAW_IO +#define CONFIG_CMD_BMP + +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0x007fe000 + +#undef CONFIG_BOOTARGS +#undef CONFIG_BOOTCOMMAND + +#define CONFIG_BOOTARGS \ + "root=/dev/sda1 ro quiet" +#define CONFIG_BOOTCOMMAND \ + "load scsi 0:1 03000000 /boot/vmlinuz-4.2.0-26-generic;" \ + "load scsi 0:1 04000000 /boot/initrd.img-4.2.0-26-generic;" \ + "run boot" + +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ + "boot=zboot 03000000 0 04000000 ${filesize}\0" \ + "upd_uboot=tftp 100000 conga/u-boot.rom;" \ + "sf probe;sf update 100000 0 7fe000\0" + +#define CONFIG_PREBOOT + +#endif /* __CONFIG_H */ diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h index 641aa7c..fa64a1e 100644 --- a/include/configs/controlcenterd.h +++ b/include/configs/controlcenterd.h @@ -400,17 +400,6 @@ #define CONFIG_MISC_INIT_R #define CONFIG_LAST_STAGE_INIT -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE - #else /* CONFIG_TRAILBLAZER */ #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index a099eee..d30d7ff 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -344,15 +344,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/corvus.h b/include/configs/corvus.h index 97797e2..a1fd93f 100644 --- a/include/configs/corvus.h +++ b/include/configs/corvus.h @@ -40,7 +40,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h index 99b3aef..b4bf350 100644 --- a/include/configs/cyrus.h +++ b/include/configs/cyrus.h @@ -231,14 +231,6 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 63abb80..24e55e8 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -270,7 +270,6 @@ #define CONFIG_SYS_LONGHELP #define CONFIG_CRC32_VERIFY #define CONFIG_MX_CYCLIC -#define CONFIG_OF_LIBFDT /* * Linux Information diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h index 99d9148..a8ce7e1 100644 --- a/include/configs/devkit3250.h +++ b/include/configs/devkit3250.h @@ -152,7 +152,6 @@ /* * Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT /* * Environment diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h index f802c8d..0041ab9 100644 --- a/include/configs/digsy_mtc.h +++ b/include/configs/digsy_mtc.h @@ -296,9 +296,6 @@ #define CONFIG_SYS_FLASH_ERASE_TOUT 240000 #define CONFIG_SYS_FLASH_WRITE_TOUT 500 -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/dlvision-10g.h b/include/configs/dlvision-10g.h index b614f19..9f9bcb8 100644 --- a/include/configs/dlvision-10g.h +++ b/include/configs/dlvision-10g.h @@ -36,8 +36,6 @@ #define PLLMR1_DEFAULT PLLMR1_266_133_66 /* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_DISABLE_SHA256 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */ diff --git a/include/configs/dlvision.h b/include/configs/dlvision.h index 90e839a..1e461f5 100644 --- a/include/configs/dlvision.h +++ b/include/configs/dlvision.h @@ -32,8 +32,6 @@ #define PLLMR1_DEFAULT PLLMR1_266_133_66_33 /* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_DISABLE_SHA256 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */ diff --git a/include/configs/dns325.h b/include/configs/dns325.h index c59a324..80f7a1e 100644 --- a/include/configs/dns325.h +++ b/include/configs/dns325.h @@ -91,11 +91,6 @@ #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* - * Enable device tree support - */ -#define CONFIG_OF_LIBFDT - -/* * Display cpu info at boot */ #define CONFIG_DISPLAY_CPUINFO diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 0196280..45bda4f 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -19,6 +19,11 @@ #define CONFIG_IODELAY_RECALIBRATION #endif +#define CONFIG_VERY_BIG_RAM +#define CONFIG_PHYS_64BIT +#define CONFIG_NR_DRAM_BANKS 2 +#define CONFIG_MAX_MEM_MAPPED 0x80000000 + #ifndef CONFIG_QSPI_BOOT /* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC @@ -341,4 +346,8 @@ #endif #endif /* NOR support */ +/* EEPROM */ +#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 +#define CONFIG_EEPROM_BUS_ADDRESS 0 + #endif /* __CONFIG_DRA7XX_EVM_H */ diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 834a22f..7d600bf 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -170,6 +170,7 @@ #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX #define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_RTL8152 /* USB boot mode */ #define CONFIG_USB_BOOTING @@ -177,10 +178,6 @@ #define EXYNOS_USB_SECONDARY_BOOT 0xfeed0002 #define EXYNOS_IRAM_SECONDARY_BASE 0x02020018 -/* Enable FIT support and comparison */ -#define CONFIG_FIT -#define CONFIG_FIT_BEST_MATCH - #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ diff --git a/include/configs/flea3.h b/include/configs/flea3.h index 99bf7d6..3e4aaf6 100644 --- a/include/configs/flea3.h +++ b/include/configs/flea3.h @@ -252,6 +252,5 @@ /* Enable FIT images support */ #define CONFIG_CMD_FDT -#define CONFIG_FIT #endif /* __CONFIG_H */ diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index b7b9c78..38c921a 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -97,10 +97,6 @@ #endif /* CONFIG_SPI_FLASH */ -/* Flattened Image Tree Suport */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE - /* I2C Configs */ #define CONFIG_CMD_I2C #define CONFIG_SYS_I2C @@ -442,7 +438,6 @@ "done" /* Device Tree Support */ -#define CONFIG_OF_BOARD_SETUP #define CONFIG_FDT_FIXUP_PARTITIONS #endif /* __CONFIG_H */ diff --git a/include/configs/h2200.h b/include/configs/h2200.h index 6fbbe6e..fe0211a 100644 --- a/include/configs/h2200.h +++ b/include/configs/h2200.h @@ -115,7 +115,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 38400, 115200 } -#define CONFIG_FIT #define CONFIG_FIT_DISABLE_SHA256 #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG diff --git a/include/configs/highbank.h b/include/configs/highbank.h index f02575a..510741b 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -14,8 +14,6 @@ #define CONFIG_SYS_NO_FLASH -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_FIT #define CONFIG_SYS_BOOTMAPSZ (16 << 20) #define CONFIG_SYS_TIMER_RATE (150000000/256) diff --git a/include/configs/hikey.h b/include/configs/hikey.h index 796861e..0851626 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -21,14 +21,11 @@ #define CONFIG_SUPPORT_RAW_INITRD -/* Cache Definitions */ -#define CONFIG_SYS_DCACHE_OFF +/* MMU Definitions */ +#define CONFIG_SYS_CACHELINE_SIZE 64 #define CONFIG_IDENT_STRING "hikey" -/* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT - #define CONFIG_BOARD_EARLY_INIT_F /* Physical Memory Map */ @@ -121,7 +118,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "kernel_name=Image\0" \ "kernel_addr_r=0x00080000\0" \ - "fdt_name=hi6220-hikey.dtb\0" \ + "fdtfile=hi6220-hikey.dtb\0" \ "fdt_addr_r=0x02000000\0" \ "fdt_high=0xffffffffffffffff\0" \ "initrd_high=0xffffffffffffffff\0" \ diff --git a/include/configs/hrcon.h b/include/configs/hrcon.h index 801be68..c984613 100644 --- a/include/configs/hrcon.h +++ b/include/configs/hrcon.h @@ -31,10 +31,6 @@ #define CONFIG_BOARD_EARLY_INIT_R #define CONFIG_LAST_STAGE_INIT -/* new uImage format support */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 - #define CONFIG_MMC #define CONFIG_FSL_ESDHC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC83xx_ESDHC_ADDR @@ -318,9 +314,6 @@ #define CONFIG_SYS_HUSH_PARSER /* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index 0a5a9f1..5855d81 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -429,10 +429,6 @@ #define CONFIG_BOOTP_HOSTNAME #define CONFIG_BOOTP_BOOTPATH #define CONFIG_BOOTP_BOOTFILESIZE -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS /* * The reserved memory diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h index 639a30a..43d2c3d 100644 --- a/include/configs/integrator-common.h +++ b/include/configs/integrator-common.h @@ -27,7 +27,6 @@ #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_OF_LIBFDT /* enable passing a Device Tree */ #define CONFIG_MISC_INIT_R /* call misc_init_r during start up */ /* diff --git a/include/configs/intip.h b/include/configs/intip.h index 60c9e2c..913fdab 100644 --- a/include/configs/intip.h +++ b/include/configs/intip.h @@ -46,7 +46,6 @@ #define CONFIG_BOARD_EARLY_INIT_R 1 /* Call board_early_init_r */ #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ #define CONFIG_BOARD_TYPES 1 /* support board types */ -#define CONFIG_FIT #define CFG_ALT_MEMTEST #undef CONFIG_ZERO_BOOTDELAY_CHECK /* ignore keypress on bootdelay==0 */ diff --git a/include/configs/io.h b/include/configs/io.h index 2c457d4..1213fe2 100644 --- a/include/configs/io.h +++ b/include/configs/io.h @@ -36,8 +36,6 @@ #undef CONFIG_ZERO_BOOTDELAY_CHECK /* ignore keypress on bootdelay==0 */ /* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_DISABLE_SHA256 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */ diff --git a/include/configs/io64.h b/include/configs/io64.h index 25bd014..1a6275e 100644 --- a/include/configs/io64.h +++ b/include/configs/io64.h @@ -46,10 +46,6 @@ #undef CONFIG_ZERO_BOOTDELAY_CHECK /* ignore keypress on bootdelay==0 */ -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE - /*----------------------------------------------------------------------- * Base addresses -- Note these are effective addresses where the * actual resources get mapped (not physical addresses) diff --git a/include/configs/ipek01.h b/include/configs/ipek01.h index 637bbb3..ea9d8b0 100644 --- a/include/configs/ipek01.h +++ b/include/configs/ipek01.h @@ -170,9 +170,6 @@ /* * Open firmware flat tree support */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/jupiter.h b/include/configs/jupiter.h index ba96d97..b494683 100644 --- a/include/configs/jupiter.h +++ b/include/configs/jupiter.h @@ -134,9 +134,6 @@ #if 0 /* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 8) diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index 4f4ebf5..07f975b 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -16,6 +16,8 @@ /* U-Boot general configuration */ #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" \ @@ -38,4 +40,6 @@ #define CONFIG_KSNET_CPSW_NUM_PORTS 9 #define CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE +#define CONFIG_DDR_SPD + #endif /* __CONFIG_K2E_EVM_H */ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index d9ad8cf..7bc506f 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -17,9 +17,12 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_MMC_TI_ARGS \ + DEFAULT_PMMC_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" \ @@ -28,10 +31,18 @@ "name_ubi=k2g-evm-ubifs.ubi\0" \ "name_uboot=u-boot-spi-k2g-evm.gph\0" \ "init_mmc=run args_all args_mmc\0" \ + "soc_variant=k2g\0" \ "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0"\ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ "${bootdir}/${name_kern}\0" \ "get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\ + "name_fs=arago-base-tisdk-image-k2g-evm.cpio\0" + +#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" #include <configs/ti_armv7_keystone2.h> @@ -53,6 +64,12 @@ #define CONFIG_OMAP_HSMMC #define CONFIG_CMD_MMC +#undef CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_IS_IN_FAT +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0:1" +#define FAT_ENV_FILE "uboot.env" + #define CONFIG_SF_DEFAULT_BUS 1 #define CONFIG_SF_DEFAULT_CS 0 diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index 6c6dcb1..a268a86 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -16,6 +16,8 @@ /* U-Boot general configuration */ #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" \ @@ -37,4 +39,6 @@ #define CONFIG_KSNET_NETCP_V1_0 #define CONFIG_KSNET_CPSW_NUM_PORTS 5 +#define CONFIG_DDR_SPD + #endif /* __CONFIG_K2HK_EVM_H */ diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index 9bacfa4..f366e67 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -16,6 +16,8 @@ /* U-Boot general configuration */ #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" \ diff --git a/include/configs/kc1.h b/include/configs/kc1.h new file mode 100644 index 0000000..c2ac148 --- /dev/null +++ b/include/configs/kc1.h @@ -0,0 +1,275 @@ +/* + * Amazon Kindle Fire (first generation) codename kc1 config + * + * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <asm/arch/cpu.h> +#include <asm/arch/omap.h> + +/* + * Build + */ + +#define CONFIG_SYS_THUMB_BUILD + +/* + * CPU + */ + +#define CONFIG_SYS_L2_PL310 1 +#define CONFIG_SYS_PL310_BASE 0x48242000 +#define CONFIG_SYS_CACHELINE_SIZE 32 + +/* + * Platform + */ + +#define CONFIG_OMAP +#define CONFIG_OMAP4430 +#define CONFIG_OMAP_COMMON + +/* + * Board + */ + +#define CONFIG_MISC_INIT_R + +/* + * Clocks + */ + +#define CONFIG_SYS_TIMERBASE GPT2_BASE +#define CONFIG_SYS_PTV 2 + +/* + * DRAM + */ + +#define CONFIG_NR_DRAM_BANKS 1 + +/* + * Memory + */ + +#define CONFIG_SYS_TEXT_BASE 0x80100000 +#define CONFIG_SYS_SDRAM_BASE 0x80000000 +#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ + GENERATED_GBL_DATA_SIZE) + +#define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE) + +/* + * GPIO + */ + +#define CONFIG_OMAP_GPIO + +/* + * I2C + */ + +#define CONFIG_SYS_I2C +#define CONFIG_SYS_OMAP24_I2C_SPEED 400000 +#define CONFIG_SYS_OMAP24_I2C_SLAVE 1 +#define CONFIG_SYS_I2C_OMAP24XX +#define CONFIG_I2C_MULTI_BUS + +#define CONFIG_CMD_I2C + +/* + * Flash + */ + +#define CONFIG_SYS_NO_FLASH + +/* + * MMC + */ + +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_OMAP_HSMMC + +#define CONFIG_CMD_MMC + +/* + * Power + */ + +#define CONFIG_TWL6030_POWER + +/* + * Input + */ + +#define CONFIG_TWL6030_INPUT + +/* + * Partitions + */ + +#define CONFIG_PARTITION_UUIDS +#define CONFIG_CMD_PART + +/* + * SPL + */ + +#define CONFIG_SPL_FRAMEWORK + +#define CONFIG_SPL_TEXT_BASE 0x40300000 +#define CONFIG_SPL_MAX_SIZE (48 * 1024) +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 +#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 +#define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024) + +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" +#define CONFIG_SPL_BOARD_INIT + +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBDISK_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_POWER_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_MMC_SUPPORT + +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 2 + +/* + * Console + */ + +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO + +#define CONFIG_AUTO_COMPLETE + +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_HUSH_PARSER + +#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_CBSIZE 512 +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) \ + + 16) + +/* + * Serial + */ + +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_CLK 48000000 +#define CONFIG_SYS_NS16550_COM3 UART3_BASE +#define CONFIG_CONS_INDEX 3 + +#define CONFIG_BAUDRATE 115200 +#define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, \ + 115200 } + +/* + * USB gadget + */ + +#define CONFIG_USB_MUSB_PIO_ONLY +#define CONFIG_USB_MUSB_OMAP2PLUS + +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_VBUS_DRAW 0 + +/* + * Download + */ + +#define CONFIG_USB_GADGET_DOWNLOAD + +#define CONFIG_G_DNL_VENDOR_NUM 0x0451 +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022 +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" + +/* + * Fastboot + */ + +#define CONFIG_USB_FUNCTION_FASTBOOT + +#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000 + +#define CONFIG_FASTBOOT_FLASH +#define CONFIG_FASTBOOT_FLASH_MMC_DEV 0 + +#define CONFIG_CMD_FASTBOOT + +/* + * Environment + */ + +#define CONFIG_ENV_SIZE (128 * 1024) +#define CONFIG_ENV_IS_NOWHERE + +#define CONFIG_ENV_OVERWRITE + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x82000000\0" \ + "loadaddr=0x82000000\0" \ + "fdt_addr_r=0x88000000\0" \ + "fdtaddr=0x88000000\0" \ + "ramdisk_addr_r=0x88080000\0" \ + "pxefile_addr_r=0x80100000\0" \ + "scriptaddr=0x80000000\0" \ + "bootm_size=0x10000000\0" \ + "boot_mmc_dev=0\0" \ + "kernel_mmc_part=7\0" \ + "recovery_mmc_part=5\0" \ + "bootargs=mem=512M console=ttyO2\0" + +/* + * ATAGs + */ + +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG +#define CONFIG_INITRD_TAG +#define CONFIG_REVISION_TAG +#define CONFIG_SERIAL_TAG + +/* + * Boot + */ + +#define CONFIG_SYS_LOAD_ADDR 0x82000000 + +#define CONFIG_ANDROID_BOOT_IMAGE + +#define CONFIG_BOOTCOMMAND \ + "setenv boot_mmc_part ${kernel_mmc_part}; " \ + "if test reboot-${reboot-mode} = reboot-r; then " \ + "echo recovery; setenv boot_mmc_part ${recovery_mmc_part}; fi; " \ + "if test reboot-${reboot-mode} = reboot-b; then " \ + "echo fastboot; fastboot 0; fi; " \ + "part start mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_start; " \ + "part size mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_size; " \ + "mmc dev ${boot_mmc_dev}; " \ + "mmc read ${kernel_addr_r} ${boot_mmc_start} ${boot_mmc_size} && " \ + "bootm ${kernel_addr_r};" + +/* + * Defaults + */ + +#include <config_defaults.h> +#include <config_distro_defaults.h> + +#endif diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 91b29b3..5edc8f6 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -83,7 +83,6 @@ #define CONFIG_MTD_CONCAT #define CONFIG_CMD_CRAMFS -#define CONFIG_CRAMFS_CMDLINE #ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS #define CONFIG_KM_DEF_ENV_BOOTPARAMS \ diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h index eba7479..8293607 100644 --- a/include/configs/km/km-powerpc.h +++ b/include/configs/km/km-powerpc.h @@ -17,10 +17,6 @@ #define CONFIG_CMD_DTT #define CONFIG_JFFS2_CMDLINE -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - /* standard km ethernet_present for piggy */ #define CONFIG_KM_COMMON_ETH_INIT diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index d86b7fc..6a9d739 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -151,8 +151,6 @@ #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) -#define CONFIG_OF_STDOUT_VIA_ALIAS - /* * QE UEC ethernet configuration */ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index d1f0b12..dfc1c7e 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -93,9 +93,6 @@ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ #define CONFIG_MISC_INIT_R -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT - /* * NS16550 Configuration */ diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h index 6860ad2..d981951 100644 --- a/include/configs/km/kmp204x-common.h +++ b/include/configs/km/kmp204x-common.h @@ -258,15 +258,6 @@ unsigned long get_board_sys_clk(unsigned long dummy); /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h index 4cfc1dc..1f9c720 100644 --- a/include/configs/km82xx.h +++ b/include/configs/km82xx.h @@ -430,8 +430,6 @@ int get_scl(void); #define CONFIG_SYS_RESET_ADDRESS 0xFDFFFFFC /* "bad" address */ -#define CONFIG_FIT 1 - #define OF_TBCLK (bd->bi_busfreq / 4) #define OF_STDOUT_PATH "/soc/cpm/serial@11a90" diff --git a/include/configs/kwb.h b/include/configs/kwb.h index 60e6496..1f2d2a4 100644 --- a/include/configs/kwb.h +++ b/include/configs/kwb.h @@ -112,7 +112,6 @@ BUR_COMMON_ENV \ #undef CONFIG_BOOTM_RTEMS /* Support both device trees and ATAGs. */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index d5cbb33..6c9eed4 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -23,7 +23,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h index f8cae40..842169d 100644 --- a/include/configs/lacie_kw.h +++ b/include/configs/lacie_kw.h @@ -176,11 +176,6 @@ #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* - * Enable device tree support - */ -#define CONFIG_OF_LIBFDT - -/* * Environment variables configurations */ #define CONFIG_ENV_IS_IN_SPI_FLASH diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h new file mode 100644 index 0000000..79fa3c4 --- /dev/null +++ b/include/configs/legoev3.h @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2016 David Lechner <david@lechnology.com> + * + * Based on da850evm.h + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * + * Based on davinci_dvevm.h. Original Copyrights follow: + * + * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * SoC Configuration + */ +#define CONFIG_MACH_DAVINCI_DA850_EVM +#define CONFIG_SOC_DA8XX /* TI DA8xx SoC */ +#define CONFIG_SOC_DA850 /* TI DA850 SoC */ +#define CONFIG_SYS_EXCEPTION_VECTORS_HIGH +#define CONFIG_SYS_CLK_FREQ clk_get(DAVINCI_ARM_CLKID) +#define CONFIG_SYS_OSCIN_FREQ 24000000 +#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE +#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT + +#define CONFIG_SYS_TEXT_BASE 0xc1080000 + + +/* + * Memory Info + */ +#define CONFIG_SYS_MALLOC_LEN (0x10000 + 1*1024*1024) /* malloc() len */ +#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */ +#define PHYS_SDRAM_1_SIZE (64 << 20) /* SDRAM size 64MB */ +#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/ + +/* memtest start addr */ +#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1 + 0x2000000) + +/* memtest will be run on 16MB */ +#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024) + +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ + +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \ + DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \ + DAVINCI_SYSCFG_SUSPSRC_SPI0 | \ + DAVINCI_SYSCFG_SUSPSRC_UART1 | \ + DAVINCI_SYSCFG_SUSPSRC_EMAC | \ + DAVINCI_SYSCFG_SUSPSRC_I2C) + +/* + * PLL configuration + */ +#define CONFIG_SYS_DV_CLKMODE 0 +#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 +#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 +#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 +#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 +#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 +#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 +#define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 +#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 + +#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 +#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 +#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 +#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 + +#define CONFIG_SYS_DA850_PLL0_PLLM 24 +#define CONFIG_SYS_DA850_PLL1_PLLM 21 + +/* + * DDR2 memory configuration + */ +#define CONFIG_SYS_DA850_DDR2_DDRPHYCR (DV_DDR_PHY_PWRDNEN | \ + DV_DDR_PHY_EXT_STRBEN | \ + (0x4 << DV_DDR_PHY_RD_LATENCY_SHIFT)) + +#define CONFIG_SYS_DA850_DDR2_SDBCR ( \ + (1 << DV_DDR_SDCR_MSDRAMEN_SHIFT) | \ + (1 << DV_DDR_SDCR_DDREN_SHIFT) | \ + (1 << DV_DDR_SDCR_SDRAMEN_SHIFT) | \ + (1 << DV_DDR_SDCR_BUS_WIDTH_SHIFT) | \ + (0x3 << DV_DDR_SDCR_CL_SHIFT) | \ + (0x2 << DV_DDR_SDCR_IBANK_SHIFT) | \ + (0x2 << DV_DDR_SDCR_PAGESIZE_SHIFT)) + +/* SDBCR2 is only used if IBANK_POS bit in SDBCR is set */ +#define CONFIG_SYS_DA850_DDR2_SDBCR2 0 + +#define CONFIG_SYS_DA850_DDR2_SDTIMR ( \ + (14 << DV_DDR_SDTMR1_RFC_SHIFT) | \ + (2 << DV_DDR_SDTMR1_RP_SHIFT) | \ + (2 << DV_DDR_SDTMR1_RCD_SHIFT) | \ + (1 << DV_DDR_SDTMR1_WR_SHIFT) | \ + (5 << DV_DDR_SDTMR1_RAS_SHIFT) | \ + (8 << DV_DDR_SDTMR1_RC_SHIFT) | \ + (1 << DV_DDR_SDTMR1_RRD_SHIFT) | \ + (0 << DV_DDR_SDTMR1_WTR_SHIFT)) + +#define CONFIG_SYS_DA850_DDR2_SDTIMR2 ( \ + (7 << DV_DDR_SDTMR2_RASMAX_SHIFT) | \ + (0 << DV_DDR_SDTMR2_XP_SHIFT) | \ + (0 << DV_DDR_SDTMR2_ODT_SHIFT) | \ + (17 << DV_DDR_SDTMR2_XSNR_SHIFT) | \ + (199 << DV_DDR_SDTMR2_XSRD_SHIFT) | \ + (0 << DV_DDR_SDTMR2_RTP_SHIFT) | \ + (0 << DV_DDR_SDTMR2_CKE_SHIFT)) + +#define CONFIG_SYS_DA850_DDR2_SDRCR 0x00000494 +#define CONFIG_SYS_DA850_DDR2_PBBPR 0x30 + +/* + * Serial Driver info + */ +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE -4 /* NS16550 register size */ +#define CONFIG_SYS_NS16550_COM1 DAVINCI_UART1_BASE /* Base address of UART1 */ +#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) +#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ +#define CONFIG_BAUDRATE 115200 /* Default baud rate */ + +#define CONFIG_SPI +#define CONFIG_CMD_SF +#define CONFIG_DAVINCI_SPI +#define CONFIG_SYS_SPI_BASE DAVINCI_SPI0_BASE +#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI0_CLKID) +#define CONFIG_SF_DEFAULT_SPEED 50000000 +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED + +/* + * I2C Configuration + */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_DAVINCI +#define CONFIG_SYS_DAVINCI_I2C_SPEED 400000 +#define CONFIG_SYS_DAVINCI_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ + +/* + * U-Boot general configuration + */ +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOOTFILE "uImage" /* Boot file name */ +#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) +#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */ +#define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1 + 0x700000) +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_LONGHELP +#define CONFIG_CRC32_VERIFY +#define CONFIG_MX_CYCLIC +#define CONFIG_OF_LIBFDT + +/* + * Linux Information + */ +#define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100) +#define CONFIG_HWCONFIG /* enable hwconfig */ +#define CONFIG_CMDLINE_TAG +#define CONFIG_REVISION_TAG +#define CONFIG_SERIAL_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_SETUP_INITRD_TAG +#define CONFIG_BOOTDELAY 0 +#define CONFIG_ZERO_BOOTDELAY_CHECK +#define CONFIG_BOOTCOMMAND \ + "if mmc rescan; then " \ + "if run loadbootscr; then " \ + "run bootscript; " \ + "else " \ + "if run loadimage; then " \ + "run mmcargs; " \ + "run mmcboot; " \ + "else " \ + "run flashargs; " \ + "run flashboot; " \ + "fi; " \ + "fi; " \ + "else " \ + "run flashargs; " \ + "run flashboot; " \ + "fi" +#define CONFIG_EXTRA_ENV_SETTINGS \ + "hostname=EV3\0" \ + "memsize=64M\0" \ + "filesyssize=10M\0" \ + "verify=n\0" \ + "console=ttyS1,115200n8\0" \ + "bootscraddr=0xC0600000\0" \ + "loadaddr=0xC0007FC0\0" \ + "filesysaddr=0xC1180000\0" \ + "fwupdateboot=mw 0xFFFF1FFC 0x5555AAAA; reset\0" \ + "mmcargs=setenv bootargs mem=${memsize} console=${console} root=/dev/mmcblk0p2 rw rootwait lpj=747520\0" \ + "mmcboot=bootm ${loadaddr}\0" \ + "flashargs=setenv bootargs mem=${memsize} initrd=${filesysaddr},${filesyssize} root=/dev/ram0 rw rootfstype=squashfs console=${console} lpj=747520\0" \ + "flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x300000; sf read ${filesysaddr} 0x350000 0x960000; bootm ${loadaddr}\0" \ + "loadimage=fatload mmc 0 ${loadaddr} uImage\0" \ + "loadbootscr=fatload mmc 0 ${bootscraddr} boot.scr\0" \ + "bootscript=source ${bootscraddr}\0" \ + +/* + * U-Boot commands + */ +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_DIAG +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_SAVES + +#ifdef CONFIG_CMD_BDI +#define CONFIG_CLOCKS +#endif + +#define CONFIG_CMD_SPI + +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_SYS_NO_FLASH +#define CONFIG_ENV_SIZE (16 << 10) + +/* SD/MMC configuration */ +#define CONFIG_MMC +#define CONFIG_DAVINCI_MMC_SD1 +#define CONFIG_GENERIC_MMC +#define CONFIG_DAVINCI_MMC + +/* + * Enable MMC commands only when + * MMC support is present + */ +#ifdef CONFIG_MMC +#define CONFIG_DOS_PARTITION +#define CONFIG_CMD_EXT3 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_MMC +#endif + +/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE 0xc0000000 + +#define CONFIG_SYS_INIT_SP_ADDR 0x80010000 + +#endif /* __CONFIG_H */ diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 39d747f..d7025f6 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -666,9 +666,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ #endif -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS #define CONFIG_CMD_BOOTZ #define CONFIG_MISC_INIT_R diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index ae58646..cee6281 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -509,9 +509,6 @@ #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ #endif -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS #define CONFIG_CMD_BOOTZ #define CONFIG_MISC_INIT_R diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index 6150bc1..ea25aad 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -28,14 +28,6 @@ #define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F 1 -/* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - #ifndef CONFIG_SYS_FSL_DDR4 #define CONFIG_SYS_FSL_DDR3 /* Use DDR3 memory */ #endif diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h index 158cf02..68e00c8 100644 --- a/include/configs/ls1043aqds.h +++ b/include/configs/ls1043aqds.h @@ -454,8 +454,6 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_ENV_SIZE 0x20000 #endif -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_MII #define CONFIG_CMDLINE_TAG diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h index 64b82e8..c9b0a2f 100644 --- a/include/configs/ls2080a_common.h +++ b/include/configs/ls2080a_common.h @@ -44,15 +44,6 @@ #define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F 1 -/* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - #ifndef CONFIG_SPL #define CONFIG_FSL_DDR_INTERACTIVE /* Interactive debugging */ #endif diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index 19ee5bc..8fb0135 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -37,7 +37,6 @@ #define CONFIG_SHOW_BOOT_PROGRESS #define CONFIG_KIRKWOOD_GPIO -#define CONFIG_OF_LIBFDT #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_HUSH_PARSER diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index 69172bb..648e189 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -300,16 +300,9 @@ CONFIG_SYS_I2C_DSPIC_KEYB_ADDR,\ CONFIG_SYS_I2C_DSPIC_IO_ADDR } -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP /* Update size in "reg" property of NOR FLASH device tree nodes */ #define CONFIG_FDT_FIXUP_NOR_FLASH_SIZE -#define CONFIG_FIT /* enable FIT image support */ - #define CONFIG_POST_KEY_MAGIC "3C+3E" /* press F3 + F5 keys to force POST */ #define CONFIG_PREBOOT "setenv bootdelay 15" diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 8063a1e..57599f9 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -12,8 +12,6 @@ #define MACH_TYPE_M28EVK 3613 #define CONFIG_MACH_TYPE MACH_TYPE_M28EVK -#define CONFIG_FIT - #define CONFIG_TIMESTAMP /* Print image info with timestamp */ /* U-Boot Commands */ diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h index fbaa600..1efe48c 100644 --- a/include/configs/m53evk.h +++ b/include/configs/m53evk.h @@ -19,8 +19,6 @@ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_FSL_CLK -#define CONFIG_FIT - #define CONFIG_TIMESTAMP /* Print image info with timestamp */ /* @@ -247,7 +245,6 @@ #define CONFIG_LOADADDR 0x70800000 #define CONFIG_BOOTCOMMAND "run mmc_mmc" #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR -#define CONFIG_OF_LIBFDT /* * NAND SPL diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h index f0d5e9d..7f8a59f 100644 --- a/include/configs/ma5d4evk.h +++ b/include/configs/ma5d4evk.h @@ -10,8 +10,6 @@ #define CONFIG_SYS_NO_FLASH -#define CONFIG_FIT - #define CONFIG_TIMESTAMP /* Print image info with timestamp */ #include "at91-sama5_common.h" diff --git a/include/configs/manroland/common.h b/include/configs/manroland/common.h index 941290c..3c081a2 100644 --- a/include/configs/manroland/common.h +++ b/include/configs/manroland/common.h @@ -115,8 +115,4 @@ */ #define CONFIG_LOOPW -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #endif /* __MANROLAND_COMMON_H */ diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 4eea06d..174cb5c 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -33,9 +33,6 @@ #include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap.h> -#define CONFIG_OF_LIBFDT -#define CONFIG_FIT - /* * Leave it at 0x80008000 to allow booting new u-boot.bin with X-loader * and older u-boot.bin with the new U-Boot SPL. diff --git a/include/configs/mecp5123.h b/include/configs/mecp5123.h index 0f39964..e561026 100644 --- a/include/configs/mecp5123.h +++ b/include/configs/mecp5123.h @@ -427,9 +427,6 @@ #define CONFIG_BOOTCOMMAND "run flash_self" -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP - #define OF_CPU "PowerPC,5121@0" #define OF_SOC_COMPAT "fsl,mpc5121-immr" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h index cd89fa5..4c05fc8 100644 --- a/include/configs/medcom-wide.h +++ b/include/configs/medcom-wide.h @@ -50,9 +50,6 @@ /* LCD support */ #define CONFIG_SYS_WHITE_ON_BLACK -/* support the new (FDT-based) image format */ -#define CONFIG_FIT - #include "tegra-common-post.h" #endif /* __CONFIG_H */ diff --git a/include/configs/meesc.h b/include/configs/meesc.h index 10a6ce9..88fb3e8 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -57,7 +57,6 @@ #define CONFIG_PREBOOT /* enable preboot variable */ #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT /* * Hardware drivers @@ -153,7 +152,6 @@ /* Ethernet */ #define CONFIG_MACB #define CONFIG_RMII -#define CONFIG_FIT #define CONFIG_NET_RETRY_COUNT 20 #undef CONFIG_RESET_PHY_R diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 97a0d86..27668f2 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -284,7 +284,6 @@ /* Enable flat device tree support */ #define CONFIG_LMB 1 -#define CONFIG_OF_LIBFDT 1 #if defined(CONFIG_XILINX_AXIEMAC) # define CONFIG_MII 1 diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h index 1cb135b..10ca05f 100644 --- a/include/configs/minnowmax.h +++ b/include/configs/minnowmax.h @@ -42,9 +42,6 @@ #define VIDEO_IO_OFFSET 0 #define CONFIG_X86EMU_RAW_IO -#define CONFIG_FIT_SIGNATURE -#define CONFIG_RSA - #define CONFIG_ENV_SECT_SIZE 0x1000 #define CONFIG_ENV_OFFSET 0x007fe000 diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h index a8cf201..f4d5dbc 100644 --- a/include/configs/motionpro.h +++ b/include/configs/motionpro.h @@ -377,10 +377,6 @@ extern void __led_set(led_id_t id, int state); /* Not needed for MPC 5xxx U-Boot, but used by tools/updater */ #define CONFIG_SYS_RESET_ADDRESS 0xfff00100 -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/mpc5121ads.h b/include/configs/mpc5121ads.h index 5f4e157..4ac291c 100644 --- a/include/configs/mpc5121ads.h +++ b/include/configs/mpc5121ads.h @@ -586,8 +586,6 @@ #define CONFIG_BOOTCOMMAND "run flash_self" -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 #define OF_CPU "PowerPC,5121@0" diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h index a90083f..1bab9ab 100644 --- a/include/configs/mpc8308_p1m.h +++ b/include/configs/mpc8308_p1m.h @@ -305,11 +305,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/munices.h b/include/configs/munices.h index c34cba3..0601256 100644 --- a/include/configs/munices.h +++ b/include/configs/munices.h @@ -184,10 +184,6 @@ #define CONFIG_SYS_CS_DEADCYCLE 0x33333333 #define CONFIG_SYS_RESET_ADDRESS 0xff000000 -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_TBCLK (bd->bi_busfreq / 4) #define OF_SOC "soc5200@f0000000" diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index d12d725..674aa0a 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -60,8 +60,6 @@ #define CONFIG_BOOTDELAY 3 /* default enable autoboot */ #define CONFIG_PREBOOT -#define CONFIG_OF_LIBFDT /* Device tree support */ - /* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is diff --git a/include/configs/mv-plug-common.h b/include/configs/mv-plug-common.h index d7d8d81..496bc1f 100644 --- a/include/configs/mv-plug-common.h +++ b/include/configs/mv-plug-common.h @@ -28,11 +28,6 @@ #endif /* CONFIG_SYS_MVFS */ /* - * Enable device tree support - */ -#define CONFIG_OF_LIBFDT - -/* * Commands configuration */ #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h index f113302..6dbeeca 100644 --- a/include/configs/mx25pdk.h +++ b/include/configs/mx25pdk.h @@ -82,7 +82,6 @@ #define CONFIG_SYS_LONGHELP /* U-Boot commands */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE #define CONFIG_CMD_MMC diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h index ae9f091..5f94e19 100644 --- a/include/configs/mx31ads.h +++ b/include/configs/mx31ads.h @@ -22,16 +22,6 @@ #define CONFIG_MACH_TYPE MACH_TYPE_MX31ADS -/* - * Disabled for now due to build problems under Debian and a significant increase - * in the final file size: 144260 vs. 109536 Bytes. - */ -#if 0 -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 -#endif - #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index 1b2f952..1177b0a 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -79,7 +79,6 @@ /* * Command definition */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 32cd58e..31cd5bb 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -28,8 +28,6 @@ #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG -#define CONFIG_OF_LIBFDT - #define CONFIG_MACH_TYPE MACH_TYPE_MX51_BABBAGE /* * Size of malloc() pool diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h index 25a4630..22e1b68 100644 --- a/include/configs/mx53ard.h +++ b/include/configs/mx53ard.h @@ -225,7 +225,6 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_OF_LIBFDT #define MX53ARD_CS1GCR1 (CSEN | DSZ(2)) #define MX53ARD_CS1RCR1 (RCSN(2) | OEN (1) | RWSC(22)) diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index 37430f0..fca567d 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -25,8 +25,6 @@ #define CONFIG_SYS_FSL_CLK -#define CONFIG_OF_LIBFDT - /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 54d3e3e..cfb3ae3 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -217,8 +217,6 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_OF_LIBFDT - #define CONFIG_CMD_SATA #ifdef CONFIG_CMD_SATA #define CONFIG_DWC_AHSATA diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h index d915b88..33d2163 100644 --- a/include/configs/mx53smd.h +++ b/include/configs/mx53smd.h @@ -159,6 +159,4 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_OF_LIBFDT - #endif /* __CONFIG_H */ diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 179b4f9..3abc773 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -69,7 +69,6 @@ #define CONFIG_BAUDRATE 115200 /* Filesystems and image support */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_SUPPORT_RAW_INITRD #define CONFIG_CMD_FS_GENERIC diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 29d1f91..a6d821b 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -225,7 +225,11 @@ #define CONFIG_BMP_16BPP #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO -#define CONFIG_IPUV3_CLK 260000000 +#ifdef CONFIG_MX6DL +#define CONFIG_IPUV3_CLK 198000000 +#else +#define CONFIG_IPUV3_CLK 264000000 +#endif #define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index c7e10f9..2fff34a 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -187,7 +187,6 @@ #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_CMD_BMODE diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index bfad696..dcc53f0 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -50,7 +50,6 @@ #define CONFIG_BAUDRATE 115200 /* Filesystems and image support */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #define CONFIG_DOS_PARTITION #define CONFIG_CMD_EXT2 diff --git a/include/configs/mxs.h b/include/configs/mxs.h index 4c490ae..a4ffe75 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -41,9 +41,6 @@ * CPU specifics */ -/* MXS uses FDT */ -#define CONFIG_OF_LIBFDT - /* Startup hooks */ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_ARCH_MISC_INIT diff --git a/include/configs/nas220.h b/include/configs/nas220.h index e5ff7e1..36a00d3 100644 --- a/include/configs/nas220.h +++ b/include/configs/nas220.h @@ -137,12 +137,6 @@ #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET #endif - -/* - * Device Tree - */ -#define CONFIG_OF_LIBFDT - /* * EFI partition */ diff --git a/include/configs/neo.h b/include/configs/neo.h index bc01416..bd2b190 100644 --- a/include/configs/neo.h +++ b/include/configs/neo.h @@ -35,8 +35,6 @@ #define PLLMR1_DEFAULT PLLMR1_266_133_66_33 /* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ #define CONFIG_FIT_DISABLE_SHA256 #define CONFIG_ENV_IS_IN_FLASH /* use FLASH for environment vars */ diff --git a/include/configs/novena.h b/include/configs/novena.h index a541613..d11cdc3 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -13,7 +13,6 @@ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT #define CONFIG_MISC_INIT_R -#define CONFIG_FIT #define CONFIG_KEYBOARD #include <config_distro_defaults.h> diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h index d528fac..0b6173b 100644 --- a/include/configs/nyan-big.h +++ b/include/configs/nyan-big.h @@ -65,10 +65,6 @@ /* General networking support */ #define CONFIG_CMD_DHCP -#define CONFIG_FIT -#define CONFIG_FIT_BEST_MATCH -#define CONFIG_OF_LIBFDT - #define CONFIG_KEYBOARD #undef CONFIG_LOADADDR diff --git a/include/configs/o2dnt-common.h b/include/configs/o2dnt-common.h index 8b0dbdc..73a44a7 100644 --- a/include/configs/o2dnt-common.h +++ b/include/configs/o2dnt-common.h @@ -332,9 +332,6 @@ /* * DT support */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_SOC "soc5200@f0000000" #define OF_TBCLK (bd->bi_busfreq / 4) diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 8e67159..9d764d5 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -47,8 +47,6 @@ #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_CMD_BOOTZ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE #define CONFIG_BOOTARGS "Please use defined boot" #define CONFIG_BOOTCOMMAND "run autoboot" #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index bce4fad..fc7bfce 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -196,7 +196,6 @@ #define CONFIG_SYS_LONGHELP #define CONFIG_CRC32_VERIFY #define CONFIG_MX_CYCLIC -#define CONFIG_OF_LIBFDT /* * Linux Information diff --git a/include/configs/openrisc-generic.h b/include/configs/openrisc-generic.h index c854189..28e4275 100644 --- a/include/configs/openrisc-generic.h +++ b/include/configs/openrisc-generic.h @@ -120,7 +120,6 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING -#define CONFIG_OF_LIBFDT #define CONFIG_LMB /* diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 60bedaa..799521e 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -665,17 +665,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/p1_twr.h b/include/configs/p1_twr.h index 77ba2d8..1e49ee6 100644 --- a/include/configs/p1_twr.h +++ b/include/configs/p1_twr.h @@ -231,17 +231,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #endif -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ diff --git a/include/configs/pcm030.h b/include/configs/pcm030.h index 29feb7b..b4a7225 100644 --- a/include/configs/pcm030.h +++ b/include/configs/pcm030.h @@ -418,9 +418,6 @@ RTC configuration #define CONFIG_USB_STORAGE /* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 - #define OF_CPU "PowerPC,5200@0" #define OF_TBCLK CONFIG_SYS_MPC5XXX_CLKIN #define OF_SOC "soc5200@f0000000" diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h index 9d80306..4e29cf3 100644 --- a/include/configs/pcm052.h +++ b/include/configs/pcm052.h @@ -267,7 +267,6 @@ #define CONFIG_ENV_OFFSET_REDUND 0xC0000 #endif -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #endif diff --git a/include/configs/pdm360ng.h b/include/configs/pdm360ng.h index a6e7e9c..f2c05f8 100644 --- a/include/configs/pdm360ng.h +++ b/include/configs/pdm360ng.h @@ -461,11 +461,7 @@ #define CONFIG_BOOTCOMMAND "run env_cont" -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE #define OF_CPU "PowerPC,5121@0" #define OF_SOC_COMPAT "fsl,mpc5121-immr" diff --git a/include/configs/picosam9g45.h b/include/configs/picosam9g45.h index 47613de..b2ba6fc 100644 --- a/include/configs/picosam9g45.h +++ b/include/configs/picosam9g45.h @@ -34,8 +34,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT - /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 1d6df32..4590063 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -47,9 +47,6 @@ /* General networking support */ #define CONFIG_CMD_DHCP -/* support the new (FDT-based) image format */ -#define CONFIG_FIT - #include "tegra-common-post.h" #endif /* __CONFIG_H */ diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h index d896bca..145a933 100644 --- a/include/configs/pxm2.h +++ b/include/configs/pxm2.h @@ -149,8 +149,4 @@ #define CONFIG_SYS_CONSOLE_FG_COL 0x00 #endif -#ifndef CONFIG_SPL_BUILD -#define CONFIG_FIT -#endif - #endif /* ! __CONFIG_PXM2_H */ diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index 2dfea33..293684e 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -117,15 +117,6 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* * General PCI * Memory space is mapped 1-1, but I/O space must start from 0. diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h index f750b53..6bc33e0 100644 --- a/include/configs/rcar-gen2-common.h +++ b/include/configs/rcar-gen2-common.h @@ -40,7 +40,6 @@ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_CMDLINE_EDITING -#define CONFIG_OF_LIBFDT #define CONFIG_BAUDRATE 38400 #define CONFIG_BOOTDELAY 3 diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index 427ac4b..5322685 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -19,7 +19,6 @@ #define CONFIG_SYS_MALLOC_LEN (32 << 20) #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_THUMB_BUILD -#define CONFIG_OF_LIBFDT #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000) diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h index 2c3b026..7250e37 100644 --- a/include/configs/rpi-common.h +++ b/include/configs/rpi-common.h @@ -126,8 +126,6 @@ #define CONFIG_PARTITION_UUIDS #define CONFIG_CMD_PART -/* Device tree support */ -#define CONFIG_OF_BOARD_SETUP /* ATAGs support for bootm/bootz */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG diff --git a/include/configs/rut.h b/include/configs/rut.h index 78264ba..cf018e0 100644 --- a/include/configs/rut.h +++ b/include/configs/rut.h @@ -148,8 +148,4 @@ #define CONFIG_SYS_CONSOLE_FG_COL 0x00 #endif -#ifndef CONFIG_SPL_BUILD -#define CONFIG_FIT -#endif - #endif /* ! __CONFIG_RUT_H */ diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index f92c23d..40fb5ed 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -278,7 +278,4 @@ #define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE -#define CONFIG_OF_LIBFDT - - #endif /* __CONFIG_H */ diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 4bffd8d..cc22467 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -28,7 +28,6 @@ /* Number of bits in a C 'long' on this architecture */ #define CONFIG_SANDBOX_BITS_PER_LONG 64 -#define CONFIG_OF_LIBFDT #define CONFIG_LMB #define CONFIG_CMD_FDT #define CONFIG_ANDROID_BOOT_IMAGE @@ -44,6 +43,8 @@ #define CONFIG_CMD_FAT #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE +#define CONFIG_CMD_CBFS +#define CONFIG_CMD_CRAMFS #define CONFIG_CMD_PART #define CONFIG_DOS_PARTITION #define CONFIG_HOST_MAX_DEVICES 4 @@ -53,8 +54,11 @@ #define CONFIG_CMD_GPT #define CONFIG_PARTITION_UUIDS -#define CONFIG_EFI_PARTITION +#define CONFIG_AMIGA_PARTITION #define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION +#define CONFIG_ISO_PARTITION +#define CONFIG_MAC_PARTITION /* * Size of malloc() pool, before and after relocation diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h index 25ec7bc..b74a268 100644 --- a/include/configs/sbc8349.h +++ b/include/configs/sbc8349.h @@ -282,11 +282,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h index 9783804..56c197c 100644 --- a/include/configs/sbc8548.h +++ b/include/configs/sbc8548.h @@ -419,11 +419,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * I2C */ diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h index f88d685..b7238fb 100644 --- a/include/configs/sbc8641d.h +++ b/include/configs/sbc8641d.h @@ -263,13 +263,6 @@ #endif /* - * Pass open firmware flat tree to kernel - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h index ebc3d64..c529636 100644 --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h @@ -60,12 +60,12 @@ */ #define CONFIG_BOOTCOMMAND "${x_bootcmd_kernel}; " \ "setenv bootargs ${x_bootargs} ${x_bootargs_root}; " \ - "${x_bootcmd_usb}; bootm 0x6400000;" + "bootm 0x6400000;" #define CONFIG_MTDPARTS \ - "mtdparts=orion_nand:512K(uboot)," \ + "orion_nand:512K(uboot)," \ "512K(env),1M(script),6M(kernel)," \ - "12M(ramdisk),4M(spare),-(rootfs)" + "12M(ramdisk),4M(spare),-(rootfs)\0" #define CONFIG_EXTRA_ENV_SETTINGS "x_bootargs=console" \ "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS \ diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index eac7270..3a8b90e 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -625,7 +625,6 @@ #define CONFIG_BOOTCOUNT_ENV /* Enable Device-Tree (FDT) support */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_FDT #endif /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */ diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index de7b6bc..d06e648 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -241,12 +241,7 @@ # undef CONFIG_CMD_NFS #endif /* CONFIG_MACB */ -#if !defined(CONFIG_SPL_BUILD) -/* Enable Device-Tree (FDT) support */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_FDT -#define CONFIG_FIT -#endif #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_INIT_SP_ADDR 0x301000 diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h index db79e54..d52f500 100644 --- a/include/configs/smdkc100.h +++ b/include/configs/smdkc100.h @@ -214,7 +214,4 @@ #define CONFIG_ENV_SROM_BANK 3 /* Select SROM Bank-3 for Ethernet*/ #endif /* CONFIG_CMD_NET */ -#define CONFIG_OF_LIBFDT - - #endif /* __CONFIG_H */ diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h index e5cf7d2..a708c68 100644 --- a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h @@ -29,7 +29,6 @@ #define CONFIG_INITRD_TAG #define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_DISPLAY_CPUINFO -#define CONFIG_FIT /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 0501bd1..cd48c9e 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -24,8 +24,6 @@ #define CONFIG_CRC32_VERIFY -#define CONFIG_FIT -#define CONFIG_OF_LIBFDT #define CONFIG_SYS_BOOTMAPSZ (64 * 1024 * 1024) #define CONFIG_TIMESTAMP /* Print image info with timestamp */ diff --git a/include/configs/socrates.h b/include/configs/socrates.h index f8bddca..62be008 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -17,11 +17,6 @@ #ifndef __CONFIG_H #define __CONFIG_H -/* new uImage format support */ -#define CONFIG_FIT 1 -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ - /* High Level Configuration Options */ #define CONFIG_BOOKE 1 /* BOOKE */ #define CONFIG_E500 1 /* BOOKE e500 family */ @@ -429,8 +424,6 @@ #define CONFIG_BOOTCOMMAND "run boot_nor" /* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 /* USB support */ #define CONFIG_USB_OHCI_NEW 1 diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 85d492d..41f1b69 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -11,8 +11,6 @@ #define CONFIG_SYS_THUMB_BUILD #define CONFIG_STM32F4DISCOVERY -#define CONFIG_OF_LIBFDT - #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_MISC_INIT_R diff --git a/include/configs/strider.h b/include/configs/strider.h index 8771cdc..0342400 100644 --- a/include/configs/strider.h +++ b/include/configs/strider.h @@ -30,10 +30,6 @@ #define CONFIG_BOARD_EARLY_INIT_R #define CONFIG_LAST_STAGE_INIT -/* new uImage format support */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 - #define CONFIG_MMC #define CONFIG_FSL_ESDHC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC83xx_ESDHC_ADDR @@ -322,9 +318,6 @@ #define CONFIG_SYS_HUSH_PARSER /* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ #define CONFIG_SYS_I2C diff --git a/include/configs/stv0991.h b/include/configs/stv0991.h index 6db628a..375159e 100644 --- a/include/configs/stv0991.h +++ b/include/configs/stv0991.h @@ -71,8 +71,6 @@ #define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTCOMMAND "go 0x40040000" -#define CONFIG_OF_LIBFDT - /* + * QSPI support + */ diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 40850e5..b26363d 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -174,6 +174,7 @@ #define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */ #define CONFIG_IDENT_STRING " Allwinner Technology" +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */ #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ @@ -296,11 +297,6 @@ extern int soft_i2c_gpio_scl; /* stop x86 thinking in cfbconsole from trying to init a pc keyboard */ #define CONFIG_VGA_AS_SINGLE_DEVICE -/* To be able to hook simplefb into dt */ -#ifdef CONFIG_VIDEO_DT_SIMPLEFB -#define CONFIG_OF_BOARD_SETUP -#endif - #endif /* CONFIG_VIDEO */ /* Ethernet support */ diff --git a/include/configs/t3corp.h b/include/configs/t3corp.h index 7942865..1ac54e2 100644 --- a/include/configs/t3corp.h +++ b/include/configs/t3corp.h @@ -34,7 +34,6 @@ #define CONFIG_BOARD_EARLY_INIT_R 1 /* Call board_early_init_r */ #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ #define CONFIG_BOARD_TYPES 1 /* support board types */ -#define CONFIG_FIT #define CFG_ALT_MEMTEST /* diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h index 5788a70..ca6d285 100644 --- a/include/configs/t4qds.h +++ b/include/configs/t4qds.h @@ -157,15 +157,6 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - -/* new uImage format support */ -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 2d941ca..a532417 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -258,8 +258,6 @@ #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x80000 -#define CONFIG_OF_LIBFDT -#define CONFIG_FIT #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS #define CONFIG_RBTREE diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h index d5aba70..73cd0a0 100644 --- a/include/configs/tao3530.h +++ b/include/configs/tao3530.h @@ -46,8 +46,6 @@ #define CONFIG_MISC_INIT_R -#define CONFIG_OF_LIBFDT - #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/taurus.h b/include/configs/taurus.h index 1d6f9c3..c1581d8 100644 --- a/include/configs/taurus.h +++ b/include/configs/taurus.h @@ -52,7 +52,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_CMD_BOOTZ -#define CONFIG_OF_LIBFDT /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ diff --git a/include/configs/tb100.h b/include/configs/tb100.h index e06484f..62b9de3 100644 --- a/include/configs/tb100.h +++ b/include/configs/tb100.h @@ -68,8 +68,6 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING -#define CONFIG_OF_LIBFDT - #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_MAXARGS 16 diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 0f23034..33ac955 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -61,7 +61,6 @@ /* Filesystems / image support */ #define CONFIG_EFI_PARTITION -#define CONFIG_FIT /* MMC */ #define CONFIG_SYS_FSL_USDHC_NUM 3 diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h index a9e3e66..019e32c 100644 --- a/include/configs/tec-ng.h +++ b/include/configs/tec-ng.h @@ -58,8 +58,6 @@ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG -/* support the new (FDT-based) image format */ -#define CONFIG_FIT #include "tegra-common-post.h" diff --git a/include/configs/tec.h b/include/configs/tec.h index 50b9e97..a947214 100644 --- a/include/configs/tec.h +++ b/include/configs/tec.h @@ -50,9 +50,6 @@ /* LCD support */ #define CONFIG_SYS_WHITE_ON_BLACK -/* support the new (FDT-based) image format */ -#define CONFIG_FIT - #include "tegra-common-post.h" #endif /* __CONFIG_H */ diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index ba819c4..b07ee56 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -141,6 +141,4 @@ #define CONFIG_FAT_WRITE #endif -#define CONFIG_OF_SYSTEM_SETUP - #endif /* _TEGRA_COMMON_H_ */ diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index cd9d6b6..9f186ad 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -77,7 +77,6 @@ #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST #define CONFIG_PREBOOT -#define CONFIG_FIT #define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " diff --git a/include/configs/thunderx_88xx.h b/include/configs/thunderx_88xx.h index cece4dd..46d91e2 100644 --- a/include/configs/thunderx_88xx.h +++ b/include/configs/thunderx_88xx.h @@ -22,45 +22,12 @@ #define MEM_BASE 0x00500000 -#define CONFIG_COREID_MASK 0xffffff - -#define CONFIG_SYS_FULL_VA - #define CONFIG_SYS_LOWMEM_BASE MEM_BASE -#define CONFIG_SYS_MEM_MAP {{0x000000000000UL, 0x40000000000UL, \ - PTL2_MEMTYPE(MT_NORMAL) | \ - PTL2_BLOCK_NON_SHARE}, \ - {0x800000000000UL, 0x40000000000UL, \ - PTL2_MEMTYPE(MT_DEVICE_NGNRNE) | \ - PTL2_BLOCK_NON_SHARE}, \ - {0x840000000000UL, 0x40000000000UL, \ - PTL2_MEMTYPE(MT_DEVICE_NGNRNE) | \ - PTL2_BLOCK_NON_SHARE}, \ - } - -#define CONFIG_SYS_MEM_MAP_SIZE 3 - -#define CONFIG_SYS_VA_BITS 48 -#define CONFIG_SYS_PTL2_BITS 42 -#define CONFIG_SYS_BLOCK_SHIFT 29 -#define CONFIG_SYS_PTL1_ENTRIES 64 -#define CONFIG_SYS_PTL2_ENTRIES 8192 - -#define CONFIG_SYS_PGTABLE_SIZE \ - ((CONFIG_SYS_PTL1_ENTRIES + \ - CONFIG_SYS_MEM_MAP_SIZE * CONFIG_SYS_PTL2_ENTRIES) * 8) -#define CONFIG_SYS_TCR_EL1_IPS_BITS (5UL << 32) -#define CONFIG_SYS_TCR_EL2_IPS_BITS (5 << 16) -#define CONFIG_SYS_TCR_EL3_IPS_BITS (5 << 16) - /* Link Definitions */ #define CONFIG_SYS_TEXT_BASE 0x00500000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) -/* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT - /* SMP Spin Table Definitions */ #define CPU_RELEASE_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h index 3d0498d..f00072e 100644 --- a/include/configs/ti814x_evm.h +++ b/include/configs/ti814x_evm.h @@ -33,7 +33,6 @@ #define CONFIG_SYS_NO_FLASH #define CONFIG_MACH_TYPE MACH_TYPE_TI8148EVM -#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG /* for ramdisk support */ diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h index 533fae7..e09efc7 100644 --- a/include/configs/ti816x_evm.h +++ b/include/configs/ti816x_evm.h @@ -28,7 +28,6 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_MACH_TYPE MACH_TYPE_TI8168EVM -#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG /* required for ramdisk support */ diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index edbd820..4535b8c 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -28,6 +28,7 @@ #endif #define CONFIG_SYS_NS16550_CLK 48000000 +#ifndef CONFIG_SPL_BUILD /* Network defines. */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_MII @@ -38,9 +39,10 @@ #define CONFIG_BOOTP_SUBNETMASK #define CONFIG_NET_RETRY_COUNT 10 #define CONFIG_CMD_PING -#define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ +#endif +#define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ /* * RTC related defines. To use bootcount you must set bootlimit in the * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 199612b..787d04a 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -24,7 +24,6 @@ #define CONFIG_SYS_NO_FLASH /* Support both device trees and ATAGs. */ -#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG @@ -64,7 +63,30 @@ "args_mmc=run finduuid;setenv bootargs console=${console} " \ "${optargs} " \ "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "bootenvfile=uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootscript; then " \ + "run bootscript;" \ + "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \ /* * DDR information. If the CONFIG_NR_DRAM_BANKS is not defined, diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index a7206f4..6a3beac 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -195,6 +195,7 @@ #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI_KEYSTONE #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 +#define CONFIG_USB_STORAGE #define CONFIG_EFI_PARTITION #define CONFIG_FS_FAT #define CONFIG_SYS_CACHELINE_SIZE 64 @@ -223,10 +224,31 @@ /* EDMA3 */ #define CONFIG_TI_EDMA3 +#define DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "name_fw_rd=k2-fw-initrd.cpio.gz\0" \ + "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \ + "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + "init_fw_rd_ramfs=setenv rd_spec -\0" \ + "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + +#define DEFAULT_PMMC_BOOT_ENV \ + "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \ + "dev_pmmc=0\0" \ + "get_pmmc_net=dhcp ${loadaddr} ${tftp_root}/${name_pmmc}\0" \ + "get_pmmc_ramfs=run get_pmmc_net\0" \ + "get_pmmc_mmc=load mmc ${bootpart} ${loadaddr} " \ + "${bootdir}/${name_pmmc}\0" \ + "get_pmmc_ubi=ubifsload ${loadaddr} ${bootdir}/${name_pmmc}\0" \ + "run_pmmc=rproc init; rproc list; " \ + "rproc load ${dev_pmmc} ${loadaddr} 0x${filesize}; " \ + "rproc start ${dev_pmmc}\0" \ + #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ - "boot=ubi\0" \ + "bootdir=/boot\0" \ "tftp_root=/\0" \ "nfs_root=/export\0" \ "mem_lpae=1\0" \ @@ -235,18 +257,22 @@ "addr_secdb_key=0xc000000\0" \ "name_kern=zImage\0" \ "run_mon=mon_install ${addr_mon}\0" \ - "run_kern=bootz ${loadaddr} - ${fdtaddr}\0" \ + "run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ "init_net=run args_all args_net\0" \ + "init_nfs=setenv autoload no; dhcp; run args_all args_net\0" \ "init_ubi=run args_all args_ubi; " \ - "ubi part ubifs; ubifsmount ubi:boot;" \ - "ubifsload ${addr_secdb_key} securedb.key.bin;\0" \ + "ubi part ubifs; ubifsmount ubi:rootfs;\0" \ "get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}\0" \ - "get_fdt_ubi=ubifsload ${fdtaddr} ${name_fdt}\0" \ + "get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt}\0" \ + "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \ "get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern}\0" \ - "get_kern_ubi=ubifsload ${loadaddr} ${name_kern}\0" \ + "get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern}\0" \ + "get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \ "get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0" \ - "get_mon_ubi=ubifsload ${addr_mon} ${name_mon}\0" \ + "get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon}\0" \ + "get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon}\0" \ "get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot}\0" \ + "get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot}\0" \ "burn_uboot_spi=sf probe; sf erase 0 0x80000; " \ "sf write ${loadaddr} 0 ${filesize}\0" \ "burn_uboot_nand=nand erase 0 0x100000; " \ @@ -261,6 +287,7 @@ "get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0" \ "get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs}\0" \ "get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi}\0" \ + "get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi}\0" \ "burn_ubi=nand erase.part ubifs; " \ "nand write ${addr_ubi} ubifs ${filesize}\0" \ "init_ramfs=run args_all args_ramfs get_fs_ramfs\0" \ @@ -271,15 +298,14 @@ "mtdparts=mtdparts=davinci_nand.0:" \ "1024k(bootloader)ro,512k(params)ro,-(ubifs)\0" +#ifndef CONFIG_BOOTCOMMAND #define CONFIG_BOOTCOMMAND \ - "run init_${boot} get_fdt_${boot} get_mon_${boot} " \ - "get_kern_${boot} run_mon run_kern" + "run init_${boot} init_fw_rd_${boot} get_fdt_${boot} " \ + "get_mon_${boot} get_kern_${boot} run_mon run_kern" +#endif #define CONFIG_BOOTARGS \ -/* Linux interfacing */ -#define CONFIG_OF_BOARD_SETUP - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 8b6c065..586d848 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -17,7 +17,6 @@ */ #define CONFIG_OMAP4430 1 /* which is in a 4430 */ #define CONFIG_MISC_INIT_R -#define CONFIG_ARCH_CPU_INIT #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1 @@ -104,6 +103,7 @@ #define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot; " \ "run distro_bootcmd" #include <config_distro_bootcmd.h> @@ -118,12 +118,6 @@ "bootfile=zImage\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc${mmcdev} ...; " \ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index d164e6a..202b18c 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -19,7 +19,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO -#define CONFIG_ARCH_CPU_INIT /* Common ARM Erratas */ #define CONFIG_ARM_ERRATA_798870 @@ -85,22 +84,10 @@ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ "source ${loadaddr}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ "if run loadimage; then " \ "run loadfdt; " \ "echo Booting from mmc${mmcdev} ...; " \ @@ -117,6 +104,8 @@ "setenv fdtfile dra72-evm.dtb; fi;" \ "if test $board_name = beagle_x15; then " \ "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ + "if test $board_name = am57xx_evm; then " \ + "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \ @@ -131,6 +120,7 @@ "echo Booting into fastboot ...; fastboot 0;" \ "fi;" \ "run findfdt; " \ + "run envboot; " \ "run mmcboot;" \ "setenv mmcdev 1; " \ "setenv bootpart 1:2; " \ diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 31d7757..1fd3f2a 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -378,11 +378,6 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE - /* * All the defines above are for the TQMa6 SoM * diff --git a/include/configs/trats.h b/include/configs/trats.h index 5fb991b..7caf0ac 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -49,8 +49,6 @@ #define MACH_TYPE_TRATS 3928 #define CONFIG_MACH_TYPE MACH_TYPE_TRATS -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE #define CONFIG_BOOTARGS "Please use defined boot" #define CONFIG_BOOTCOMMAND "run autoboot" #define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" diff --git a/include/configs/trats2.h b/include/configs/trats2.h index f12a952..a5f6c11 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -41,8 +41,6 @@ #define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define CONFIG_FIT -#define CONFIG_FIT_VERBOSE #define CONFIG_BOOTARGS "Please use defined boot" #define CONFIG_BOOTCOMMAND "run autoboot" #define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 2ec2f01..915cbd8 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -60,8 +60,6 @@ #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG -#define CONFIG_OF_LIBFDT - /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (1024*1024) diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h index 50e1abb..fcc9d80 100644 --- a/include/configs/ts4800.h +++ b/include/configs/ts4800.h @@ -24,8 +24,6 @@ #define CONFIG_HW_WATCHDOG -#define CONFIG_OF_LIBFDT - #define CONFIG_MACH_TYPE MACH_TYPE_TS48XX /* text base address used when linking */ diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 43cf965..901dfd7 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -42,9 +42,7 @@ #define CONFIG_POWER_TPS65217 /* Support both device trees and ATAGs. */ -#define CONFIG_OF_LIBFDT #define CONFIG_USE_FDT /* use fdt within board code */ -#define CONFIG_OF_BOARD_SETUP #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index b1c8ccb..1a74489 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -249,9 +249,6 @@ #define CONFIG_SYS_BOOTMAPSZ 0x20000000 -/* Open Firmware flat tree */ -#define CONFIG_OF_LIBFDT - #define CONFIG_SYS_SDRAM_BASE 0x80000000 #define CONFIG_NR_DRAM_BANKS 2 diff --git a/include/configs/usb_a9263.h b/include/configs/usb_a9263.h index 54daede..7b2f1ca 100644 --- a/include/configs/usb_a9263.h +++ b/include/configs/usb_a9263.h @@ -33,7 +33,6 @@ #define CONFIG_DISPLAY_CPUINFO -#define CONFIG_OF_LIBFDT #define CONFIG_SYS_TEXT_BASE 0x23f00000 /* diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h index 6f66662..7e24fc6 100644 --- a/include/configs/usbarmory.h +++ b/include/configs/usbarmory.h @@ -16,7 +16,6 @@ #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_FSL_CLK #define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_OF_LIBFDT #define CONFIG_MXC_GPIO #include <asm/arch/imx-regs.h> diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h index bc2d441..de5c3ce 100644 --- a/include/configs/ve8313.h +++ b/include/configs/ve8313.h @@ -242,11 +242,6 @@ | OR_GPCM_EAD) /* 0xfe0009f7 */ -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - /* * Serial Port */ diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 133041b..31b1a24 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -19,9 +19,8 @@ #define CONFIG_SUPPORT_RAW_INITRD -/* Cache Definitions */ -#define CONFIG_SYS_DCACHE_OFF -#define CONFIG_SYS_ICACHE_OFF +/* MMU Definitions */ +#define CONFIG_SYS_CACHELINE_SIZE 64 #define CONFIG_IDENT_STRING " vexpress_aemv8a" #define CONFIG_BOOTP_VCI_STRING "U-Boot.armv8.vexpress_aemv8a" @@ -39,9 +38,6 @@ #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ -/* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT - /* CS register bases for the original memory map. */ #define V2M_PA_CS0 0x00000000 #define V2M_PA_CS1 0x14000000 @@ -192,7 +188,7 @@ "kernel_addr=0x80080000\0" \ "initrd_name=ramdisk.img\0" \ "initrd_addr=0x84000000\0" \ - "fdt_name=board.dtb\0" \ + "fdtfile=board.dtb\0" \ "fdt_alt_name=juno\0" \ "fdt_addr=0x83000000\0" \ "fdt_high=0xffffffffffffffff\0" \ @@ -214,10 +210,10 @@ "${kernel_name}; "\ " afs load ${kernel_alt_name} ${kernel_addr};"\ "fi ; "\ - "afs load ${fdt_name} ${fdt_addr} ; " \ + "afs load ${fdtfile} ${fdt_addr} ; " \ "if test $? -eq 1; then "\ " echo Loading ${fdt_alt_name} instead of "\ - "${fdt_name}; "\ + "${fdtfile}; "\ " afs load ${fdt_alt_name} ${fdt_addr}; "\ "fi ; "\ "fdt addr ${fdt_addr}; fdt resize; " \ @@ -236,7 +232,7 @@ "kernel_addr=0x80080000\0" \ "initrd_name=ramdisk.img\0" \ "initrd_addr=0x88000000\0" \ - "fdt_name=devtree.dtb\0" \ + "fdtfile=devtree.dtb\0" \ "fdt_addr=0x83000000\0" \ "fdt_high=0xffffffffffffffff\0" \ "initrd_high=0xffffffffffffffff\0" @@ -246,7 +242,7 @@ "loglevel=9" #define CONFIG_BOOTCOMMAND "smhload ${kernel_name} ${kernel_addr}; " \ - "smhload ${fdt_name} ${fdt_addr}; " \ + "smhload ${fdtfile} ${fdt_addr}; " \ "smhload ${initrd_name} ${initrd_addr} "\ "initrd_end; " \ "fdt addr ${fdt_addr}; fdt resize; " \ diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h index 955aef4..0809fbb 100644 --- a/include/configs/vf610twr.h +++ b/include/configs/vf610twr.h @@ -274,7 +274,6 @@ #define CONFIG_ENV_OFFSET 0x180000 #endif -#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ #endif diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h index 714ebee..7433d7e 100644 --- a/include/configs/vme8349.h +++ b/include/configs/vme8349.h @@ -215,11 +215,6 @@ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER -/* pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT -#define CONFIG_OF_BOARD_SETUP -#define CONFIG_OF_STDOUT_VIA_ALIAS - /* I2C */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_FSL diff --git a/include/configs/x600.h b/include/configs/x600.h index 0263c50..ac477eb 100644 --- a/include/configs/x600.h +++ b/include/configs/x600.h @@ -152,7 +152,6 @@ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_BOOT_PARAMS_ADDR 0x00000100 #define CONFIG_CMDLINE_TAG -#define CONFIG_OF_LIBFDT /* enable passing of devicetree */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_MISC_INIT_R #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/x86-chromebook.h b/include/configs/x86-chromebook.h index c575dab..312987e 100644 --- a/include/configs/x86-chromebook.h +++ b/include/configs/x86-chromebook.h @@ -1,5 +1,4 @@ /* - * * Copyright (c) 2015 Google, Inc * * SPDX-License-Identifier: GPL-2.0+ @@ -14,13 +13,16 @@ #define CONFIG_MISC_INIT_R #define CONFIG_X86_MRC_ADDR 0xfffa0000 +#define CONFIG_X86_REFCODE_ADDR 0xffea0000 +#define CONFIG_X86_REFCODE_RUN_ADDR 0 #define CONFIG_SCSI_DEV_LIST \ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_NM10_AHCI}, \ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_MOBILE}, \ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_SERIES6}, \ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}, \ - {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_AHCI} + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_AHCI}, \ + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_AHCI} #define CONFIG_PCI_MEM_BUS 0xe0000000 #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS @@ -49,6 +51,8 @@ #define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_OFFSET 0x003f8000 +#define CONFIG_SYS_WHITE_ON_BLACK + #define CONFIG_STD_DEVICES_SETTINGS "stdin=usbkbd,i8042-kbd,serial\0" \ "stdout=vga,serial\0" \ "stderr=vga,serial\0" diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 3ae4366..ea815c2 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -24,10 +24,8 @@ #define CONFIG_NR_DRAM_BANKS 8 #define CONFIG_LMB -#define CONFIG_OF_LIBFDT #define CONFIG_LZO -#define CONFIG_FIT #undef CONFIG_ZLIB #undef CONFIG_GZIP #define CONFIG_SYS_BOOTM_LEN (16 << 20) diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 1121ea4..9d9ffd0 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -42,7 +42,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) /* Flat Device Tree Definitions */ -#define CONFIG_OF_LIBFDT /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ #if !defined(COUNTER_FREQUENCY) diff --git a/include/configs/xpedite1000.h b/include/configs/xpedite1000.h index 5bc926f..6f162dc 100644 --- a/include/configs/xpedite1000.h +++ b/include/configs/xpedite1000.h @@ -210,8 +210,6 @@ extern void out32(unsigned int, unsigned long); #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #define CONFIG_PANIC_HANG /* do not reset board on panic */ #define CONFIG_PREBOOT /* enable preboot variable */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h index 96b357b..70af1e1 100644 --- a/include/configs/xpedite517x.h +++ b/include/configs/xpedite517x.h @@ -231,13 +231,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_HUSH_PARSER /* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C @@ -557,8 +550,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #define CONFIG_PANIC_HANG /* do not reset board on panic */ #define CONFIG_PREBOOT /* enable preboot variable */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ /* diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h index b2d6a1e..1972373 100644 --- a/include/configs/xpedite520x.h +++ b/include/configs/xpedite520x.h @@ -194,13 +194,6 @@ #define CONFIG_SYS_HUSH_PARSER /* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C @@ -340,8 +333,6 @@ #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #define CONFIG_PANIC_HANG /* do not reset board on panic */ #define CONFIG_PREBOOT /* enable preboot variable */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h index 8b4d4d9..1be043f 100644 --- a/include/configs/xpedite537x.h +++ b/include/configs/xpedite537x.h @@ -230,13 +230,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); #define CONFIG_SYS_HUSH_PARSER /* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 - -/* * I2C */ #define CONFIG_SYS_I2C @@ -412,8 +405,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #define CONFIG_PANIC_HANG /* do not reset board on panic */ #define CONFIG_PREBOOT /* enable preboot variable */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ /* diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h index c7e25d9..0697714 100644 --- a/include/configs/xpedite550x.h +++ b/include/configs/xpedite550x.h @@ -220,12 +220,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); */ #define CONFIG_SYS_HUSH_PARSER -/* - * Pass open firmware flat tree - */ -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 -#define CONFIG_OF_STDOUT_VIA_ALIAS 1 #define CONFIG_FDT_FIXUP_PCI_IRQ 1 /* @@ -397,8 +391,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ #define CONFIG_PANIC_HANG /* do not reset board on panic */ #define CONFIG_PREBOOT /* enable preboot variable */ -#define CONFIG_FIT 1 -#define CONFIG_FIT_VERBOSE 1 #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ /* diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 982905d..77edbb8 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -274,9 +274,6 @@ #define CONFIG_CMD_FPGA_LOADBP #define CONFIG_CMD_FPGA_LOADFS -/* Open Firmware flat tree */ -#define CONFIG_OF_LIBFDT - /* FIT support */ #define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */ diff --git a/include/cpu.h b/include/cpu.h index bfb0db2..bda5315 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -15,15 +15,20 @@ * device. * * @cpu_id: Platform-specific way of identifying the CPU. + * @ucode_version: Microcode version, if CPU_FEAT_UCODE is set */ struct cpu_platdata { int cpu_id; + int ucode_version; + ulong device_id; }; /* CPU features - mostly just a placeholder for now */ enum { CPU_FEAT_L1_CACHE = 0, /* Supports level 1 cache */ CPU_FEAT_MMU = 1, /* Supports virtual memory */ + CPU_FEAT_UCODE = 2, /* Requires/uses microcode */ + CPU_FEAT_DEVICE_ID = 3, /* Provides a device ID */ CPU_FEAT_COUNT, }; diff --git a/include/crc.h b/include/crc.h index 5085d4e..111cb4a 100644 --- a/include/crc.h +++ b/include/crc.h @@ -36,34 +36,8 @@ # endif #endif -/* Compute a CRC, using the POSIX 1003 definition */ -extern uint32_t -cyg_posix_crc32(unsigned char *s, int len); +/* 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ -/* Gary S. Brown's 32 bit CRC */ - -extern uint32_t -cyg_crc32(unsigned char *s, int len); - -/* Gary S. Brown's 32 bit CRC, but accumulate the result from a */ -/* previous CRC calculation */ - -extern uint32_t -cyg_crc32_accumulate(uint32_t crc, unsigned char *s, int len); - -/* Ethernet FCS Algorithm */ - -extern uint32_t -cyg_ether_crc32(unsigned char *s, int len); - -/* Ethernet FCS algorithm, but accumulate the result from a previous */ -/* CRC calculation. */ - -extern uint32_t -cyg_ether_crc32_accumulate(uint32_t crc, unsigned char *s, int len); - -/* 16 bit CRC with polynomial x^16+x^12+x^5+1 */ - -extern uint16_t cyg_crc16(unsigned char *s, int len); +uint16_t crc16_ccitt(uint16_t crc_start, unsigned char *s, int len); #endif /* _SERVICES_CRC_CRC_H_ */ diff --git a/include/debug_uart.h b/include/debug_uart.h index 5d5349b..0d640b9 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -117,13 +117,15 @@ void printhex8(uint value); #define DEBUG_UART_FUNCS \ void printch(int ch) \ { \ + if (ch == '\n') \ + _debug_uart_putc('\r'); \ _debug_uart_putc(ch); \ } \ \ void printascii(const char *str) \ { \ while (*str) \ - _debug_uart_putc(*str++); \ + printch(*str++); \ } \ \ static inline void printhex1(uint digit) \ diff --git a/include/display.h b/include/display.h index c180e76..b1c4766 100644 --- a/include/display.h +++ b/include/display.h @@ -23,7 +23,7 @@ struct display_plat { }; /** - * display_read_timing() - Read timing information from EDID + * display_read_timing() - Read timing information * * @dev: Device to read from * @return 0 if OK, -ve on error @@ -43,6 +43,15 @@ int display_enable(struct udevice *dev, int panel_bpp, struct dm_display_ops { /** + * read_timing() - Read information directly + * + * @dev: Device to read from + * @timing: Display timings + * @return 0 if OK, -ve on error + */ + int (*read_timing)(struct udevice *dev, struct display_timing *timing); + + /** * read_edid() - Read information from EDID * * @dev: Device to read from diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 3bea308..37c4176 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -26,6 +26,7 @@ enum uclass_id { /* U-Boot uclasses start here - in alphabetical order */ UCLASS_ADC, /* Analog-to-digital converter */ + UCLASS_BLK, /* Block device */ UCLASS_CLK, /* Clock source, e.g. used by peripherals */ UCLASS_CPU, /* CPU, typically part of an SoC */ UCLASS_CROS_EC, /* Chrome OS EC */ diff --git a/include/dm/uclass.h b/include/dm/uclass.h index bfbd27a..fd368b6 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -200,18 +200,29 @@ int uclass_get_device_by_phandle(enum uclass_id id, struct udevice *parent, * * @id: Uclass ID to look up * @devp: Returns pointer to the first device in that uclass, or NULL if none - * @return 0 if OK (found or not found), -1 on error + * @return 0 if OK (found or not found), other -ve on error */ int uclass_first_device(enum uclass_id id, struct udevice **devp); /** + * uclass_first_device_err() - Get the first device in a uclass + * + * The device returned is probed if necessary, and ready for use + * + * @id: Uclass ID to look up + * @devp: Returns pointer to the first device in that uclass, or NULL if none + * @return 0 if found, -ENODEV if not found, other -ve on error + */ +int uclass_first_device_err(enum uclass_id id, struct udevice **devp); + +/** * uclass_next_device() - Get the next device in a uclass * * The device returned is probed if necessary, and ready for use * * @devp: On entry, pointer to device to lookup. On exit, returns pointer * to the next device in the same uclass, or NULL if none - * @return 0 if OK (found or not found), -1 on error + * @return 0 if OK (found or not found), other -ve on error */ int uclass_next_device(struct udevice **devp); diff --git a/include/dt-bindings/gpio/x86-gpio.h b/include/dt-bindings/gpio/x86-gpio.h index 7f1de30..3998a8e 100644 --- a/include/dt-bindings/gpio/x86-gpio.h +++ b/include/dt-bindings/gpio/x86-gpio.h @@ -28,4 +28,16 @@ #define PULL_STR_2K 0 #define PULL_STR_20K 2 +#define ROUTE_SCI 0 +#define ROUTE_SMI 1 + +#define OWNER_ACPI 0 +#define OWNER_GPIO 1 + +#define PIRQ_APIC_MASK 0 +#define PIRQ_APIC_ROUTE 1 + +#define TRIGGER_EDGE 0 +#define TRIGGER_LEVEL 1 + #endif diff --git a/include/dt-bindings/video/rk3288.h b/include/dt-bindings/video/rk3288.h new file mode 100644 index 0000000..7bfd247 --- /dev/null +++ b/include/dt-bindings/video/rk3288.h @@ -0,0 +1,11 @@ +#ifndef __DT_BINDINGS_VIDEO_RK3288_H__ +#define __DT_BINDINGS_VIDEO_RK3288_H__ + +#define LVDS_OUTPUT_RGB 0 +#define LVDS_OUTPUT_SINGLE 1 +#define LVDS_OUTPUT_DUAL 2 + +#define LVDS_FORMAT_VESA 0 +#define LVDS_FORMAT_JEIDA 1 + +#endif diff --git a/include/efi.h b/include/efi.h index fcafda0..1dbc3b7 100644 --- a/include/efi.h +++ b/include/efi.h @@ -38,6 +38,7 @@ struct efi_device_path; #define EFI_WRITE_PROTECTED (8 | (1UL << (BITS_PER_LONG - 1))) #define EFI_OUT_OF_RESOURCES (9 | (1UL << (BITS_PER_LONG - 1))) #define EFI_NOT_FOUND (14 | (1UL << (BITS_PER_LONG - 1))) +#define EFI_ACCESS_DENIED (15 | (1UL << (BITS_PER_LONG - 1))) #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG - 1))) typedef unsigned long efi_status_t; @@ -139,6 +140,7 @@ enum { #define EFI_PAGE_SHIFT 12 #define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT) +#define EFI_PAGE_MASK (EFI_PAGE_SIZE - 1) struct efi_mem_desc { u32 type; diff --git a/include/efi_api.h b/include/efi_api.h index 4fd17d6..03f6687 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -17,11 +17,18 @@ #include <efi.h> +/* Types and defines for EFI CreateEvent */ +enum efi_event_type { + EFI_TIMER_STOP = 0, + EFI_TIMER_PERIODIC = 1, + EFI_TIMER_RELATIVE = 2 +}; + /* EFI Boot Services table */ struct efi_boot_services { struct efi_table_hdr hdr; - void *raise_tpl; - void *restore_tpl; + efi_status_t (EFIAPI *raise_tpl)(unsigned long new_tpl); + void (EFIAPI *restore_tpl)(unsigned long old_tpl); efi_status_t (EFIAPI *allocate_pages)(int, int, unsigned long, efi_physical_addr_t *); @@ -32,21 +39,33 @@ struct efi_boot_services { efi_status_t (EFIAPI *allocate_pool)(int, unsigned long, void **); efi_status_t (EFIAPI *free_pool)(void *); - void *create_event; - void *set_timer; - efi_status_t(EFIAPI *wait_for_event)(unsigned long number_of_events, - void *event, unsigned long *index); - void *signal_event; - void *close_event; - void *check_event; - - void *install_protocol_interface; - void *reinstall_protocol_interface; - void *uninstall_protocol_interface; + efi_status_t (EFIAPI *create_event)(enum efi_event_type type, + unsigned long notify_tpl, + void (EFIAPI *notify_function) (void *event, + void *context), + void *notify_context, void **event); + efi_status_t (EFIAPI *set_timer)(void *event, int type, + uint64_t trigger_time); + efi_status_t (EFIAPI *wait_for_event)(unsigned long number_of_events, + void *event, unsigned long *index); + efi_status_t (EFIAPI *signal_event)(void *event); + efi_status_t (EFIAPI *close_event)(void *event); + efi_status_t (EFIAPI *check_event)(void *event); + + efi_status_t (EFIAPI *install_protocol_interface)( + void **handle, efi_guid_t *protocol, + int protocol_interface_type, void *protocol_interface); + efi_status_t (EFIAPI *reinstall_protocol_interface)( + void *handle, efi_guid_t *protocol, + void *old_interface, void *new_interface); + efi_status_t (EFIAPI *uninstall_protocol_interface)(void *handle, + efi_guid_t *protocol, void *protocol_interface); efi_status_t (EFIAPI *handle_protocol)(efi_handle_t, efi_guid_t *, void **); void *reserved; - void *register_protocol_notify; + efi_status_t (EFIAPI *register_protocol_notify)( + efi_guid_t *protocol, void *event, + void **registration); efi_status_t (EFIAPI *locate_handle)( enum efi_locate_search_type search_type, efi_guid_t *protocol, void *search_key, @@ -54,7 +73,8 @@ struct efi_boot_services { efi_status_t (EFIAPI *locate_device_path)(efi_guid_t *protocol, struct efi_device_path **device_path, efi_handle_t *device); - void *install_configuration_table; + efi_status_t (EFIAPI *install_configuration_table)( + efi_guid_t *guid, void *table); efi_status_t (EFIAPI *load_image)(bool boot_policiy, efi_handle_t parent_image, @@ -66,17 +86,20 @@ struct efi_boot_services { efi_status_t (EFIAPI *exit)(efi_handle_t handle, efi_status_t exit_status, unsigned long exitdata_size, s16 *exitdata); - void *unload_image; + efi_status_t (EFIAPI *unload_image)(void *image_handle); efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t, unsigned long); efi_status_t (EFIAPI *get_next_monotonic_count)(u64 *count); efi_status_t (EFIAPI *stall)(unsigned long usecs); - void *set_watchdog_timer; + efi_status_t (EFIAPI *set_watchdog_timer)(unsigned long timeout, + uint64_t watchdog_code, unsigned long data_size, + uint16_t *watchdog_data); efi_status_t(EFIAPI *connect_controller)(efi_handle_t controller_handle, efi_handle_t *driver_image_handle, struct efi_device_path *remaining_device_path, bool recursive); - void *disconnect_controller; + efi_status_t (EFIAPI *disconnect_controller)(void *controller_handle, + void *driver_image_handle, void *child_handle); #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 @@ -87,7 +110,9 @@ struct efi_boot_services { efi_guid_t *protocol, void **interface, efi_handle_t agent_handle, efi_handle_t controller_handle, u32 attributes); - void *close_protocol; + efi_status_t (EFIAPI *close_protocol)(void *handle, + efi_guid_t *protocol, void *agent_handle, + void *controller_handle); efi_status_t(EFIAPI *open_protocol_information)(efi_handle_t handle, efi_guid_t *protocol, struct efi_open_protocol_info_entry **entry_buffer, @@ -99,12 +124,18 @@ struct efi_boot_services { enum efi_locate_search_type search_type, efi_guid_t *protocol, void *search_key, unsigned long *no_handles, efi_handle_t **buffer); - void *locate_protocol; - void *install_multiple_protocol_interfaces; - void *uninstall_multiple_protocol_interfaces; - void *calculate_crc32; - void *copy_mem; - void *set_mem; + efi_status_t (EFIAPI *locate_protocol)(efi_guid_t *protocol, + void *registration, void **protocol_interface); + efi_status_t (EFIAPI *install_multiple_protocol_interfaces)( + void **handle, ...); + efi_status_t (EFIAPI *uninstall_multiple_protocol_interfaces)( + void *handle, ...); + efi_status_t (EFIAPI *calculate_crc32)(void *data, + unsigned long data_size, uint32_t *crc32); + void (EFIAPI *copy_mem)(void *destination, void *source, + unsigned long length); + void (EFIAPI *set_mem)(void *buffer, unsigned long size, + uint8_t value); void *create_event_ex; }; @@ -121,12 +152,19 @@ enum efi_reset_type { struct efi_runtime_services { struct efi_table_hdr hdr; - void *get_time; - void *set_time; - void *get_wakeup_time; - void *set_wakeup_time; - void *set_virtual_address_map; - void *convert_pointer; + efi_status_t (EFIAPI *get_time)(struct efi_time *time, + struct efi_time_cap *capabilities); + efi_status_t (EFIAPI *set_time)(struct efi_time *time); + efi_status_t (EFIAPI *get_wakeup_time)(char *enabled, char *pending, + struct efi_time *time); + efi_status_t (EFIAPI *set_wakeup_time)(char enabled, + struct efi_time *time); + efi_status_t (EFIAPI *set_virtual_address_map)( + unsigned long memory_map_size, + unsigned long descriptor_size, + uint32_t descriptor_version, + struct efi_mem_desc *virtmap); + efi_status_t (*convert_pointer)(unsigned long dbg, void **address); efi_status_t (EFIAPI *get_variable)(s16 *variable_name, efi_guid_t *vendor, u32 *attributes, unsigned long *data_size, void *data); @@ -136,7 +174,8 @@ struct efi_runtime_services { efi_status_t (EFIAPI *set_variable)(s16 *variable_name, efi_guid_t *vendor, u32 attributes, unsigned long data_size, void *data); - void *get_next_high_mono_count; + efi_status_t (EFIAPI *get_next_high_mono_count)( + uint32_t *high_count); void (EFIAPI *reset_system)(enum efi_reset_type reset_type, efi_status_t reset_status, unsigned long data_size, void *reset_data); @@ -154,6 +193,18 @@ struct efi_runtime_services { EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, 0x8e, 0x3f, \ 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) +#define EFI_FDT_GUID \ + EFI_GUID(0xb1b621d5, 0xf19c, 0x41a5, \ + 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0) + +struct efi_configuration_table +{ + efi_guid_t guid; + void *table; +}; + +#define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL) + struct efi_system_table { struct efi_table_hdr hdr; unsigned long fw_vendor; /* physical addr of wchar_t vendor string */ @@ -163,13 +214,17 @@ struct efi_system_table { unsigned long con_out_handle; struct efi_simple_text_output_protocol *con_out; unsigned long stderr_handle; - unsigned long std_err; + struct efi_simple_text_output_protocol *std_err; struct efi_runtime_services *runtime; struct efi_boot_services *boottime; unsigned long nr_tables; - unsigned long tables; + struct efi_configuration_table *tables; }; +#define LOADED_IMAGE_GUID \ + EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, \ + 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) + struct efi_loaded_image { u32 revision; void *parent_handle; @@ -186,12 +241,60 @@ struct efi_loaded_image { unsigned long unload; }; +#define DEVICE_PATH_GUID \ + EFI_GUID(0x09576e91, 0x6d3f, 0x11d2, \ + 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b ) + +#define DEVICE_PATH_TYPE_END 0x7f +# define DEVICE_PATH_SUB_TYPE_END 0xff + struct efi_device_path { u8 type; u8 sub_type; u16 length; }; +#define DEVICE_PATH_TYPE_MEDIA_DEVICE 0x04 +# define DEVICE_PATH_SUB_TYPE_FILE_PATH 0x04 + +struct efi_device_path_file_path { + struct efi_device_path dp; + u16 str[16]; +}; + +#define BLOCK_IO_GUID \ + EFI_GUID(0x964e5b21, 0x6459, 0x11d2, \ + 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) + +struct efi_block_io_media +{ + u32 media_id; + char removable_media; + char media_present; + char logical_partition; + char read_only; + char write_caching; + u8 pad[3]; + u32 block_size; + u32 io_align; + u8 pad2[4]; + u64 last_block; +}; + +struct efi_block_io { + u64 revision; + struct efi_block_io_media *media; + efi_status_t (EFIAPI *reset)(struct efi_block_io *this, + char extended_verification); + efi_status_t (EFIAPI *read_blocks)(struct efi_block_io *this, + u32 media_id, u64 lba, unsigned long buffer_size, + void *buffer); + efi_status_t (EFIAPI *write_blocks)(struct efi_block_io *this, + u32 media_id, u64 lba, unsigned long buffer_size, + void *buffer); + efi_status_t (EFIAPI *flush_blocks)(struct efi_block_io *this); +}; + struct simple_text_output_mode { s32 max_mode; s32 mode; @@ -206,8 +309,9 @@ struct efi_simple_text_output_protocol { efi_status_t (EFIAPI *output_string)( struct efi_simple_text_output_protocol *this, const unsigned short *str); - void *test_string; - + efi_status_t (EFIAPI *test_string)( + struct efi_simple_text_output_protocol *this, + const unsigned short *str); efi_status_t(EFIAPI *query_mode)( struct efi_simple_text_output_protocol *this, unsigned long mode_number, unsigned long *columns, @@ -223,7 +327,9 @@ struct efi_simple_text_output_protocol { efi_status_t(EFIAPI *set_cursor_position) ( struct efi_simple_text_output_protocol *this, unsigned long column, unsigned long row); - efi_status_t(EFIAPI *enable_cursor)(void *, bool enable); + efi_status_t(EFIAPI *enable_cursor)( + struct efi_simple_text_output_protocol *this, + bool enable); struct simple_text_output_mode *mode; }; @@ -241,4 +347,22 @@ struct efi_simple_input_interface { void *wait_for_key; }; +#define CONSOLE_CONTROL_GUID \ + EFI_GUID(0xf42f7782, 0x12e, 0x4c12, \ + 0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21) +#define EFI_CONSOLE_MODE_TEXT 0 +#define EFI_CONSOLE_MODE_GFX 1 + +struct efi_console_control_protocol +{ + efi_status_t (EFIAPI *get_mode)( + struct efi_console_control_protocol *this, int *mode, + char *uga_exists, char *std_in_locked); + efi_status_t (EFIAPI *set_mode)( + struct efi_console_control_protocol *this, int mode); + efi_status_t (EFIAPI *lock_std_in)( + struct efi_console_control_protocol *this, + uint16_t *password); +}; + #endif diff --git a/include/efi_loader.h b/include/efi_loader.h new file mode 100644 index 0000000..74bed26 --- /dev/null +++ b/include/efi_loader.h @@ -0,0 +1,158 @@ +/* + * EFI application loader + * + * Copyright (c) 2016 Alexander Graf + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <part_efi.h> +#include <efi_api.h> + +/* No need for efi loader support in SPL */ +#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) + +#include <linux/list.h> + +/* #define DEBUG_EFI */ + +#ifdef DEBUG_EFI +#define EFI_ENTRY(format, ...) do { \ + efi_restore_gd(); \ + printf("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \ + } while(0) +#else +#define EFI_ENTRY(format, ...) do { \ + efi_restore_gd(); \ + } while(0) +#endif + +#define EFI_EXIT(ret) efi_exit_func(ret); + +extern struct efi_runtime_services efi_runtime_services; +extern struct efi_system_table systab; + +extern const struct efi_simple_text_output_protocol efi_con_out; +extern const struct efi_simple_input_interface efi_con_in; +extern const struct efi_console_control_protocol efi_console_control; + +extern const efi_guid_t efi_guid_console_control; +extern const efi_guid_t efi_guid_device_path; +extern const efi_guid_t efi_guid_loaded_image; + +extern unsigned int __efi_runtime_start, __efi_runtime_stop; +extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop; + +/* + * While UEFI objects can have callbacks, you can also call functions on + * protocols (classes) themselves. This struct maps a protocol GUID to its + * interface (usually a struct with callback functions). + */ +struct efi_class_map { + const efi_guid_t *guid; + const void *interface; +}; + +/* + * When the UEFI payload wants to open a protocol on an object to get its + * interface (usually a struct with callback functions), this struct maps the + * protocol GUID to the respective protocol handler open function for that + * object protocol combination. + */ +struct efi_handler { + const efi_guid_t *guid; + efi_status_t (EFIAPI *open)(void *handle, + efi_guid_t *protocol, void **protocol_interface, + void *agent_handle, void *controller_handle, + uint32_t attributes); +}; + +/* + * UEFI has a poor man's OO model where one "object" can be polymorphic and have + * multiple different protocols (classes) attached to it. + * + * This struct is the parent struct for all of our actual implementation objects + * that can include it to make themselves an EFI object + */ +struct efi_object { + /* Every UEFI object is part of a global object list */ + struct list_head link; + /* We support up to 4 "protocols" an object can be accessed through */ + struct efi_handler protocols[4]; + /* The object spawner can either use this for data or as identifier */ + void *handle; +}; + +/* This list contains all UEFI objects we know of */ +extern struct list_head efi_obj_list; + +/* Called by bootefi to make all disk storage accessible as EFI objects */ +int efi_disk_register(void); +/* + * Stub implementation for a protocol opener that just returns the handle as + * interface + */ +efi_status_t efi_return_handle(void *handle, + efi_guid_t *protocol, void **protocol_interface, + void *agent_handle, void *controller_handle, + uint32_t attributes); +/* Called from places to check whether a timer expired */ +void efi_timer_check(void); +/* PE loader implementation */ +void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info); +/* Called once to store the pristine gd pointer */ +void efi_save_gd(void); +/* Called from EFI_ENTRY on callback entry to put gd into the gd register */ +void efi_restore_gd(void); +/* Called from EFI_EXIT on callback exit to restore the gd register */ +efi_status_t efi_exit_func(efi_status_t ret); +/* Call this to relocate the runtime section to an address space */ +void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map); +/* Call this to set the current device name */ +void efi_set_bootdev(const char *dev, const char *devnr); + +/* Generic EFI memory allocator, call this to get memory */ +void *efi_alloc(uint64_t len, int memory_type); +/* More specific EFI memory allocator, called by EFI payloads */ +efi_status_t efi_allocate_pages(int type, int memory_type, unsigned long pages, + uint64_t *memory); +/* EFI memory free function. Not implemented today */ +efi_status_t efi_free_pages(uint64_t memory, unsigned long pages); +/* Returns the EFI memory map */ +efi_status_t efi_get_memory_map(unsigned long *memory_map_size, + struct efi_mem_desc *memory_map, + unsigned long *map_key, + unsigned long *descriptor_size, + uint32_t *descriptor_version); +/* Adds a range into the EFI memory map */ +uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type, + bool overlap_only_ram); +/* Called by board init to initialize the EFI memory map */ +int efi_memory_init(void); + +/* Convert strings from normal C strings to uEFI strings */ +static inline void ascii2unicode(u16 *unicode, char *ascii) +{ + while (*ascii) + *(unicode++) = *(ascii++); +} + +/* + * Use these to indicate that your code / data should go into the EFI runtime + * section and thus still be available when the OS is running + */ +#define EFI_RUNTIME_DATA __attribute__ ((section ("efi_runtime_data"))) +#define EFI_RUNTIME_TEXT __attribute__ ((section ("efi_runtime_text"))) + +#else /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */ + +/* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */ +#define EFI_RUNTIME_DATA +#define EFI_RUNTIME_TEXT + +/* No loader configured, stub out EFI_ENTRY */ +static inline void efi_restore_gd(void) { } +static inline void efi_set_bootdev(const char *dev, const char *devnr) { } + +#endif diff --git a/include/ext4fs.h b/include/ext4fs.h index 6888adc..cc765ae 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -110,7 +110,7 @@ struct ext_filesystem { /* Journal Related */ /* Block Device Descriptor */ - block_dev_desc_t *dev_desc; + struct blk_desc *dev_desc; }; extern struct ext2_data *ext4fs_root; @@ -141,9 +141,9 @@ int ext4fs_exists(const char *filename); int ext4fs_size(const char *filename, loff_t *size); void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot); int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf); -void ext4fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); +void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); long int read_allocated_block(struct ext2_inode *inode, int fileblock); -int ext4fs_probe(block_dev_desc_t *fs_dev_desc, +int ext4fs_probe(struct blk_desc *fs_dev_desc, disk_partition_t *fs_partition); int ext4_read_file(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actread); diff --git a/include/fat.h b/include/fat.h index 3038bd7..9d053e6 100644 --- a/include/fat.h +++ b/include/fat.h @@ -203,8 +203,8 @@ int file_fat_read_at(const char *filename, loff_t pos, void *buffer, loff_t maxsize, loff_t *actread); int file_fat_read(const char *filename, void *buffer, int maxsize); const char *file_getfsname(int idx); -int fat_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); -int fat_register_device(block_dev_desc_t *dev_desc, int part_no); +int fat_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); +int fat_register_device(struct blk_desc *dev_desc, int part_no); int file_fat_write(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actwrite); diff --git a/include/fdtdec.h b/include/fdtdec.h index 4caf3b6..fb88273 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -152,14 +152,12 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_I2C, /* Exynos5 High Speed I2C Controller */ COMPAT_SAMSUNG_EXYNOS_SYSMMU, /* Exynos sysmmu */ COMPAT_INTEL_MICROCODE, /* Intel microcode update */ - COMPAT_MEMORY_SPD, /* Memory SPD information */ COMPAT_INTEL_PANTHERPOINT_AHCI, /* Intel Pantherpoint AHCI */ COMPAT_INTEL_MODEL_206AX, /* Intel Model 206AX CPU */ COMPAT_INTEL_GMA, /* Intel Graphics Media Accelerator */ COMPAT_AMS_AS3722, /* AMS AS3722 PMIC */ COMPAT_INTEL_ICH_SPI, /* Intel ICH7/9 SPI controller */ COMPAT_INTEL_QRK_MRC, /* Intel Quark MRC */ - COMPAT_INTEL_X86_PINCTRL, /* Intel ICH7/9 pin control */ COMPAT_SOCIONEXT_XHCI, /* Socionext UniPhier xHCI */ COMPAT_INTEL_PCH, /* Intel PCH */ COMPAT_ALTERA_SOCFPGA_DWMAC, /* SoCFPGA Ethernet controller */ diff --git a/include/i8042.h b/include/i8042.h index 9723b6a..0766488 100644 --- a/include/i8042.h +++ b/include/i8042.h @@ -35,6 +35,7 @@ #define CMD_KBD_DIS 0xad /* keyboard disable */ #define CMD_KBD_EN 0xae /* keyboard enable */ #define CMD_SET_KBD_LED 0xed /* set keyboard led */ +#define CMD_DRAIN_OUTPUT 0xf4 /* drain output buffer */ #define CMD_RESET_KBD 0xff /* reset keyboard */ /* i8042 command result */ diff --git a/include/ide.h b/include/ide.h index f9357be..a4e65cf 100644 --- a/include/ide.h +++ b/include/ide.h @@ -8,6 +8,8 @@ #ifndef _IDE_H #define _IDE_H +#include <blk.h> + #define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS)) #define ATA_CURR_BASE(dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)]) @@ -26,25 +28,15 @@ extern ulong ide_bus_offset[]; void ide_led(uchar led, uchar status); #endif /* CONFIG_IDE_LED */ -#ifdef CONFIG_SYS_64BIT_LBA -typedef uint64_t lbaint_t; -#define LBAFlength "ll" -#else -typedef ulong lbaint_t; -#define LBAFlength "l" -#endif -#define LBAF "%" LBAFlength "x" -#define LBAFU "%" LBAFlength "u" - /* * Function Prototypes */ void ide_init(void); -typedef struct block_dev_desc block_dev_desc_t; -ulong ide_read(block_dev_desc_t *block_dev, lbaint_t blknr, lbaint_t blkcnt, +struct blk_desc; +ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer); -ulong ide_write(block_dev_desc_t *block_dev, lbaint_t blknr, lbaint_t blkcnt, +ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer); #ifdef CONFIG_IDE_PREINIT diff --git a/include/image.h b/include/image.h index 518a4f5..f9ee564 100644 --- a/include/image.h +++ b/include/image.h @@ -26,8 +26,8 @@ struct lmb; #include <sys/types.h> /* new uImage format support enabled on host */ -#define CONFIG_FIT 1 -#define CONFIG_OF_LIBFDT 1 +#define IMAGE_ENABLE_FIT 1 +#define IMAGE_ENABLE_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ #define IMAGE_ENABLE_IGNORE 0 @@ -43,9 +43,12 @@ struct lmb; #define IMAGE_ENABLE_IGNORE 1 #define IMAGE_INDENT_STRING " " +#define IMAGE_ENABLE_FIT CONFIG_IS_ENABLED(FIT) +#define IMAGE_ENABLE_OF_LIBFDT CONFIG_IS_ENABLED(OF_LIBFDT) + #endif /* USE_HOSTCC */ -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT #include <hash.h> #include <libfdt.h> #include <fdt_support.h> @@ -94,7 +97,7 @@ struct lmb; #define IMAGE_ENABLE_SHA256 0 #endif -#endif /* CONFIG_FIT */ +#endif /* IMAGE_ENABLE_FIT */ #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH # define IMAGE_ENABLE_RAMDISK_HIGH 1 @@ -102,12 +105,6 @@ struct lmb; # define IMAGE_ENABLE_RAMDISK_HIGH 0 #endif -#ifdef CONFIG_OF_LIBFDT -# define IMAGE_ENABLE_OF_LIBFDT 1 -#else -# define IMAGE_ENABLE_OF_LIBFDT 0 -#endif - #ifdef CONFIG_SYS_BOOT_GET_CMDLINE # define IMAGE_BOOT_GET_CMDLINE 1 #else @@ -309,7 +306,7 @@ typedef struct bootm_headers { image_header_t legacy_hdr_os_copy; /* header copy */ ulong legacy_hdr_valid; -#if defined(CONFIG_FIT) +#if IMAGE_ENABLE_FIT const char *fit_uname_cfg; /* configuration node unit name */ void *fit_hdr_os; /* os FIT image header */ @@ -416,7 +413,25 @@ int get_table_entry_id(const table_entry_t *table, char *get_table_entry_name(const table_entry_t *table, char *msg, int id); const char *genimg_get_os_name(uint8_t os); + +/** + * genimg_get_os_short_name() - get the short name for an OS + * + * @param os OS (IH_OS_...) + * @return OS short name, or "unknown" if unknown + */ +const char *genimg_get_os_short_name(uint8_t comp); + const char *genimg_get_arch_name(uint8_t arch); + +/** + * genimg_get_arch_short_name() - get the short name for an architecture + * + * @param arch Architecture type (IH_ARCH_...) + * @return architecture short name, or "unknown" if unknown + */ +const char *genimg_get_arch_short_name(uint8_t arch); + const char *genimg_get_type_name(uint8_t type); /** @@ -428,6 +443,15 @@ const char *genimg_get_type_name(uint8_t type); const char *genimg_get_type_short_name(uint8_t type); const char *genimg_get_comp_name(uint8_t comp); + +/** + * genimg_get_comp_short_name() - get the short name for a compression method + * + * @param comp compression method (IH_COMP_...) + * @return compression method short name, or "unknown" if unknown + */ +const char *genimg_get_comp_short_name(uint8_t comp); + int genimg_get_os_id(const char *name); int genimg_get_arch_id(const char *name); int genimg_get_type_id(const char *name); @@ -756,7 +780,6 @@ int bootz_setup(ulong image, ulong *start, ulong *end); /*******************************************************************/ /* New uImage format specific code (prefixed with fit_) */ /*******************************************************************/ -#if defined(CONFIG_FIT) #define FIT_IMAGES_PATH "/images" #define FIT_CONFS_PATH "/configurations" @@ -789,6 +812,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end); #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE +#if IMAGE_ENABLE_FIT /* cmdline argument format parsing */ int fit_parse_conf(const char *spec, ulong addr_curr, ulong *addr, const char **conf_name); @@ -952,6 +976,7 @@ struct image_sign_info { int required_keynode; /* Node offset of key to use: -1=any */ const char *require_keys; /* Value for 'required' property */ }; +#endif /* Allow struct image_region to always be defined for rsa.h */ /* A part of an image, used for hashing */ struct image_region { @@ -959,6 +984,8 @@ struct image_region { int size; }; +#if IMAGE_ENABLE_FIT + #if IMAGE_ENABLE_VERIFY # include <u-boot/rsa-checksum.h> #endif @@ -1127,4 +1154,17 @@ ulong android_image_get_kload(const struct andr_img_hdr *hdr); #endif /* CONFIG_ANDROID_BOOT_IMAGE */ +/** + * board_fit_config_name_match() - Check for a matching board name + * + * This is used when SPL loads a FIT containing multiple device tree files + * and wants to work out which one to use. The description of each one is + * passed to this function. The description comes from the 'description' field + * in each (FDT) image node. + * + * @name: Device tree description + * @return 0 if this device tree should be used, non-zero to try the next + */ +int board_fit_config_name_match(const char *name); + #endif /* __IMAGE_H__ */ diff --git a/include/libfdt.h b/include/libfdt.h index e48c21a..74b1d14 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -1181,6 +1181,22 @@ static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val) { return fdt_property_u32(fdt, name, val); } + +/** + * fdt_property_placeholder - add a new property and return a ptr to its value + * + * @fdt: pointer to the device tree blob + * @name: name of property to add + * @len: length of property value in bytes + * @valp: returns a pointer to where where the value should be placed + * + * returns: + * 0, on success + * -FDT_ERR_BADMAGIC, + * -FDT_ERR_NOSPACE, standard meanings + */ +int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp); + #define fdt_property_string(fdt, name, str) \ fdt_property(fdt, name, str, strlen(str)+1) int fdt_end_node(void *fdt); diff --git a/include/mmc.h b/include/mmc.h index d652c14..cdb56e7 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -376,7 +376,7 @@ struct mmc { u64 capacity_gp[4]; u64 enh_user_start; u64 enh_user_size; - block_dev_desc_t block_dev; + struct blk_desc block_dev; char op_cond_pending; /* 1 if we are waiting on an op_cond command */ char init_in_progress; /* 1 if we have done mmc_start_init() */ char preinit; /* start init as early as possible */ diff --git a/include/ns16550.h b/include/ns16550.h index 4e62067..1311f4c 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -56,6 +56,7 @@ struct ns16550_platdata { unsigned long base; int reg_shift; int clock; + int reg_offset; }; struct udevice; diff --git a/include/part.h b/include/part.h index dc23949..dc8e72e 100644 --- a/include/part.h +++ b/include/part.h @@ -7,62 +7,20 @@ #ifndef _PART_H #define _PART_H +#include <blk.h> #include <ide.h> -#include <common.h> -struct block_dev_desc { - int if_type; /* type of the interface */ - int dev; /* device number */ - unsigned char part_type; /* partition type */ - unsigned char target; /* target SCSI ID */ - unsigned char lun; /* target LUN */ - unsigned char hwpart; /* HW partition, e.g. for eMMC */ - unsigned char type; /* device type */ - unsigned char removable; /* removable device */ -#ifdef CONFIG_LBA48 - unsigned char lba48; /* device can use 48bit addr (ATA/ATAPI v7) */ -#endif - lbaint_t lba; /* number of blocks */ - unsigned long blksz; /* block size */ - int log2blksz; /* for convenience: log2(blksz) */ - char vendor [40+1]; /* IDE model, SCSI Vendor */ - char product[20+1]; /* IDE Serial no, SCSI product */ - char revision[8+1]; /* firmware revision */ - unsigned long (*block_read)(block_dev_desc_t *block_dev, - lbaint_t start, - lbaint_t blkcnt, - void *buffer); - unsigned long (*block_write)(block_dev_desc_t *block_dev, - lbaint_t start, - lbaint_t blkcnt, - const void *buffer); - unsigned long (*block_erase)(block_dev_desc_t *block_dev, - lbaint_t start, - lbaint_t blkcnt); - void *priv; /* driver private struct pointer */ +struct block_drvr { + char *name; + struct blk_desc* (*get_dev)(int dev); + int (*select_hwpart)(int dev_num, int hwpart); }; -#define BLOCK_CNT(size, block_dev_desc) (PAD_COUNT(size, block_dev_desc->blksz)) -#define PAD_TO_BLOCKSIZE(size, block_dev_desc) \ - (PAD_SIZE(size, block_dev_desc->blksz)) #define LOG2(x) (((x & 0xaaaaaaaa) ? 1 : 0) + ((x & 0xcccccccc) ? 2 : 0) + \ ((x & 0xf0f0f0f0) ? 4 : 0) + ((x & 0xff00ff00) ? 8 : 0) + \ ((x & 0xffff0000) ? 16 : 0)) #define LOG2_INVALID(type) ((type)((sizeof(type)<<3)-1)) -/* Interface types: */ -#define IF_TYPE_UNKNOWN 0 -#define IF_TYPE_IDE 1 -#define IF_TYPE_SCSI 2 -#define IF_TYPE_ATAPI 3 -#define IF_TYPE_USB 4 -#define IF_TYPE_DOC 5 -#define IF_TYPE_MMC 6 -#define IF_TYPE_SD 7 -#define IF_TYPE_SATA 8 -#define IF_TYPE_HOST 9 -#define IF_TYPE_MAX 10 /* Max number of IF_TYPE_* supported */ - /* Part types */ #define PART_TYPE_UNKNOWN 0x00 #define PART_TYPE_MAC 0x01 @@ -101,91 +59,206 @@ typedef struct disk_partition { /* Misc _get_dev functions */ #ifdef CONFIG_PARTITIONS -block_dev_desc_t *get_dev(const char *ifname, int dev); -block_dev_desc_t* ide_get_dev(int dev); -block_dev_desc_t* sata_get_dev(int dev); -block_dev_desc_t* scsi_get_dev(int dev); -block_dev_desc_t* usb_stor_get_dev(int dev); -block_dev_desc_t* mmc_get_dev(int dev); +/** + * blk_get_dev() - get a pointer to a block device given its type and number + * + * Each interface allocates its own devices and typically struct blk_desc is + * contained with the interface's data structure. There is no global + * numbering for block devices, so the interface name must be provided. + * + * @ifname: Interface name (e.g. "ide", "scsi") + * @dev: Device number (0 for first device on that interface, 1 for + * second, etc. + * @return pointer to the block device, or NULL if not available, or an + * error occurred. + */ +struct blk_desc *blk_get_dev(const char *ifname, int dev); +struct blk_desc *ide_get_dev(int dev); +struct blk_desc *sata_get_dev(int dev); +struct blk_desc *scsi_get_dev(int dev); +struct blk_desc *usb_stor_get_dev(int dev); +struct blk_desc *mmc_get_dev(int dev); + +/** + * mmc_select_hwpart() - Select the MMC hardware partiion on an MMC device + * + * MMC devices can support partitioning at the hardware level. This is quite + * separate from the normal idea of software-based partitions. MMC hardware + * partitions must be explicitly selected. Once selected only the region of + * the device covered by that partition is accessible. + * + * The MMC standard provides for two boot partitions (numbered 1 and 2), + * rpmb (3), and up to 4 addition general-purpose partitions (4-7). + * + * @dev_num: Block device number (struct blk_desc->dev value) + * @hwpart: Hardware partition number to select. 0 means the raw device, + * 1 is the first partition, 2 is the second, etc. + * @return 0 if OK, other value for an error + */ int mmc_select_hwpart(int dev_num, int hwpart); -block_dev_desc_t* systemace_get_dev(int dev); -block_dev_desc_t* mg_disk_get_dev(int dev); -block_dev_desc_t *host_get_dev(int dev); -int host_get_dev_err(int dev, block_dev_desc_t **blk_devp); +struct blk_desc *systemace_get_dev(int dev); +struct blk_desc *mg_disk_get_dev(int dev); +struct blk_desc *host_get_dev(int dev); +int host_get_dev_err(int dev, struct blk_desc **blk_devp); /* disk/part.c */ -int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); -void print_part (block_dev_desc_t *dev_desc); -void init_part (block_dev_desc_t *dev_desc); -void dev_print(block_dev_desc_t *dev_desc); -int get_device(const char *ifname, const char *dev_str, - block_dev_desc_t **dev_desc); -int get_device_and_partition(const char *ifname, const char *dev_part_str, - block_dev_desc_t **dev_desc, - disk_partition_t *info, int allow_whole_dev); +int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info); +void part_print(struct blk_desc *dev_desc); +void part_init(struct blk_desc *dev_desc); +void dev_print(struct blk_desc *dev_desc); + +/** + * blk_get_device_by_str() - Get a block device given its interface/hw partition + * + * Each interface allocates its own devices and typically struct blk_desc is + * contained with the interface's data structure. There is no global + * numbering for block devices, so the interface name must be provided. + * + * The hardware parition is not related to the normal software partitioning + * of a device - each hardware partition is effectively a separately + * accessible block device. When a hardware parition is selected on MMC the + * other hardware partitions become inaccessible. The same block device is + * used to access all hardware partitions, but its capacity may change when a + * different hardware partition is selected. + * + * When a hardware partition number is given, the block device switches to + * that hardware partition. + * + * @ifname: Interface name (e.g. "ide", "scsi") + * @dev_str: Device and optional hw partition. This can either be a string + * containing the device number (e.g. "2") or the device number + * and hardware partition number (e.g. "2.4") for devices that + * support it (currently only MMC). + * @dev_desc: Returns a pointer to the block device on success + * @return block device number (local to the interface), or -1 on error + */ +int blk_get_device_by_str(const char *ifname, const char *dev_str, + struct blk_desc **dev_desc); + +/** + * blk_get_device_part_str() - Get a block device and partition + * + * This calls blk_get_device_by_str() to look up a device. It also looks up + * a partition and returns information about it. + * + * @dev_part_str is in the format: + * <dev>.<hw_part>:<part> where <dev> is the device number, + * <hw_part> is the optional hardware partition number and + * <part> is the partition number + * + * If ifname is "hostfs" then this function returns the sandbox host block + * device. + * + * If ifname is ubi, then this function returns 0, with @info set to a + * special UBI device. + * + * If @dev_part_str is NULL or empty or "-", then this function looks up + * the "bootdevice" environment variable and uses that string instead. + * + * If the partition string is empty then the first partition is used. If the + * partition string is "auto" then the first bootable partition is used. + * + * @ifname: Interface name (e.g. "ide", "scsi") + * @dev_part_str: Device and partition string + * @dev_desc: Returns a pointer to the block device on success + * @info: Returns partition information + * @allow_whole_dev: true to allow the user to select partition 0 + * (which means the whole device), false to require a valid + * partition number >= 1 + * @return partition number, or -1 on error + * + */ +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); +extern const struct block_drvr block_drvr[]; #else -static inline block_dev_desc_t *get_dev(const char *ifname, int dev) +static inline struct blk_desc *blk_get_dev(const char *ifname, int dev) { return NULL; } -static inline block_dev_desc_t* ide_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t* sata_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t* scsi_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t* usb_stor_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t* mmc_get_dev(int dev) { return NULL; } +static inline struct blk_desc *ide_get_dev(int dev) { return NULL; } +static inline struct blk_desc *sata_get_dev(int dev) { return NULL; } +static inline struct blk_desc *scsi_get_dev(int dev) { return NULL; } +static inline struct blk_desc *usb_stor_get_dev(int dev) { return NULL; } +static inline struct blk_desc *mmc_get_dev(int dev) { return NULL; } static inline int mmc_select_hwpart(int dev_num, int hwpart) { return -1; } -static inline block_dev_desc_t* systemace_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t* mg_disk_get_dev(int dev) { return NULL; } -static inline block_dev_desc_t *host_get_dev(int dev) { return NULL; } +static inline struct blk_desc *systemace_get_dev(int dev) { return NULL; } +static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; } +static inline struct blk_desc *host_get_dev(int dev) { return NULL; } -static inline int get_partition_info (block_dev_desc_t * dev_desc, int part, - disk_partition_t *info) { return -1; } -static inline void print_part (block_dev_desc_t *dev_desc) {} -static inline void init_part (block_dev_desc_t *dev_desc) {} -static inline void dev_print(block_dev_desc_t *dev_desc) {} -static inline int get_device(const char *ifname, const char *dev_str, - block_dev_desc_t **dev_desc) +static inline int part_get_info(struct blk_desc *dev_desc, int part, + disk_partition_t *info) { return -1; } +static inline void part_print(struct blk_desc *dev_desc) {} +static inline void part_init(struct blk_desc *dev_desc) {} +static inline void dev_print(struct blk_desc *dev_desc) {} +static inline int blk_get_device_by_str(const char *ifname, const char *dev_str, + struct blk_desc **dev_desc) { return -1; } -static inline int get_device_and_partition(const char *ifname, +static inline int blk_get_device_part_str(const char *ifname, const char *dev_part_str, - block_dev_desc_t **dev_desc, + struct blk_desc **dev_desc, disk_partition_t *info, int allow_whole_dev) { *dev_desc = NULL; return -1; } #endif -#ifdef CONFIG_MAC_PARTITION -/* disk/part_mac.c */ -int get_partition_info_mac (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); -void print_part_mac (block_dev_desc_t *dev_desc); -int test_part_mac (block_dev_desc_t *dev_desc); +/* + * We don't support printing partition information in SPL and only support + * getting partition information in a few cases. + */ +#ifdef CONFIG_SPL_BUILD +# define part_print_ptr(x) NULL +# if defined(CONFIG_SPL_EXT_SUPPORT) || \ + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION) +# define part_get_info_ptr(x) x +# else +# define part_get_info_ptr(x) NULL +# endif +#else +#define part_print_ptr(x) x +#define part_get_info_ptr(x) x #endif -#ifdef CONFIG_DOS_PARTITION -/* disk/part_dos.c */ -int get_partition_info_dos (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); -void print_part_dos (block_dev_desc_t *dev_desc); -int test_part_dos (block_dev_desc_t *dev_desc); -#endif -#ifdef CONFIG_ISO_PARTITION -/* disk/part_iso.c */ -int get_partition_info_iso (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); -void print_part_iso (block_dev_desc_t *dev_desc); -int test_part_iso (block_dev_desc_t *dev_desc); -#endif +struct part_driver { + const char *name; + int part_type; -#ifdef CONFIG_AMIGA_PARTITION -/* disk/part_amiga.c */ -int get_partition_info_amiga (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); -void print_part_amiga (block_dev_desc_t *dev_desc); -int test_part_amiga (block_dev_desc_t *dev_desc); -#endif + /** + * get_info() - Get information about a partition + * + * @dev_desc: Block device descriptor + * @part: Partition number (1 = first) + * @info: Returns partition information + */ + int (*get_info)(struct blk_desc *dev_desc, int part, + disk_partition_t *info); + + /** + * print() - Print partition information + * + * @dev_desc: Block device descriptor + */ + void (*print)(struct blk_desc *dev_desc); + + /** + * test() - Test if a device contains this partition type + * + * @dev_desc: Block device descriptor + * @return 0 if the block device appears to contain this partition + * type, -ve if not + */ + int (*test)(struct blk_desc *dev_desc); +}; + +/* Declare a new U-Boot partition 'driver' */ +#define U_BOOT_PART_TYPE(__name) \ + ll_entry_declare(struct part_driver, __name, part_driver) #ifdef CONFIG_EFI_PARTITION #include <part_efi.h> /* disk/part_efi.c */ -int get_partition_info_efi (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); /** - * get_partition_info_efi_by_name() - Find the specified GPT partition table entry + * 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 @@ -193,10 +266,8 @@ int get_partition_info_efi (block_dev_desc_t * dev_desc, int part, disk_partitio * * @return - '0' on match, '-1' on no match, otherwise error */ -int get_partition_info_efi_by_name(block_dev_desc_t *dev_desc, - const char *name, disk_partition_t *info); -void print_part_efi (block_dev_desc_t *dev_desc); -int test_part_efi (block_dev_desc_t *dev_desc); +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 @@ -207,7 +278,7 @@ int test_part_efi (block_dev_desc_t *dev_desc); * * @return - zero on success, otherwise error */ -int write_gpt_table(block_dev_desc_t *dev_desc, +int write_gpt_table(struct blk_desc *dev_desc, gpt_header *gpt_h, gpt_entry *gpt_e); /** @@ -233,7 +304,7 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e, * * @return - error on str_guid conversion error */ -int gpt_fill_header(block_dev_desc_t *dev_desc, gpt_header *gpt_h, +int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h, char *str_guid, int parts_count); /** @@ -246,7 +317,7 @@ int gpt_fill_header(block_dev_desc_t *dev_desc, gpt_header *gpt_h, * * @return zero on success */ -int gpt_restore(block_dev_desc_t *dev_desc, char *str_disk_guid, +int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid, disk_partition_t *partitions, const int parts_count); /** @@ -257,7 +328,7 @@ int gpt_restore(block_dev_desc_t *dev_desc, char *str_disk_guid, * * @return - '0' on success, otherwise error */ -int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf); +int is_valid_gpt_buf(struct blk_desc *dev_desc, void *buf); /** * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT @@ -267,7 +338,7 @@ int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf); * * @return - '0' on success, otherwise error */ -int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf); +int write_mbr_and_gpt_partitions(struct blk_desc *dev_desc, void *buf); /** * gpt_verify_headers() - Function to read and CRC32 check of the GPT's header @@ -281,7 +352,7 @@ int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf); * * @return - '0' on success, otherwise error */ -int gpt_verify_headers(block_dev_desc_t *dev_desc, gpt_header *gpt_head, +int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head, gpt_entry **gpt_pte); /** @@ -300,7 +371,7 @@ int gpt_verify_headers(block_dev_desc_t *dev_desc, gpt_header *gpt_head, * * @return - '0' on success, otherwise error */ -int gpt_verify_partitions(block_dev_desc_t *dev_desc, +int gpt_verify_partitions(struct blk_desc *dev_desc, disk_partition_t *partitions, int parts, gpt_header *gpt_head, gpt_entry **gpt_pte); #endif diff --git a/include/pci.h b/include/pci.h index 68548b0..87de7ab 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1007,6 +1007,7 @@ int dm_pci_hose_probe_bus(struct udevice *bus); * * @bus: Bus to read from * @bdf: PCI device address: bus, device and function -see PCI_BDF() + * @offset: Register offset to read * @valuep: Place to put the returned value * @size: Access size * @return 0 if OK, -ve on error @@ -1019,6 +1020,7 @@ int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset, * * @bus: Bus to write from * @bdf: PCI device address: bus, device and function -see PCI_BDF() + * @offset: Register offset to write * @value: Value to write * @size: Access size * @return 0 if OK, -ve on error @@ -1027,6 +1029,21 @@ int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset, unsigned long value, enum pci_size_t size); /** + * pci_bus_clrset_config32() - Update a configuration value for a device + * + * The register at @offset is updated to (oldvalue & ~clr) | set. + * + * @bus: Bus to access + * @bdf: PCI device address: bus, device and function -see PCI_BDF() + * @offset: Register offset to update + * @clr: Bits to clear + * @set: Bits to set + * @return 0 if OK, -ve on error + */ +int pci_bus_clrset_config32(struct udevice *bus, pci_dev_t bdf, int offset, + u32 clr, u32 set); + +/** * Driver model PCI config access functions. Use these in preference to others * when you have a valid device */ @@ -1044,6 +1061,14 @@ int dm_pci_write_config8(struct udevice *dev, int offset, u8 value); int dm_pci_write_config16(struct udevice *dev, int offset, u16 value); int dm_pci_write_config32(struct udevice *dev, int offset, u32 value); +/** + * These permit convenient read/modify/write on PCI configuration. The + * register is updated to (oldvalue & ~clr) | set. + */ +int dm_pci_clrset_config8(struct udevice *dev, int offset, u32 clr, u32 set); +int dm_pci_clrset_config16(struct udevice *dev, int offset, u32 clr, u32 set); +int dm_pci_clrset_config32(struct udevice *dev, int offset, u32 clr, u32 set); + /* * The following functions provide access to the above without needing the * size parameter. We are trying to encourage the use of the 8/16/32-style @@ -1237,9 +1262,9 @@ void *dm_pci_map_bar(struct udevice *dev, int bar, int flags); #define dm_pci_mem_to_virt(dev, addr, len, map_flags) \ dm_pci_bus_to_virt((dev), (addr), PCI_REGION_MEM, (len), (map_flags)) #define dm_pci_virt_to_io(dev, addr) \ - dm_dm_pci_virt_to_bus((dev), (addr), PCI_REGION_IO) + dm_pci_virt_to_bus((dev), (addr), PCI_REGION_IO) #define dm_pci_io_to_virt(dev, addr, len, map_flags) \ - dm_dm_pci_bus_to_virt((dev), (addr), PCI_REGION_IO, (len), (map_flags)) + dm_pci_bus_to_virt((dev), (addr), PCI_REGION_IO, (len), (map_flags)) /** * dm_pci_find_device() - find a device by vendor/device ID diff --git a/include/pe.h b/include/pe.h new file mode 100644 index 0000000..deb35a0 --- /dev/null +++ b/include/pe.h @@ -0,0 +1,263 @@ +/* + * Portable Executable binary format structures + * + * Copyright (c) 2016 Alexander Graf + * + * Based on wine code + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _PE_H +#define _PE_H + +typedef struct _IMAGE_DOS_HEADER { + uint16_t e_magic; /* 00: MZ Header signature */ + uint16_t e_cblp; /* 02: Bytes on last page of file */ + uint16_t e_cp; /* 04: Pages in file */ + uint16_t e_crlc; /* 06: Relocations */ + uint16_t e_cparhdr; /* 08: Size of header in paragraphs */ + uint16_t e_minalloc; /* 0a: Minimum extra paragraphs needed */ + uint16_t e_maxalloc; /* 0c: Maximum extra paragraphs needed */ + uint16_t e_ss; /* 0e: Initial (relative) SS value */ + uint16_t e_sp; /* 10: Initial SP value */ + uint16_t e_csum; /* 12: Checksum */ + uint16_t e_ip; /* 14: Initial IP value */ + uint16_t e_cs; /* 16: Initial (relative) CS value */ + uint16_t e_lfarlc; /* 18: File address of relocation table */ + uint16_t e_ovno; /* 1a: Overlay number */ + uint16_t e_res[4]; /* 1c: Reserved words */ + uint16_t e_oemid; /* 24: OEM identifier (for e_oeminfo) */ + uint16_t e_oeminfo; /* 26: OEM information; e_oemid specific */ + uint16_t e_res2[10]; /* 28: Reserved words */ + uint32_t e_lfanew; /* 3c: Offset to extended header */ +} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER; + +#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */ +#define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */ + +#define IMAGE_FILE_MACHINE_ARM 0x01c0 +#define IMAGE_FILE_MACHINE_THUMB 0x01c2 +#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 +#define IMAGE_FILE_MACHINE_AMD64 0x8664 +#define IMAGE_FILE_MACHINE_ARM64 0xaa64 +#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b +#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 + +typedef struct _IMAGE_FILE_HEADER { + uint16_t Machine; + uint16_t NumberOfSections; + uint32_t TimeDateStamp; + uint32_t PointerToSymbolTable; + uint32_t NumberOfSymbols; + uint16_t SizeOfOptionalHeader; + uint16_t Characteristics; +} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; + +typedef struct _IMAGE_DATA_DIRECTORY { + uint32_t VirtualAddress; + uint32_t Size; +} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY; + +#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 + +typedef struct _IMAGE_OPTIONAL_HEADER64 { + uint16_t Magic; /* 0x20b */ + uint8_t MajorLinkerVersion; + uint8_t MinorLinkerVersion; + uint32_t SizeOfCode; + uint32_t SizeOfInitializedData; + uint32_t SizeOfUninitializedData; + uint32_t AddressOfEntryPoint; + uint32_t BaseOfCode; + uint64_t ImageBase; + uint32_t SectionAlignment; + uint32_t FileAlignment; + uint16_t MajorOperatingSystemVersion; + uint16_t MinorOperatingSystemVersion; + uint16_t MajorImageVersion; + uint16_t MinorImageVersion; + uint16_t MajorSubsystemVersion; + uint16_t MinorSubsystemVersion; + uint32_t Win32VersionValue; + uint32_t SizeOfImage; + uint32_t SizeOfHeaders; + uint32_t CheckSum; + uint16_t Subsystem; + uint16_t DllCharacteristics; + uint64_t SizeOfStackReserve; + uint64_t SizeOfStackCommit; + uint64_t SizeOfHeapReserve; + uint64_t SizeOfHeapCommit; + uint32_t LoaderFlags; + uint32_t NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64; + +typedef struct _IMAGE_NT_HEADERS64 { + uint32_t Signature; + IMAGE_FILE_HEADER FileHeader; + IMAGE_OPTIONAL_HEADER64 OptionalHeader; +} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64; + +typedef struct _IMAGE_OPTIONAL_HEADER { + + /* Standard fields */ + + uint16_t Magic; /* 0x10b or 0x107 */ /* 0x00 */ + uint8_t MajorLinkerVersion; + uint8_t MinorLinkerVersion; + uint32_t SizeOfCode; + uint32_t SizeOfInitializedData; + uint32_t SizeOfUninitializedData; + uint32_t AddressOfEntryPoint; /* 0x10 */ + uint32_t BaseOfCode; + uint32_t BaseOfData; + + /* NT additional fields */ + + uint32_t ImageBase; + uint32_t SectionAlignment; /* 0x20 */ + uint32_t FileAlignment; + uint16_t MajorOperatingSystemVersion; + uint16_t MinorOperatingSystemVersion; + uint16_t MajorImageVersion; + uint16_t MinorImageVersion; + uint16_t MajorSubsystemVersion; /* 0x30 */ + uint16_t MinorSubsystemVersion; + uint32_t Win32VersionValue; + uint32_t SizeOfImage; + uint32_t SizeOfHeaders; + uint32_t CheckSum; /* 0x40 */ + uint16_t Subsystem; + uint16_t DllCharacteristics; + uint32_t SizeOfStackReserve; + uint32_t SizeOfStackCommit; + uint32_t SizeOfHeapReserve; /* 0x50 */ + uint32_t SizeOfHeapCommit; + uint32_t LoaderFlags; + uint32_t NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; /* 0x60 */ + /* 0xE0 */ +} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32; + +typedef struct _IMAGE_NT_HEADERS { + uint32_t Signature; /* "PE"\0\0 */ /* 0x00 */ + IMAGE_FILE_HEADER FileHeader; /* 0x04 */ + IMAGE_OPTIONAL_HEADER32 OptionalHeader; /* 0x18 */ +} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32; + +#define IMAGE_SIZEOF_SHORT_NAME 8 + +typedef struct _IMAGE_SECTION_HEADER { + uint8_t Name[IMAGE_SIZEOF_SHORT_NAME]; + union { + uint32_t PhysicalAddress; + uint32_t VirtualSize; + } Misc; + uint32_t VirtualAddress; + uint32_t SizeOfRawData; + uint32_t PointerToRawData; + uint32_t PointerToRelocations; + uint32_t PointerToLinenumbers; + uint16_t NumberOfRelocations; + uint16_t NumberOfLinenumbers; + uint32_t Characteristics; +} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER; + +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 + +typedef struct _IMAGE_BASE_RELOCATION +{ + uint32_t VirtualAddress; + uint32_t SizeOfBlock; + /* WORD TypeOffset[1]; */ +} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION; + +typedef struct _IMAGE_RELOCATION +{ + union { + uint32_t VirtualAddress; + uint32_t RelocCount; + } DUMMYUNIONNAME; + uint32_t SymbolTableIndex; + uint16_t Type; +} IMAGE_RELOCATION, *PIMAGE_RELOCATION; + +#define IMAGE_SIZEOF_RELOCATION 10 + +/* generic relocation types */ +#define IMAGE_REL_BASED_ABSOLUTE 0 +#define IMAGE_REL_BASED_HIGH 1 +#define IMAGE_REL_BASED_LOW 2 +#define IMAGE_REL_BASED_HIGHLOW 3 +#define IMAGE_REL_BASED_HIGHADJ 4 +#define IMAGE_REL_BASED_MIPS_JMPADDR 5 +#define IMAGE_REL_BASED_ARM_MOV32A 5 /* yes, 5 too */ +#define IMAGE_REL_BASED_ARM_MOV32 5 /* yes, 5 too */ +#define IMAGE_REL_BASED_SECTION 6 +#define IMAGE_REL_BASED_REL 7 +#define IMAGE_REL_BASED_ARM_MOV32T 7 /* yes, 7 too */ +#define IMAGE_REL_BASED_THUMB_MOV32 7 /* yes, 7 too */ +#define IMAGE_REL_BASED_MIPS_JMPADDR16 9 +#define IMAGE_REL_BASED_IA64_IMM64 9 /* yes, 9 too */ +#define IMAGE_REL_BASED_DIR64 10 +#define IMAGE_REL_BASED_HIGH3ADJ 11 + +/* ARM relocation types */ +#define IMAGE_REL_ARM_ABSOLUTE 0x0000 +#define IMAGE_REL_ARM_ADDR 0x0001 +#define IMAGE_REL_ARM_ADDR32NB 0x0002 +#define IMAGE_REL_ARM_BRANCH24 0x0003 +#define IMAGE_REL_ARM_BRANCH11 0x0004 +#define IMAGE_REL_ARM_TOKEN 0x0005 +#define IMAGE_REL_ARM_GPREL12 0x0006 +#define IMAGE_REL_ARM_GPREL7 0x0007 +#define IMAGE_REL_ARM_BLX24 0x0008 +#define IMAGE_REL_ARM_BLX11 0x0009 +#define IMAGE_REL_ARM_SECTION 0x000E +#define IMAGE_REL_ARM_SECREL 0x000F +#define IMAGE_REL_ARM_MOV32A 0x0010 +#define IMAGE_REL_ARM_MOV32T 0x0011 +#define IMAGE_REL_ARM_BRANCH20T 0x0012 +#define IMAGE_REL_ARM_BRANCH24T 0x0014 +#define IMAGE_REL_ARM_BLX23T 0x0015 + +/* ARM64 relocation types */ +#define IMAGE_REL_ARM64_ABSOLUTE 0x0000 +#define IMAGE_REL_ARM64_ADDR32 0x0001 +#define IMAGE_REL_ARM64_ADDR32NB 0x0002 +#define IMAGE_REL_ARM64_BRANCH26 0x0003 +#define IMAGE_REL_ARM64_PAGEBASE_REL21 0x0004 +#define IMAGE_REL_ARM64_REL21 0x0005 +#define IMAGE_REL_ARM64_PAGEOFFSET_12A 0x0006 +#define IMAGE_REL_ARM64_PAGEOFFSET_12L 0x0007 +#define IMAGE_REL_ARM64_SECREL 0x0008 +#define IMAGE_REL_ARM64_SECREL_LOW12A 0x0009 +#define IMAGE_REL_ARM64_SECREL_HIGH12A 0x000A +#define IMAGE_REL_ARM64_SECREL_LOW12L 0x000B +#define IMAGE_REL_ARM64_TOKEN 0x000C +#define IMAGE_REL_ARM64_SECTION 0x000D +#define IMAGE_REL_ARM64_ADDR64 0x000E + +/* AMD64 relocation types */ +#define IMAGE_REL_AMD64_ABSOLUTE 0x0000 +#define IMAGE_REL_AMD64_ADDR64 0x0001 +#define IMAGE_REL_AMD64_ADDR32 0x0002 +#define IMAGE_REL_AMD64_ADDR32NB 0x0003 +#define IMAGE_REL_AMD64_REL32 0x0004 +#define IMAGE_REL_AMD64_REL32_1 0x0005 +#define IMAGE_REL_AMD64_REL32_2 0x0006 +#define IMAGE_REL_AMD64_REL32_3 0x0007 +#define IMAGE_REL_AMD64_REL32_4 0x0008 +#define IMAGE_REL_AMD64_REL32_5 0x0009 +#define IMAGE_REL_AMD64_SECTION 0x000A +#define IMAGE_REL_AMD64_SECREL 0x000B +#define IMAGE_REL_AMD64_SECREL7 0x000C +#define IMAGE_REL_AMD64_TOKEN 0x000D +#define IMAGE_REL_AMD64_SREL32 0x000E +#define IMAGE_REL_AMD64_PAIR 0x000F +#define IMAGE_REL_AMD64_SSPAN32 0x0010 + +#endif /* _PE_H */ diff --git a/include/reiserfs.h b/include/reiserfs.h index 2d14d48..ffe4e46 100644 --- a/include/reiserfs.h +++ b/include/reiserfs.h @@ -63,7 +63,7 @@ typedef enum } reiserfs_error_t; -extern void reiserfs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); +void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); extern int reiserfs_ls (char *dirname); extern int reiserfs_open (char *filename); extern int reiserfs_read (char *buf, unsigned len); diff --git a/include/sandboxblockdev.h b/include/sandboxblockdev.h index 627787a..5174f45 100644 --- a/include/sandboxblockdev.h +++ b/include/sandboxblockdev.h @@ -8,7 +8,9 @@ #define __SANDBOX_BLOCK_DEV__ struct host_block_dev { - block_dev_desc_t blk_dev; +#ifndef CONFIG_BLK + struct blk_desc blk_dev; +#endif char *filename; int fd; }; diff --git a/include/sandboxfs.h b/include/sandboxfs.h index 4c7745d..6e6e3c6 100644 --- a/include/sandboxfs.h +++ b/include/sandboxfs.h @@ -18,7 +18,7 @@ #ifndef __SANDBOX_FS__ #define __SANDBOX_FS__ -int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); +int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer, loff_t maxsize, loff_t *actread); diff --git a/include/sata.h b/include/sata.h index fa61da8..b35359a 100644 --- a/include/sata.h +++ b/include/sata.h @@ -14,6 +14,6 @@ int sata_stop(void); int __sata_stop(void); int sata_port_status(int dev, int port); -extern block_dev_desc_t sata_dev_desc[]; +extern struct blk_desc sata_dev_desc[]; #endif diff --git a/include/spl.h b/include/spl.h index 92cdc04..de4f70a 100644 --- a/include/spl.h +++ b/include/spl.h @@ -29,6 +29,24 @@ struct spl_image_info { u32 flags; }; +/* + * Information required to load data from a device + * + * @dev: Pointer to the device, e.g. struct mmc * + * @priv: Private data for the device + * @bl_len: Block length for reading in bytes + * @read: Function to call to read from the device + */ +struct spl_load_info { + void *dev; + void *priv; + int bl_len; + ulong (*read)(struct spl_load_info *load, ulong sector, ulong count, + void *buf); +}; + +int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fdt); + #define SPL_COPY_PAYLOAD_ONLY 1 extern struct spl_image_info spl_image; @@ -72,14 +90,16 @@ int spl_usb_load_image(void); int spl_sata_load_image(void); /* SPL FAT image functions */ -int spl_load_image_fat(block_dev_desc_t *block_dev, int partition, const char *filename); -int spl_load_image_fat_os(block_dev_desc_t *block_dev, int partition); +int spl_load_image_fat(struct blk_desc *block_dev, int partition, + const char *filename); +int spl_load_image_fat_os(struct blk_desc *block_dev, int partition); void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image); /* SPL EXT image functions */ -int spl_load_image_ext(block_dev_desc_t *block_dev, int partition, const char *filename); -int spl_load_image_ext_os(block_dev_desc_t *block_dev, int partition); +int spl_load_image_ext(struct blk_desc *block_dev, int partition, + const char *filename); +int spl_load_image_ext_os(struct blk_desc *block_dev, int partition); /** * spl_init() - Set up device tree and driver model in SPL if enabled diff --git a/include/systemace.h b/include/systemace.h index 3f342d5..3b6ec7d 100644 --- a/include/systemace.h +++ b/include/systemace.h @@ -11,7 +11,7 @@ # include <part.h> -block_dev_desc_t * systemace_get_dev(int dev); +struct blk_desc *systemace_get_dev(int dev); #endif /* CONFIG_SYSTEMACE */ #endif /* __SYSTEMACE_H */ diff --git a/include/twl6030.h b/include/twl6030.h index 7898699..40e2c11 100644 --- a/include/twl6030.h +++ b/include/twl6030.h @@ -20,19 +20,54 @@ #define TWL6030_CHIP_PWM 0x49 /* Slave Address 0x48 */ -#define VMMC_CFG_STATE 0x9A -#define VMMC_CFG_VOLTATE 0x9B -#define VUSB_CFG_STATE 0xA2 +#define TWL6030_STS_HW_CONDITIONS 0x21 + +#define TWL6030_STS_HW_CONDITIONS_PWRON (1 << 0) + +#define TWL6030_PHOENIX_DEV_ON 0x25 + +#define TWL6030_PHOENIX_APP_DEVOFF (1 << 0) +#define TWL6030_PHOENIX_CON_DEVOFF (1 << 1) +#define TWL6030_PHOENIX_MOD_DEVOFF (1 << 2) + +#define TWL6030_PH_STS_BOOT 0x29 + +#define TWL6030_PH_STS_BOOT0 (1 << 0) +#define TWL6030_PH_STS_BOOT1 (1 << 1) +#define TWL6030_PH_STS_BOOT2 (1 << 2) +#define TWL6030_PH_STS_BOOT3 (1 << 3) + +#define TWL6030_VAUX1_CFG_STATE 0x86 +#define TWL6030_VAUX1_CFG_VOLTAGE 0x87 +#define TWL6030_VMMC_CFG_STATE 0x9A +#define TWL6030_VMMC_CFG_VOLTAGE 0x9B +#define TWL6030_VUSB_CFG_STATE 0xA2 +#define TWL6030_VUSB_CFG_VOLTAGE 0xA3 + +#define TWL6030_CFG_GRP_P1 (1 << 0) +#define TWL6030_CFG_STATE_ON (1 << 0) +#define TWL6030_CFG_STATE_P1 (TWL6030_CFG_GRP_P1 << 5) +#define TWL6030_CFG_VOLTAGE_18 0x09 +#define TWL6030_CFG_VOLTAGE_28 0x13 +#define TWL6030_CFG_VOLTAGE_30 0x15 +#define TWL6030_CFG_VOLTAGE_33 0x18 #define MISC1 0xE4 #define VAC_MEAS (1 << 2) #define VBAT_MEAS (1 << 1) #define BB_MEAS (1 << 0) -#define MISC2 0xE5 +#define TWL6030_MISC2 0xE5 +#define TWL6030_MISC2_VUSB_IN_PMID (1 << 3) +#define TWL6030_MISC2_VUSB_IN_VSYS (1 << 4) /* Slave Address 0x49 */ +#define TWL6030_CONTROLLER_STAT1 0xE3 + +#define TWL6030_CONTROLLER_STAT1_VAC_DET (1 << 3) +#define TWL6030_CONTROLLER_STAT1_VBUS_DET (1 << 2) + /* Battery CHARGER REGISTERS */ #define CONTROLLER_INT_MASK 0xE0 #define CONTROLLER_CTRL1 0xE1 @@ -162,12 +197,25 @@ static inline int twl6030_i2c_read_u8(u8 chip_no, u8 reg, u8 *val) return i2c_read(chip_no, reg, 1, val, 1); } +/* + * Power + */ + +void twl6030_power_off(void); void twl6030_init_battery_charging(void); void twl6030_usb_device_settings(void); void twl6030_start_usb_charging(void); void twl6030_stop_usb_charging(void); int twl6030_get_battery_voltage(void); int twl6030_get_battery_current(void); -void twl6030_power_mmc_init(void); +void twl6030_power_mmc_init(int dev_index); + +/* + * Input + */ + +int twl6030_input_power_button(void); +int twl6030_input_charger(void); +int twl6030_input_usb(void); #endif /* TWL6030_H */ diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index fd08a61..0e96c38 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -30,6 +30,8 @@ struct rsa_public_key { uint64_t exponent; /* public exponent */ }; +struct image_sign_info; + #if IMAGE_ENABLE_SIGN /** * sign() - calculate and return signature for given input data diff --git a/include/ubifs_uboot.h b/include/ubifs_uboot.h index dab433a..d86da27 100644 --- a/include/ubifs_uboot.h +++ b/include/ubifs_uboot.h @@ -21,7 +21,7 @@ void uboot_ubifs_umount(void); int ubifs_is_mounted(void); int ubifs_load(char *filename, u32 addr, u32 size); -int ubifs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); +int ubifs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); int ubifs_ls(const char *dir_name); int ubifs_exists(const char *filename); int ubifs_size(const char *filename, loff_t *size); diff --git a/include/usb.h b/include/usb.h index 0b410b6..c2fa684 100644 --- a/include/usb.h +++ b/include/usb.h @@ -228,7 +228,7 @@ int board_usb_cleanup(int index, enum usb_init_type init); #ifdef CONFIG_USB_STORAGE #define USB_MAX_STOR_DEV 7 -block_dev_desc_t *usb_stor_get_dev(int index); +struct blk_desc *usb_stor_get_dev(int index); int usb_stor_scan(int mode); int usb_stor_info(void); diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h index 5804b70..8229f62 100644 --- a/include/usb_mass_storage.h +++ b/include/usb_mass_storage.h @@ -23,7 +23,7 @@ struct ums { unsigned int start_sector; unsigned int num_sectors; const char *name; - block_dev_desc_t block_dev; + struct blk_desc block_dev; }; int fsg_init(struct ums *ums_devs, int count); diff --git a/include/zfs_common.h b/include/zfs_common.h index 3bd575e..bca3dff 100644 --- a/include/zfs_common.h +++ b/include/zfs_common.h @@ -63,7 +63,7 @@ enum zfs_errors { struct zfs_filesystem { /* Block Device Descriptor */ - block_dev_desc_t *dev_desc; + struct blk_desc *dev_desc; }; struct device_s { @@ -98,7 +98,7 @@ int zfs_close(zfs_file_t); int zfs_ls(device_t dev, const char *path, int (*hook) (const char *, const struct zfs_dirhook_info *)); int zfs_devread(int sector, int byte_offset, int byte_len, char *buf); -void zfs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); +void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); void zfs_unmount(struct zfs_data *data); int lzjb_decompress(void *, void *, uint32_t, uint32_t); #endif |