summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig7
-rw-r--r--arch/arm/dts/r8a7791-porter-u-boot.dts4
-rw-r--r--arch/arm/dts/r8a7791-porter.dts5
-rw-r--r--arch/arm/dts/r8a779x-u-boot.dtsi8
-rw-r--r--arch/arm/dts/socfpga_arria5_socdk.dts2
-rw-r--r--arch/arm/dts/socfpga_cyclone5_is1.dts2
-rw-r--r--arch/arm/dts/socfpga_cyclone5_socdk.dts2
-rw-r--r--arch/arm/dts/socfpga_cyclone5_socrates.dts2
-rw-r--r--arch/arm/mach-rmobile/Kconfig.322
-rw-r--r--board/armltd/vexpress/MAINTAINERS8
-rw-r--r--board/compulab/cl-som-am57x/cl-som-am57x.c13
-rw-r--r--board/compulab/cm_t43/cm_t43.c14
-rw-r--r--board/renesas/porter/porter.c53
-rw-r--r--board/ti/am43xx/board.c4
-rw-r--r--board/ti/am57xx/board.c4
-rw-r--r--board/ti/dra7xx/evm.c4
-rw-r--r--configs/porter_defconfig24
-rw-r--r--configs/r8a7795_salvator-x_defconfig1
-rw-r--r--configs/r8a7795_ulcb_defconfig1
-rw-r--r--configs/r8a7796_salvator-x_defconfig1
-rw-r--r--configs/r8a7796_ulcb_defconfig1
-rw-r--r--configs/r8a77970_eagle_defconfig1
-rw-r--r--configs/r8a77995_draak_defconfig1
-rw-r--r--drivers/clk/renesas/clk-rcar-gen3.c2
-rw-r--r--drivers/i2c/Kconfig2
-rw-r--r--drivers/i2c/mvtwsi.c5
-rw-r--r--drivers/mtd/ubi/build.c10
-rw-r--r--drivers/mtd/ubi/ubi.h2
-rw-r--r--drivers/mtd/ubi/wl.c53
-rw-r--r--drivers/net/ravb.c32
-rw-r--r--drivers/net/sh_eth.c53
-rw-r--r--drivers/serial/serial_sh.c4
-rw-r--r--drivers/usb/host/dwc2.c2
-rw-r--r--drivers/usb/host/dwc2.h2
-rw-r--r--drivers/usb/host/xhci-omap.c22
-rw-r--r--env/eeprom.c6
-rw-r--r--env/env.c37
-rw-r--r--env/nvram.c8
-rw-r--r--include/asm-generic/global_data.h1
-rw-r--r--include/configs/porter.h29
-rw-r--r--include/configs/rcar-gen2-common.h2
-rw-r--r--include/configs/rcar-gen3-common.h1
-rw-r--r--include/configs/socfpga_arria10_socdk.h2
-rw-r--r--include/configs/socfpga_arria5_socdk.h2
-rw-r--r--include/configs/socfpga_cyclone5_socdk.h2
-rw-r--r--include/configs/socfpga_de0_nano_soc.h2
-rw-r--r--include/configs/socfpga_de10_nano.h2
-rw-r--r--include/configs/socfpga_de1_soc.h2
-rw-r--r--include/configs/socfpga_is1.h2
-rw-r--r--include/configs/socfpga_mcvevk.h2
-rw-r--r--include/configs/socfpga_sockit.h2
-rw-r--r--include/configs/socfpga_socrates.h2
-rw-r--r--include/configs/socfpga_sr1500.h2
-rw-r--r--include/configs/socfpga_vining_fpga.h2
-rw-r--r--include/environment.h13
55 files changed, 264 insertions, 210 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7b618d6881..77cb20090c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -698,16 +698,17 @@ config ARCH_SOCFPGA
select OF_CONTROL
select SPL_OF_CONTROL
select DM
- select DM_SPI_FLASH
- select DM_SPI
select ENABLE_ARM_SOC_BOOT0_HOOK
select ARCH_EARLY_INIT_R
select ARCH_MISC_INIT
- select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
select SYS_THUMB_BUILD
imply CMD_MTDPARTS
imply CRC32_VERIFY
+ imply DM_SPI
+ imply DM_SPI_FLASH
imply FAT_WRITE
+ imply HW_WATCHDOG
+ imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
config ARCH_SUNXI
bool "Support sunxi (Allwinner) SoCs"
diff --git a/arch/arm/dts/r8a7791-porter-u-boot.dts b/arch/arm/dts/r8a7791-porter-u-boot.dts
index 987d0e4035..922024883c 100644
--- a/arch/arm/dts/r8a7791-porter-u-boot.dts
+++ b/arch/arm/dts/r8a7791-porter-u-boot.dts
@@ -8,3 +8,7 @@
#include "r8a7791-porter.dts"
#include "r8a7791-u-boot.dtsi"
+
+&scif0 {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/r8a7791-porter.dts b/arch/arm/dts/r8a7791-porter.dts
index bc93bb24e4..0592aa7f49 100644
--- a/arch/arm/dts/r8a7791-porter.dts
+++ b/arch/arm/dts/r8a7791-porter.dts
@@ -351,6 +351,11 @@
};
};
+&i2c6 {
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
&sata0 {
status = "okay";
};
diff --git a/arch/arm/dts/r8a779x-u-boot.dtsi b/arch/arm/dts/r8a779x-u-boot.dtsi
index 0baac1d2c5..f34cb942ed 100644
--- a/arch/arm/dts/r8a779x-u-boot.dtsi
+++ b/arch/arm/dts/r8a779x-u-boot.dtsi
@@ -20,6 +20,14 @@
u-boot,dm-pre-reloc;
};
+&pfc {
+ u-boot,dm-pre-reloc;
+};
+
&prr {
u-boot,dm-pre-reloc;
};
+
+&rst {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/socfpga_arria5_socdk.dts b/arch/arm/dts/socfpga_arria5_socdk.dts
index 1e91a65af6..4e4b619f4f 100644
--- a/arch/arm/dts/socfpga_arria5_socdk.dts
+++ b/arch/arm/dts/socfpga_arria5_socdk.dts
@@ -88,7 +88,7 @@
u-boot,dm-pre-reloc;
#address-cells = <1>;
#size-cells = <1>;
- compatible = "n25q00";
+ compatible = "n25q00", "spi-flash";
reg = <0>; /* chip select */
spi-max-frequency = <50000000>;
m25p,fast-read;
diff --git a/arch/arm/dts/socfpga_cyclone5_is1.dts b/arch/arm/dts/socfpga_cyclone5_is1.dts
index 2e2b71fefb..ea323a16ca 100644
--- a/arch/arm/dts/socfpga_cyclone5_is1.dts
+++ b/arch/arm/dts/socfpga_cyclone5_is1.dts
@@ -87,7 +87,7 @@
u-boot,dm-pre-reloc;
#address-cells = <1>;
#size-cells = <1>;
- compatible = "n25q00";
+ compatible = "n25q00", "spi-flash";
reg = <0>; /* chip select */
spi-max-frequency = <100000000>;
m25p,fast-read;
diff --git a/arch/arm/dts/socfpga_cyclone5_socdk.dts b/arch/arm/dts/socfpga_cyclone5_socdk.dts
index 95a8e653d7..3af51134bb 100644
--- a/arch/arm/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/dts/socfpga_cyclone5_socdk.dts
@@ -98,7 +98,7 @@
u-boot,dm-pre-reloc;
#address-cells = <1>;
#size-cells = <1>;
- compatible = "n25q00";
+ compatible = "n25q00", "spi-flash";
reg = <0>; /* chip select */
spi-max-frequency = <100000000>;
m25p,fast-read;
diff --git a/arch/arm/dts/socfpga_cyclone5_socrates.dts b/arch/arm/dts/socfpga_cyclone5_socrates.dts
index e3ae8a8207..e612eeed4f 100644
--- a/arch/arm/dts/socfpga_cyclone5_socrates.dts
+++ b/arch/arm/dts/socfpga_cyclone5_socrates.dts
@@ -68,7 +68,7 @@
flash0: n25q00@0 {
#address-cells = <1>;
#size-cells = <1>;
- compatible = "n25q00";
+ compatible = "n25q00", "spi-flash";
reg = <0>; /* chip select */
spi-max-frequency = <50000000>;
m25p,fast-read;
diff --git a/arch/arm/mach-rmobile/Kconfig.32 b/arch/arm/mach-rmobile/Kconfig.32
index ab05966d15..a96938c01e 100644
--- a/arch/arm/mach-rmobile/Kconfig.32
+++ b/arch/arm/mach-rmobile/Kconfig.32
@@ -70,6 +70,8 @@ config TARGET_PORTER
bool "Porter board"
select DM
select DM_SERIAL
+ select SUPPORT_SPL
+ select SPL_DM if SPL
config TARGET_STOUT
bool "Stout board"
diff --git a/board/armltd/vexpress/MAINTAINERS b/board/armltd/vexpress/MAINTAINERS
index a6943d7426..7b3fb42e56 100644
--- a/board/armltd/vexpress/MAINTAINERS
+++ b/board/armltd/vexpress/MAINTAINERS
@@ -1,13 +1,9 @@
-VEXPRESS BOARD
-#M: -
+VERSATILE EXPRESS BOARDS
+M: Linus Walleij <linus.walleij@linaro.org>
S: Maintained
F: board/armltd/vexpress/
F: include/configs/vexpress_ca15_tc2.h
F: configs/vexpress_ca15_tc2_defconfig
-
-VEXPRESS_CA5X2 BOARD
-#M: Matt Waddel <matt.waddel@linaro.org>
-S: Orphan (since 2014-08)
F: include/configs/vexpress_ca5x2.h
F: configs/vexpress_ca5x2_defconfig
F: include/configs/vexpress_ca9x4.h
diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c b/board/compulab/cl-som-am57x/cl-som-am57x.c
index 389eebb589..d7dc8a42e4 100644
--- a/board/compulab/cl-som-am57x/cl-som-am57x.c
+++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
@@ -16,6 +16,7 @@
#include <asm/arch/sys_proto.h>
#include "../common/common.h"
#include "../common/eeprom.h"
+#include <asm/omap_common.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -64,3 +65,15 @@ u32 get_board_rev(void)
{
return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
}
+
+int board_usb_init(int index, enum usb_init_type init)
+{
+ enable_usb_clocks(index);
+ return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+ disable_usb_clocks(index);
+ return 0;
+}
diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c
index 0d5da6f5e9..bdbea4f5e5 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -14,6 +14,8 @@
#include <power/pmic.h>
#include <power/tps65218.h>
#include "board.h"
+#include <usb.h>
+#include <asm/omap_common.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -50,6 +52,18 @@ int board_init(void)
return 0;
}
+int board_usb_init(int index, enum usb_init_type init)
+{
+ enable_usb_clocks(index);
+ return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+ disable_usb_clocks(index);
+ return 0;
+}
+
#ifdef CONFIG_DRIVER_TI_CPSW
static void cpsw_control(int enabled)
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index 86dea8bfa7..320841f27b 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -65,11 +65,19 @@ int board_early_init_f(void)
return 0;
}
+#define ETHERNET_PHY_RESET 176 /* GPIO 5 22 */
+
int board_init(void)
{
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ /* Force ethernet PHY out of reset */
+ gpio_request(ETHERNET_PHY_RESET, "phy_reset");
+ gpio_direction_output(ETHERNET_PHY_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(ETHERNET_PHY_RESET, 1);
+
return 0;
}
@@ -108,10 +116,45 @@ const struct rmobile_sysinfo sysinfo = {
void reset_cpu(ulong addr)
{
- u8 val;
+ struct udevice *dev;
+ const u8 pmic_bus = 6;
+ const u8 pmic_addr = 0x5a;
+ u8 data;
+ int ret;
+
+ ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev);
+ if (ret)
+ hang();
+
+ ret = dm_i2c_read(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
+
+ data |= BIT(1);
+
+ ret = dm_i2c_write(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
+}
+
+#ifdef CONFIG_SPL_BUILD
+#include <spl.h>
+void board_init_f(ulong dummy)
+{
+ board_early_init_f();
+}
- i2c_set_bus_num(2); /* PowerIC connected to ch2 */
- i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
- val |= 0x02;
- i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
+void spl_board_init(void)
+{
+ /* UART clocks enabled and gd valid - init serial console */
+ preloader_console_init();
+}
+
+void board_boot_order(u32 *spl_boot_list)
+{
+ /* Boot from SPI NOR with YMODEM UART fallback. */
+ spl_boot_list[0] = BOOT_DEVICE_SPI;
+ spl_boot_list[1] = BOOT_DEVICE_UART;
+ spl_boot_list[2] = BOOT_DEVICE_NONE;
}
+#endif
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 16150ad30a..715960a596 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -687,7 +687,7 @@ int usb_gadget_handle_interrupts(int index)
#endif /* CONFIG_USB_DWC3 */
#if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
-int omap_xhci_board_usb_init(int index, enum usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
{
enable_usb_clocks(index);
#ifdef CONFIG_USB_DWC3
@@ -718,7 +718,7 @@ int omap_xhci_board_usb_init(int index, enum usb_init_type init)
return 0;
}
-int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
{
#ifdef CONFIG_USB_DWC3
switch (index) {
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 11287846e0..c3f60f60c8 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -867,7 +867,7 @@ int usb_gadget_handle_interrupts(int index)
#endif /* CONFIG_USB_DWC3 */
#if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
-int omap_xhci_board_usb_init(int index, enum usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
{
enable_usb_clocks(index);
switch (index) {
@@ -901,7 +901,7 @@ int omap_xhci_board_usb_init(int index, enum usb_init_type init)
return 0;
}
-int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
{
#ifdef CONFIG_USB_DWC3
switch (index) {
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 6ecf971a92..519475e01f 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -907,7 +907,7 @@ static struct ti_usb_phy_device usb_phy2_device = {
.index = 1,
};
-int omap_xhci_board_usb_init(int index, enum usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
{
enable_usb_clocks(index);
switch (index) {
@@ -944,7 +944,7 @@ int omap_xhci_board_usb_init(int index, enum usb_init_type init)
return 0;
}
-int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
{
switch (index) {
case 0:
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index 38501d0bf1..736576c78e 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -1,12 +1,23 @@
CONFIG_ARM=y
CONFIG_ARCH_RMOBILE=y
-CONFIG_SYS_TEXT_BASE=0xE6304000
+CONFIG_SYS_TEXT_BASE=0x50000000
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_R8A7791=y
CONFIG_TARGET_PORTER=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7791-porter-u-boot"
+CONFIG_FIT=y
CONFIG_BOOTDELAY=3
CONFIG_VERSION_VARIABLE=y
+CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
@@ -21,16 +32,26 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dma-names dmas power-domains"
CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_OF_TRANSLATE=y
CONFIG_CLK=y
+CONFIG_SPL_CLK=y
CONFIG_CLK_RENESAS=y
CONFIG_DM_GPIO=y
CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_MMC_UNIPHIER=y
CONFIG_SPI_FLASH=y
@@ -44,6 +65,7 @@ CONFIG_DM_PCI=y
CONFIG_PCI_RCAR_GEN2=y
CONFIG_PINCTRL=y
CONFIG_PINCONF=y
+CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_PFC=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
diff --git a/configs/r8a7795_salvator-x_defconfig b/configs/r8a7795_salvator-x_defconfig
index f59736dcf7..8df8a899b8 100644
--- a/configs/r8a7795_salvator-x_defconfig
+++ b/configs/r8a7795_salvator-x_defconfig
@@ -54,4 +54,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a7795_ulcb_defconfig b/configs/r8a7795_ulcb_defconfig
index 9317f01461..273caf3219 100644
--- a/configs/r8a7795_ulcb_defconfig
+++ b/configs/r8a7795_ulcb_defconfig
@@ -55,4 +55,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a7796_salvator-x_defconfig b/configs/r8a7796_salvator-x_defconfig
index 77c856867e..ddcca68396 100644
--- a/configs/r8a7796_salvator-x_defconfig
+++ b/configs/r8a7796_salvator-x_defconfig
@@ -55,4 +55,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a7796_ulcb_defconfig b/configs/r8a7796_ulcb_defconfig
index cee34b339e..1ac460bcd3 100644
--- a/configs/r8a7796_ulcb_defconfig
+++ b/configs/r8a7796_ulcb_defconfig
@@ -56,4 +56,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig
index 5d8bc6645c..22b7bbd09b 100644
--- a/configs/r8a77970_eagle_defconfig
+++ b/configs/r8a77970_eagle_defconfig
@@ -54,4 +54,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index a5bf21c0e7..d4359217e3 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -58,4 +58,5 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SMBIOS_MANUFACTURER=""
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index 0c394a8a71..1be3fe7136 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -288,6 +288,8 @@ static ulong gen3_clk_get_rate(struct clk *clk)
static ulong gen3_clk_set_rate(struct clk *clk, ulong rate)
{
+ /* Force correct SD-IF divider configuration if applicable */
+ gen3_clk_setup_sdif_div(clk);
return gen3_clk_get_rate(clk);
}
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 7dbec775df..9d43690503 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -178,7 +178,7 @@ endif
config SYS_I2C_RCAR_IIC
bool "Renesas RCar Gen3 IIC driver"
- depends on RCAR_GEN3 && DM_I2C
+ depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
help
Support for Renesas RCar Gen3 IIC controller.
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index 30bee0d52e..38bca89745 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -487,11 +487,14 @@ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi,
static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed,
int slaveadd, uint *actual_speed)
{
+ uint tmp_speed;
+
/* Reset controller */
twsi_reset(twsi);
/* Set speed */
+ tmp_speed = __twsi_i2c_set_bus_speed(twsi, speed);
if (actual_speed)
- *actual_speed = __twsi_i2c_set_bus_speed(twsi, speed);
+ *actual_speed = tmp_speed;
/* Set slave address; even though we don't use it */
writel(slaveadd, &twsi->slave_address);
writel(0, &twsi->xtnd_slave_addr);
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index baf4e2d25b..d81bd434ac 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1060,15 +1060,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
#ifndef __UBOOT__
wake_up_process(ubi->bgt_thread);
#else
- /*
- * U-Boot special: We have no bgt_thread in U-Boot!
- * So just call do_work() here directly.
- */
- err = do_work(ubi);
- if (err) {
- ubi_err(ubi, "%s: work failed with error code %d",
- ubi->bgt_name, err);
- }
+ ubi_do_worker(ubi);
#endif
spin_unlock(&ubi->wl_lock);
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 540f721e1b..3337201fb0 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -1119,6 +1119,6 @@ static inline int idx2vol_id(const struct ubi_device *ubi, int idx)
}
#ifdef __UBOOT__
-int do_work(struct ubi_device *ubi);
+void ubi_do_worker(struct ubi_device *ubi);
#endif
#endif /* !__UBI_UBI_H__ */
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index e823ca56f2..0de2a4a5f8 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -191,11 +191,7 @@ static void wl_entry_destroy(struct ubi_device *ubi, struct ubi_wl_entry *e)
* This function returns zero in case of success and a negative error code in
* case of failure.
*/
-#ifndef __UBOOT__
static int do_work(struct ubi_device *ubi)
-#else
-int do_work(struct ubi_device *ubi)
-#endif
{
int err;
struct ubi_work *wrk;
@@ -528,6 +524,33 @@ repeat:
spin_unlock(&ubi->wl_lock);
}
+#ifdef __UBOOT__
+void ubi_do_worker(struct ubi_device *ubi)
+{
+ int err;
+
+ if (list_empty(&ubi->works) || ubi->ro_mode ||
+ !ubi->thread_enabled || ubi_dbg_is_bgt_disabled(ubi))
+ return;
+
+ spin_lock(&ubi->wl_lock);
+ while (!list_empty(&ubi->works)) {
+ /*
+ * call do_work, which executes exactly one work form the queue,
+ * including removeing it from the work queue.
+ */
+ spin_unlock(&ubi->wl_lock);
+ err = do_work(ubi);
+ spin_lock(&ubi->wl_lock);
+ if (err) {
+ ubi_err(ubi, "%s: work failed with error code %d",
+ ubi->bgt_name, err);
+ }
+ }
+ spin_unlock(&ubi->wl_lock);
+}
+#endif
+
/**
* __schedule_ubi_work - schedule a work.
* @ubi: UBI device description object
@@ -545,17 +568,6 @@ static void __schedule_ubi_work(struct ubi_device *ubi, struct ubi_work *wrk)
#ifndef __UBOOT__
if (ubi->thread_enabled && !ubi_dbg_is_bgt_disabled(ubi))
wake_up_process(ubi->bgt_thread);
-#else
- int err;
- /*
- * U-Boot special: We have no bgt_thread in U-Boot!
- * So just call do_work() here directly.
- */
- err = do_work(ubi);
- if (err) {
- ubi_err(ubi, "%s: work failed with error code %d",
- ubi->bgt_name, err);
- }
#endif
spin_unlock(&ubi->wl_lock);
}
@@ -610,6 +622,10 @@ static int schedule_erase(struct ubi_device *ubi, struct ubi_wl_entry *e,
wl_wrk->torture = torture;
schedule_ubi_work(ubi, wl_wrk);
+
+#ifdef __UBOOT__
+ ubi_do_worker(ubi);
+#endif
return 0;
}
@@ -1011,8 +1027,15 @@ static int ensure_wear_leveling(struct ubi_device *ubi, int nested)
wrk->func = &wear_leveling_worker;
if (nested)
__schedule_ubi_work(ubi, wrk);
+#ifndef __UBOOT__
else
schedule_ubi_work(ubi, wrk);
+#else
+ else {
+ schedule_ubi_work(ubi, wrk);
+ ubi_do_worker(ubi);
+ }
+#endif
return err;
out_cancel:
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 093288b639..bd30cba940 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -399,7 +399,7 @@ static int ravb_dmac_init(struct udevice *dev)
static int ravb_config(struct udevice *dev)
{
struct ravb_priv *eth = dev_get_priv(dev);
- struct phy_device *phy;
+ struct phy_device *phy = eth->phydev;
u32 mask = ECMR_CHG_DM | ECMR_RE | ECMR_TE;
int ret;
@@ -410,13 +410,6 @@ static int ravb_config(struct udevice *dev)
ravb_mac_init(eth);
ravb_write_hwaddr(dev);
- /* Configure phy */
- ret = ravb_phy_config(dev);
- if (ret)
- return ret;
-
- phy = eth->phydev;
-
ret = phy_startup(phy);
if (ret)
return ret;
@@ -443,10 +436,6 @@ static int ravb_start(struct udevice *dev)
struct ravb_priv *eth = dev_get_priv(dev);
int ret;
- ret = clk_enable(&eth->clk);
- if (ret)
- return ret;
-
ret = ravb_reset(dev);
if (ret)
goto err;
@@ -473,8 +462,8 @@ static void ravb_stop(struct udevice *dev)
{
struct ravb_priv *eth = dev_get_priv(dev);
+ phy_shutdown(eth->phydev);
ravb_reset(dev);
- clk_disable(&eth->clk);
}
static int ravb_probe(struct udevice *dev)
@@ -512,8 +501,23 @@ static int ravb_probe(struct udevice *dev)
eth->bus = miiphy_get_dev_by_name(dev->name);
+ /* Bring up PHY */
+ ret = clk_enable(&eth->clk);
+ if (ret)
+ goto err_mdio_register;
+
+ ret = ravb_reset(dev);
+ if (ret)
+ goto err_mdio_reset;
+
+ ret = ravb_phy_config(dev);
+ if (ret)
+ goto err_mdio_reset;
+
return 0;
+err_mdio_reset:
+ clk_disable(&eth->clk);
err_mdio_register:
mdio_free(mdiodev);
err_mdio_alloc:
@@ -525,6 +529,8 @@ static int ravb_remove(struct udevice *dev)
{
struct ravb_priv *eth = dev_get_priv(dev);
+ clk_disable(&eth->clk);
+
free(eth->phydev);
mdio_unregister(eth->bus);
mdio_free(eth->bus);
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 5a5c6bc39e..6f48e93ab5 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -63,8 +63,8 @@
static int sh_eth_send_common(struct sh_eth_dev *eth, void *packet, int len)
{
- int port = eth->port, ret = 0, timeout;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ int ret = 0, timeout;
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
if (!packet || len > 0xffff) {
printf(SHETHER_NAME ": %s: Invalid argument\n", __func__);
@@ -120,8 +120,7 @@ err:
static int sh_eth_recv_start(struct sh_eth_dev *eth)
{
- int port = eth->port, len = 0;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
/* Check if the rx descriptor is ready */
invalidate_cache(port_info->rx_desc_cur, sizeof(struct rx_desc_s));
@@ -132,9 +131,7 @@ static int sh_eth_recv_start(struct sh_eth_dev *eth)
if (port_info->rx_desc_cur->rd0 & RD_RFE)
return -EINVAL;
- len = port_info->rx_desc_cur->rd1 & 0xffff;
-
- return len;
+ return port_info->rx_desc_cur->rd1 & 0xffff;
}
static void sh_eth_recv_finish(struct sh_eth_dev *eth)
@@ -182,7 +179,7 @@ static int sh_eth_reset(struct sh_eth_dev *eth)
return ret;
#else
sh_eth_write(port_info, sh_eth_read(port_info, EDMR) | EDMR_SRST, EDMR);
- udelay(3000);
+ mdelay(3);
sh_eth_write(port_info,
sh_eth_read(port_info, EDMR) & ~EDMR_SRST, EDMR);
@@ -192,9 +189,9 @@ static int sh_eth_reset(struct sh_eth_dev *eth)
static int sh_eth_tx_desc_init(struct sh_eth_dev *eth)
{
- int port = eth->port, i, ret = 0;
+ int i, ret = 0;
u32 alloc_desc_size = NUM_TX_DESC * sizeof(struct tx_desc_s);
- struct sh_eth_info *port_info = &eth->port_info[port];
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
struct tx_desc_s *cur_tx_desc;
/*
@@ -245,9 +242,9 @@ err:
static int sh_eth_rx_desc_init(struct sh_eth_dev *eth)
{
- int port = eth->port, i, ret = 0;
+ int i, ret = 0;
u32 alloc_desc_size = NUM_RX_DESC * sizeof(struct rx_desc_s);
- struct sh_eth_info *port_info = &eth->port_info[port];
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
struct rx_desc_s *cur_rx_desc;
u8 *rx_buf;
@@ -318,8 +315,7 @@ err:
static void sh_eth_tx_desc_free(struct sh_eth_dev *eth)
{
- int port = eth->port;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
if (port_info->tx_desc_alloc) {
free(port_info->tx_desc_alloc);
@@ -329,8 +325,7 @@ static void sh_eth_tx_desc_free(struct sh_eth_dev *eth)
static void sh_eth_rx_desc_free(struct sh_eth_dev *eth)
{
- int port = eth->port;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
if (port_info->rx_desc_alloc) {
free(port_info->rx_desc_alloc);
@@ -522,8 +517,8 @@ static int sh_eth_start_common(struct sh_eth_dev *eth)
#ifndef CONFIG_DM_ETH
static int sh_eth_phy_config_legacy(struct sh_eth_dev *eth)
{
- int port = eth->port, ret = 0;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ int ret = 0;
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
struct eth_device *dev = port_info->dev;
struct phy_device *phydev;
@@ -545,8 +540,8 @@ static int sh_eth_send_legacy(struct eth_device *dev, void *packet, int len)
static int sh_eth_recv_common(struct sh_eth_dev *eth)
{
- int port = eth->port, len = 0;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ int len = 0;
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2);
len = sh_eth_recv_start(eth);
@@ -680,7 +675,7 @@ struct sh_ether_priv {
struct sh_eth_dev shdev;
struct mii_dev *bus;
- void __iomem *iobase;
+ phys_addr_t iobase;
struct clk clk;
struct gpio_desc reset_gpio;
};
@@ -750,8 +745,8 @@ static int sh_eth_phy_config(struct udevice *dev)
struct sh_ether_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_platdata(dev);
struct sh_eth_dev *eth = &priv->shdev;
- int port = eth->port, ret = 0;
- struct sh_eth_info *port_info = &eth->port_info[port];
+ int ret = 0;
+ struct sh_eth_info *port_info = &eth->port_info[eth->port];
struct phy_device *phydev;
int mask = 0xffffffff;
@@ -816,15 +811,13 @@ static int sh_ether_probe(struct udevice *udev)
struct sh_ether_priv *priv = dev_get_priv(udev);
struct sh_eth_dev *eth = &priv->shdev;
struct mii_dev *mdiodev;
- void __iomem *iobase;
int ret;
- iobase = map_physmem(pdata->iobase, 0x1000, MAP_NOCACHE);
- priv->iobase = iobase;
+ priv->iobase = pdata->iobase;
ret = clk_get_by_index(udev, 0, &priv->clk);
if (ret < 0)
- goto err_mdio_alloc;
+ return ret;
gpio_request_by_name(udev, "reset-gpios", 0, &priv->reset_gpio,
GPIOD_IS_OUT);
@@ -832,7 +825,7 @@ static int sh_ether_probe(struct udevice *udev)
mdiodev = mdio_alloc();
if (!mdiodev) {
ret = -ENOMEM;
- goto err_mdio_alloc;
+ return ret;
}
mdiodev->read = bb_miiphy_read;
@@ -855,8 +848,6 @@ static int sh_ether_probe(struct udevice *udev)
err_mdio_register:
mdio_free(mdiodev);
-err_mdio_alloc:
- unmap_physmem(priv->iobase, MAP_NOCACHE);
return ret;
}
@@ -873,8 +864,6 @@ static int sh_ether_remove(struct udevice *udev)
if (dm_gpio_is_valid(&priv->reset_gpio))
dm_gpio_free(udev, &priv->reset_gpio);
- unmap_physmem(priv->iobase, MAP_NOCACHE);
-
return 0;
}
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index c07ddc70dc..a17698f90e 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -149,7 +149,7 @@ static int sh_serial_getc_generic(struct uart_port *port)
return ch;
}
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
static int sh_serial_pending(struct udevice *dev, bool input)
{
@@ -204,7 +204,7 @@ static const struct dm_serial_ops sh_serial_ops = {
.setbrg = sh_serial_setbrg,
};
-#ifdef CONFIG_OF_CONTROL
+#if CONFIG_IS_ENABLED(OF_CONTROL)
static const struct udevice_id sh_serial_id[] ={
{.compatible = "renesas,sci", .data = PORT_SCI},
{.compatible = "renesas,scif", .data = PORT_SCIF},
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 540c016412..0efe645044 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -375,7 +375,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv)
usbcfg &= ~DWC2_GUSBCFG_DDRSEL;
#endif
} else { /* UTMI+ interface */
-#if (CONFIG_DWC2_UTMI_PHY_WIDTH == 16)
+#if (CONFIG_DWC2_UTMI_WIDTH == 16)
usbcfg |= DWC2_GUSBCFG_PHYIF;
#endif
}
diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h
index 4482dc621d..574607a2ac 100644
--- a/drivers/usb/host/dwc2.h
+++ b/drivers/usb/host/dwc2.h
@@ -775,7 +775,9 @@ struct dwc2_core_regs {
#define DWC2_PHY_TYPE_UTMI 1
#define DWC2_PHY_TYPE_ULPI 2
#define CONFIG_DWC2_PHY_TYPE DWC2_PHY_TYPE_UTMI /* PHY type */
+#ifndef CONFIG_DWC2_UTMI_WIDTH
#define CONFIG_DWC2_UTMI_WIDTH 8 /* UTMI bus width (8/16) */
+#endif
#undef CONFIG_DWC2_PHY_ULPI_DDR /* ULPI PHY uses DDR mode */
#define CONFIG_DWC2_PHY_ULPI_EXT_VBUS /* ULPI PHY controls VBUS */
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index d6c5744818..b814500bdb 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -27,28 +27,6 @@ DECLARE_GLOBAL_DATA_PTR;
static struct omap_xhci omap;
-__weak int omap_xhci_board_usb_init(int index, enum usb_init_type init)
-{
- enable_usb_clocks(index);
- return 0;
-}
-
-int board_usb_init(int index, enum usb_init_type init)
-{
- return omap_xhci_board_usb_init(index, init);
-}
-
-__weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
-{
- disable_usb_clocks(index);
- return 0;
-}
-
-int board_usb_cleanup(int index, enum usb_init_type init)
-{
- return omap_xhci_board_usb_cleanup(index, init);
-}
-
static int omap_xhci_core_init(struct omap_xhci *omap)
{
int ret = 0;
diff --git a/env/eeprom.c b/env/eeprom.c
index 55d19d9d99..63842d6ff3 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -61,7 +61,10 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset,
return rcode;
}
-static int env_eeprom_get_char(int index)
+/** Call this function from overridden env_get_char_spec() if you need
+ * this functionality.
+ */
+int env_eeprom_get_char(int index)
{
uchar c;
unsigned int off = CONFIG_ENV_OFFSET;
@@ -228,7 +231,6 @@ static int env_eeprom_save(void)
U_BOOT_ENV_LOCATION(eeprom) = {
.location = ENVL_EEPROM,
ENV_NAME("EEPROM")
- .get_char = env_eeprom_get_char,
.load = env_eeprom_load,
.save = env_save_ptr(env_eeprom_save),
};
diff --git a/env/env.c b/env/env.c
index 9a89832c1a..3795dbc24e 100644
--- a/env/env.c
+++ b/env/env.c
@@ -62,8 +62,6 @@ static enum env_location env_locations[] = {
#endif
};
-static enum env_location env_load_location = ENVL_UNKNOWN;
-
static bool env_has_inited(enum env_location location)
{
return gd->env_has_init & BIT(location);
@@ -108,11 +106,11 @@ __weak enum env_location env_get_location(enum env_operation op, int prio)
if (prio >= ARRAY_SIZE(env_locations))
return ENVL_UNKNOWN;
- env_load_location = env_locations[prio];
- return env_load_location;
+ gd->env_load_location = env_locations[prio];
+ return gd->env_load_location;
case ENVOP_SAVE:
- return env_load_location;
+ return gd->env_load_location;
}
return ENVL_UNKNOWN;
@@ -149,32 +147,17 @@ static struct env_driver *env_driver_lookup(enum env_operation op, int prio)
return drv;
}
-int env_get_char(int index)
+__weak int env_get_char_spec(int index)
{
- struct env_driver *drv;
- int prio;
+ return *(uchar *)(gd->env_addr + index);
+}
+int env_get_char(int index)
+{
if (gd->env_valid == ENV_INVALID)
return default_environment[index];
-
- for (prio = 0; (drv = env_driver_lookup(ENVOP_GET_CHAR, prio)); prio++) {
- int ret;
-
- if (!drv->get_char)
- continue;
-
- if (!env_has_inited(drv->location))
- continue;
-
- ret = drv->get_char(index);
- if (!ret)
- return 0;
-
- debug("%s: Environment %s failed to load (err=%d)\n", __func__,
- drv->name, ret);
- }
-
- return -ENODEV;
+ else
+ return env_get_char_spec(index);
}
int env_load(void)
diff --git a/env/nvram.c b/env/nvram.c
index 6f76fe4b8d..7cc62b631e 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -41,7 +41,10 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
#endif
#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
-static int env_nvram_get_char(int index)
+/** Call this function from overridden env_get_char_spec() if you need
+ * this functionality.
+ */
+int env_nvram_get_char(int index)
{
uchar c;
@@ -113,9 +116,6 @@ static int env_nvram_init(void)
U_BOOT_ENV_LOCATION(nvram) = {
.location = ENVL_NVRAM,
ENV_NAME("NVRAM")
-#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
- .get_char = env_nvram_get_char,
-#endif
.load = env_nvram_load,
.save = env_save_ptr(env_nvram_save),
.init = env_nvram_init,
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 1de67e8e8f..c16ad73864 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -51,6 +51,7 @@ typedef struct global_data {
unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Environment valid? enum env_valid */
unsigned long env_has_init; /* Bitmask of boolean of struct env_location offsets */
+ int env_load_location;
unsigned long ram_top; /* Top address of RAM used by U-Boot */
unsigned long relocaddr; /* Start address of U-Boot in RAM */
diff --git a/include/configs/porter.h b/include/configs/porter.h
index b4a317f724..eb28d1afcc 100644
--- a/include/configs/porter.h
+++ b/include/configs/porter.h
@@ -16,12 +16,8 @@
#include "rcar-gen2-common.h"
-#if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
-#define CONFIG_SYS_INIT_SP_ADDR 0x7023FFFC
-#else
-#define CONFIG_SYS_INIT_SP_ADDR 0xE633fffC
-#endif
-#define STACK_AREA_SIZE 0xC000
+#define CONFIG_SYS_INIT_SP_ADDR 0x4f000000
+#define STACK_AREA_SIZE 0x00100000
#define LOW_LEVEL_MERAM_STACK \
(CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
@@ -53,18 +49,15 @@
#define CONFIG_SYS_TMU_CLK_DIV 4
-/* i2c */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SH
-#define CONFIG_SYS_I2C_SLAVE 0x7F
-#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3
-#define CONFIG_SYS_I2C_SH_SPEED0 400000
-#define CONFIG_SYS_I2C_SH_SPEED1 400000
-#define CONFIG_SYS_I2C_SH_SPEED2 400000
-#define CONFIG_SH_I2C_DATA_HIGH 4
-#define CONFIG_SH_I2C_DATA_LOW 5
-#define CONFIG_SH_I2C_CLOCK 10000000
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "initrd_high=0xffffffff\0"
-#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
+/* SPL support */
+#define CONFIG_SPL_TEXT_BASE 0xe6304000
+#define CONFIG_SPL_STACK 0xe6340000
+#define CONFIG_SPL_MAX_SIZE 0x40000
+#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x140000
#endif /* __PORTER_H */
diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h
index ad436fd8b1..e47b02fcc9 100644
--- a/include/configs/rcar-gen2-common.h
+++ b/include/configs/rcar-gen2-common.h
@@ -26,7 +26,7 @@
#endif
/* console */
-
+#define CONFIG_AUTO_COMPLETE
#define CONFIG_SYS_LONGHELP
#define CONFIG_SYS_PBSIZE 256
#define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 }
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index a16d26be99..226069d67c 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -16,6 +16,7 @@
/* boot option */
#define CONFIG_SUPPORT_RAW_INITRD
+#define CONFIG_AUTO_COMPLETE
#define CONFIG_CMDLINE_TAG
#define CONFIG_SETUP_MEMORY_TAGS
diff --git a/include/configs/socfpga_arria10_socdk.h b/include/configs/socfpga_arria10_socdk.h
index 83718dd2c9..82bb48b277 100644
--- a/include/configs/socfpga_arria10_socdk.h
+++ b/include/configs/socfpga_arria10_socdk.h
@@ -9,8 +9,6 @@
#include <asm/arch/base_addr_a10.h>
-#define CONFIG_HW_WATCHDOG
-
/* Booting Linux */
#define CONFIG_LOADADDR 0x01000000
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
index 6b6d54b97b..cd5aac65e9 100644
--- a/include/configs/socfpga_arria5_socdk.h
+++ b/include/configs/socfpga_arria5_socdk.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCDK */
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h
index 018a0c3bb4..9c5bd648e3 100644
--- a/include/configs/socfpga_cyclone5_socdk.h
+++ b/include/configs/socfpga_cyclone5_socdk.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCDK */
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 275ed7ffeb..e5db00e366 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
diff --git a/include/configs/socfpga_de10_nano.h b/include/configs/socfpga_de10_nano.h
index bb50fcf1ff..656af1104d 100644
--- a/include/configs/socfpga_de10_nano.h
+++ b/include/configs/socfpga_de10_nano.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
diff --git a/include/configs/socfpga_de1_soc.h b/include/configs/socfpga_de1_soc.h
index 05975c9bde..f57b950425 100644
--- a/include/configs/socfpga_de1_soc.h
+++ b/include/configs/socfpga_de1_soc.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB */
diff --git a/include/configs/socfpga_is1.h b/include/configs/socfpga_is1.h
index 883ffb76f3..f2c3f40554 100644
--- a/include/configs/socfpga_is1.h
+++ b/include/configs/socfpga_is1.h
@@ -9,8 +9,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x10000000
diff --git a/include/configs/socfpga_mcvevk.h b/include/configs/socfpga_mcvevk.h
index 404f064e94..f13463b8b0 100644
--- a/include/configs/socfpga_mcvevk.h
+++ b/include/configs/socfpga_mcvevk.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on MCV */
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h
index b4f31c42c5..0bbc7e0105 100644
--- a/include/configs/socfpga_sockit.h
+++ b/include/configs/socfpga_sockit.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCDK */
diff --git a/include/configs/socfpga_socrates.h b/include/configs/socfpga_socrates.h
index ebb9ac588d..b66108d0cc 100644
--- a/include/configs/socfpga_socrates.h
+++ b/include/configs/socfpga_socrates.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SoCrates */
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h
index 8c9069c923..8879817b30 100644
--- a/include/configs/socfpga_sr1500.h
+++ b/include/configs/socfpga_sr1500.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on SR1500 */
diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h
index 0c76a77525..1197b40b58 100644
--- a/include/configs/socfpga_vining_fpga.h
+++ b/include/configs/socfpga_vining_fpga.h
@@ -8,8 +8,6 @@
#include <asm/arch/base_addr_ac5.h>
-#define CONFIG_HW_WATCHDOG
-
/* Memory configurations */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* 1GiB on VINING_FPGA */
diff --git a/include/environment.h b/include/environment.h
index 6044b9e1b4..7986a24277 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -188,6 +188,7 @@ enum env_valid {
};
enum env_location {
+ ENVL_UNKNOWN,
ENVL_EEPROM,
ENVL_EXT4,
ENVL_FAT,
@@ -202,7 +203,6 @@ enum env_location {
ENVL_NOWHERE,
ENVL_COUNT,
- ENVL_UNKNOWN,
};
/* value for the various operations we want to perform on the env */
@@ -218,17 +218,6 @@ struct env_driver {
enum env_location location;
/**
- * get_char() - Read a character from the environment
- *
- * This method is optional. If not provided, a default implementation
- * will read from gd->env_addr.
- *
- * @index: Index of character to read (0=first)
- * @return character read, or -ve on error
- */
- int (*get_char)(int index);
-
- /**
* load() - Load the environment from storage
*
* This method is optional. If not provided, no environment will be