UPSTREAM: spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU
The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT to allow for cleaner use in code. Conflicts: arch/arm/mach-zynqmp/spl.c common/Makefile common/spl/Kconfig common/spl/spl_ram.c Change-Id: I93f09d5953284d511df135e6e71c03c0552719a2 Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Lukasz Majewski <lukma@denx.de> (cherry picked from commit 6536ca4d6676bf38e50784298e713edc30b9cde9)
This commit is contained in:
parent
6baf2cc3b2
commit
09b32b41f2
|
@ -94,7 +94,7 @@ u32 spl_boot_device(void)
|
|||
case EMMC_MODE:
|
||||
return BOOT_DEVICE_MMC1;
|
||||
#endif
|
||||
#ifdef CONFIG_SPL_DFU_SUPPORT
|
||||
#ifdef CONFIG_SPL_DFU
|
||||
case USB_MODE:
|
||||
return BOOT_DEVICE_DFU;
|
||||
#endif
|
||||
|
|
|
@ -109,7 +109,7 @@ void save_omap_boot_params(void)
|
|||
sys_boot_device = 1;
|
||||
break;
|
||||
#endif
|
||||
#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU_SUPPORT)
|
||||
#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU)
|
||||
case BOOT_DEVICE_DFU:
|
||||
sys_boot_device = 1;
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2015 - 2016 Xilinx, Inc.
|
||||
*
|
||||
* Michal Simek <michal.simek@xilinx.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <debug_uart.h>
|
||||
#include <spl.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/spl.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
board_early_init_f();
|
||||
board_early_init_r();
|
||||
|
||||
#ifdef CONFIG_DEBUG_UART
|
||||
/* Uart debug for sure */
|
||||
debug_uart_init();
|
||||
puts("Debug uart enabled\n"); /* or printch() */
|
||||
#endif
|
||||
/* Delay is required for clocks to be propagated */
|
||||
udelay(1000000);
|
||||
|
||||
/* Clear the BSS */
|
||||
memset(__bss_start, 0, __bss_end - __bss_start);
|
||||
|
||||
/* No need to call timer init - it is empty for ZynqMP */
|
||||
board_init_r(NULL, 0);
|
||||
}
|
||||
|
||||
static void ps_mode_reset(ulong mode)
|
||||
{
|
||||
writel(mode << ZYNQMP_CRL_APB_BOOT_PIN_CTRL_OUT_EN_SHIFT,
|
||||
&crlapb_base->boot_pin_ctrl);
|
||||
udelay(5);
|
||||
writel(mode << ZYNQMP_CRL_APB_BOOT_PIN_CTRL_OUT_VAL_SHIFT |
|
||||
mode << ZYNQMP_CRL_APB_BOOT_PIN_CTRL_OUT_EN_SHIFT,
|
||||
&crlapb_base->boot_pin_ctrl);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default PS_MODE1 which is used for USB ULPI phy reset
|
||||
* Also other resets can be connected to this certain pin
|
||||
*/
|
||||
#ifndef MODE_RESET
|
||||
# define MODE_RESET PS_MODE1
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPL_BOARD_INIT
|
||||
void spl_board_init(void)
|
||||
{
|
||||
preloader_console_init();
|
||||
ps_mode_reset(MODE_RESET);
|
||||
board_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 spl_boot_device(void)
|
||||
{
|
||||
u32 reg = 0;
|
||||
u8 bootmode;
|
||||
|
||||
#if defined(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED)
|
||||
/* Change default boot mode at run-time */
|
||||
writel(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT,
|
||||
&crlapb_base->boot_mode);
|
||||
#endif
|
||||
|
||||
reg = readl(&crlapb_base->boot_mode);
|
||||
if (reg >> BOOT_MODE_ALT_SHIFT)
|
||||
reg >>= BOOT_MODE_ALT_SHIFT;
|
||||
|
||||
bootmode = reg & BOOT_MODES_MASK;
|
||||
|
||||
switch (bootmode) {
|
||||
case JTAG_MODE:
|
||||
return BOOT_DEVICE_RAM;
|
||||
#ifdef CONFIG_SPL_MMC_SUPPORT
|
||||
case SD_MODE1:
|
||||
case SD1_LSHFT_MODE: /* not working on silicon v1 */
|
||||
/* if both controllers enabled, then these two are the second controller */
|
||||
#if defined(CONFIG_ZYNQ_SDHCI0) && defined(CONFIG_ZYNQ_SDHCI1)
|
||||
return BOOT_DEVICE_MMC2;
|
||||
/* else, fall through, the one SDHCI controller that is enabled is number 1 */
|
||||
#endif
|
||||
case SD_MODE:
|
||||
case EMMC_MODE:
|
||||
return BOOT_DEVICE_MMC1;
|
||||
#endif
|
||||
#ifdef CONFIG_SPL_DFU
|
||||
case USB_MODE:
|
||||
return BOOT_DEVICE_DFU;
|
||||
#endif
|
||||
#ifdef CONFIG_SPL_SATA_SUPPORT
|
||||
case SW_SATA_MODE:
|
||||
return BOOT_DEVICE_SATA;
|
||||
#endif
|
||||
#ifdef CONFIG_SPL_SPI_SUPPORT
|
||||
case QSPI_MODE_24BIT:
|
||||
case QSPI_MODE_32BIT:
|
||||
return BOOT_DEVICE_SPI;
|
||||
#endif
|
||||
default:
|
||||
printf("Invalid Boot Mode:0x%x\n", bootmode);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_OS_BOOT
|
||||
int spl_start_uboot(void)
|
||||
{
|
||||
handoff_setup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPL_LOAD_FIT
|
||||
int board_fit_config_name_match(const char *name)
|
||||
{
|
||||
/* Just empty function now - can't decide what to choose */
|
||||
debug("%s: %s\n", __func__, name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
|
@ -67,8 +67,10 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
|
|||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
ifndef CONFIG_TPL_BUILD
|
||||
obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu.o
|
||||
obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
|
||||
ifdef CONFIG_SPL_DFU
|
||||
obj-$(CONFIG_DFU_OVER_USB) += dfu.o
|
||||
endif
|
||||
obj-$(CONFIG_SPL_DFU) += cli_hush.o
|
||||
obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
|
||||
obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
|
||||
obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o
|
||||
|
|
|
@ -698,8 +698,8 @@ config SPL_USBETH_SUPPORT
|
|||
since the network stack uses a number of environment variables.
|
||||
See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
|
||||
|
||||
config SPL_DFU_SUPPORT
|
||||
bool "Support DFU (Device Firmware Upgarde)"
|
||||
config SPL_DFU
|
||||
bool "Support DFU (Device Firmware Upgrade)"
|
||||
select SPL_HASH_SUPPORT
|
||||
select SPL_DFU_NO_RESET
|
||||
depends on SPL_RAM_SUPPORT
|
||||
|
@ -713,11 +713,11 @@ config SPL_DFU_SUPPORT
|
|||
|
||||
choice
|
||||
bool "DFU device selection"
|
||||
depends on SPL_DFU_SUPPORT
|
||||
depends on SPL_DFU
|
||||
|
||||
config SPL_DFU_RAM
|
||||
bool "RAM device"
|
||||
depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT
|
||||
depends on SPL_DFU && SPL_RAM_SUPPORT
|
||||
help
|
||||
select RAM/DDR memory device for loading binary images
|
||||
(u-boot/kernel) to the selected device partition using
|
||||
|
|
|
@ -40,7 +40,7 @@ obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o
|
|||
obj-$(CONFIG_$(SPL_TPL_)FAT_SUPPORT) += spl_fat.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)EXT_SUPPORT) += spl_ext.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)DFU_SUPPORT) += spl_dfu.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)DFU) += spl_dfu.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)SPI_LOAD) += spl_spi.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)RAM_SUPPORT) += spl_ram.o
|
||||
obj-$(CONFIG_$(SPL_TPL_)USB_SDP_SUPPORT) += spl_sdp.o
|
||||
|
|
|
@ -34,7 +34,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
|
|||
|
||||
header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS;
|
||||
|
||||
#if defined(CONFIG_SPL_DFU_SUPPORT)
|
||||
#if CONFIG_IS_ENABLED(DFU)
|
||||
if (bootdev->boot_device == BOOT_DEVICE_DFU)
|
||||
spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
|
|||
#if defined(CONFIG_SPL_RAM_DEVICE)
|
||||
SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image);
|
||||
#endif
|
||||
#if defined(CONFIG_SPL_DFU_SUPPORT)
|
||||
#if CONFIG_IS_ENABLED(DFU)
|
||||
SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ CONFIG_CMD_DFU=y
|
|||
CONFIG_SPL_BLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_SPL_DFU_RAM=y
|
||||
CONFIG_SPL_DFU_SUPPORT=y
|
||||
CONFIG_SPL_DFU=y
|
||||
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
CONFIG_SPL_ENV_SUPPORT=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
|
|
|
@ -72,7 +72,7 @@ CONFIG_CMD_DFU=y
|
|||
CONFIG_SPL_BLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_SPL_DFU_RAM=y
|
||||
CONFIG_SPL_DFU_SUPPORT=y
|
||||
CONFIG_SPL_DFU=y
|
||||
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||
CONFIG_SPL_ENV_SUPPORT=y
|
||||
CONFIG_SPL_MTD_SUPPORT=y
|
||||
|
|
|
@ -47,7 +47,7 @@ obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/udc/
|
|||
obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/
|
||||
obj-$(CONFIG_SPL_USB_GADGET) += usb/common/
|
||||
obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/udc/
|
||||
obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/
|
||||
obj-$(CONFIG_SPL_DFU) += dfu/
|
||||
obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/
|
||||
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/
|
||||
obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
|
||||
|
|
|
@ -10,7 +10,7 @@ obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
|
|||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
|
||||
obj-$(CONFIG_SPL_DFU_SUPPORT) += f_dfu.o
|
||||
obj-$(CONFIG_SPL_DFU) += f_dfu.o
|
||||
obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
|
||||
endif
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
#undef CONFIG_CMD_BOOTD
|
||||
#ifdef CONFIG_SPL_DFU_SUPPORT
|
||||
#ifdef CONFIG_SPL_DFU
|
||||
#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000
|
||||
#define DFUARGS \
|
||||
"dfu_bufsiz=0x10000\0" \
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
#endif
|
||||
|
||||
/* SPL can't handle all huge variables - define just DFU */
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT)
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU)
|
||||
#undef CONFIG_EXTRA_ENV_SETTINGS
|
||||
# define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"dfu_alt_info_ram=uboot.bin ram 0x8000000 0x1000000;" \
|
||||
|
@ -254,7 +254,7 @@
|
|||
# define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU_SUPPORT)
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU)
|
||||
# undef CONFIG_CMD_BOOTD
|
||||
# define CONFIG_SPL_ENV_SUPPORT
|
||||
# define CONFIG_SPL_HASH_SUPPORT
|
||||
|
|
Loading…
Reference in New Issue