From 6403d385b6dfe8de0485f119c20edaba2c460ab0 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 16 May 2019 13:04:02 +0300 Subject: arm: mvebu: clearfog: set U-Boot offset for SATA boot See the offset of U-Boot in raw SATA disk to the same value as the MMC offset. That is 0x140 sectors from the beginning of the SPL, which is 0x141 sectors from the beginning of the device (after the MBR sector). Signed-off-by: Baruch Siach Reviewed-by: Chris Packham Signed-off-by: Stefan Roese --- include/configs/clearfog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 4198ff05117..15c402b542e 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -85,7 +85,7 @@ /* SPL related SPI defines */ #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS -#elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) +#elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA) /* SPL related MMC defines */ #define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS -- cgit v1.3.1 From 1b355e53fcfd2f05ab17f77851feb82bdf9e6b5a Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Fri, 24 May 2019 14:57:48 +0200 Subject: arm: mvebu: turris_omnia: set default ethernet adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set default value for the ethact variable to the WAN port. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- include/configs/turris_omnia.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 018f54428bc..290828d73e1 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -122,6 +122,7 @@ LOAD_ADDRESS_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ "console=ttyS0,115200\0" \ + "ethact=ethernet@34000\0" \ BOOTENV #endif /* CONFIG_SPL_BUILD */ -- cgit v1.3.1 From 305a82217de391bbadce1dc5faac508daa11beaa Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Fri, 24 May 2019 14:57:50 +0200 Subject: arm: mvebu: turris_omnia: change environment address in SPI flash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The U-Boot partition is 1 MiB and environment is 64 KiB. It does not make sense to have environment at 0xc0000 when it could be at 0xf0000 and we can have more space for U-Boot binary. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- include/configs/turris_omnia.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 290828d73e1..8e3d5cc8cf3 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -22,9 +22,9 @@ #define CONFIG_EHCI_IS_TDI /* Environment in SPI NOR flash */ -#define CONFIG_ENV_OFFSET (3*(1 << 18)) /* 768KiB in */ #define CONFIG_ENV_SIZE (64 << 10) /* 64KiB */ -#define CONFIG_ENV_SECT_SIZE (256 << 10) /* 256KiB sectors */ +#define CONFIG_ENV_OFFSET ((1 << 20) - CONFIG_ENV_SIZE) +#define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64KiB */ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ -- cgit v1.3.1 From 422237ee5953927ba54946448d7f525a301dbec1 Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Fri, 24 May 2019 14:57:51 +0200 Subject: arm: mvebu: turris_omnia: remove unneeded macro from board config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not needed here since Omnia is using DM_PCI now. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- include/configs/turris_omnia.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 8e3d5cc8cf3..26f85466a47 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -28,11 +28,6 @@ #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ -/* PCIe support */ -#ifndef CONFIG_SPL_BUILD -#define CONFIG_PCI_SCAN_SHOW -#endif - /* Keep device tree and initrd in lower memory so the kernel can access them */ #define RELOCATION_LIMITS_ENV_SETTINGS \ "fdt_high=0x10000000\0" \ -- cgit v1.3.1 From 27e3d4846d8f5b81091365427279f95dec83b79e Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Fri, 24 May 2019 14:57:52 +0200 Subject: arm: mvebu: turris_omnia: prefer SCSI booting before USB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If SCSI and USB boot options are both available, try to boot from SCSI first. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- include/configs/turris_omnia.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 26f85466a47..edd776ec706 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -92,8 +92,8 @@ #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_DEVICES_MMC(func) \ - BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ + BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -- cgit v1.3.1 From 7945436f888ecd3ba9f6efbc13be04b1bbaceabf Mon Sep 17 00:00:00 2001 From: Luka Kovacic Date: Tue, 25 Jun 2019 13:57:53 +0200 Subject: arm: mvebu: crs305-1g-4s: Enable CMD_BOOTZ and increase SYS_BOOTM_LEN This change enables CMD_BOOTZ and increases SYS_BOOTM_LEN to make it easier to work with kernel images. Signed-off-by: Luka Kovacic Reviewed-by: Stefan Roese Signed-off-by: Stefan Roese --- configs/crs305-1g-4s_defconfig | 1 + include/configs/crs305-1g-4s.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig index 26e1c91f29c..df77cb89ca7 100644 --- a/configs/crs305-1g-4s_defconfig +++ b/configs/crs305-1g-4s_defconfig @@ -7,6 +7,7 @@ CONFIG_BUILD_TARGET="u-boot.kwb" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_BOOTZ=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_I2C=y CONFIG_CMD_SF=y diff --git a/include/configs/crs305-1g-4s.h b/include/configs/crs305-1g-4s.h index c73cb99b1b6..a2df69adc77 100644 --- a/include/configs/crs305-1g-4s.h +++ b/include/configs/crs305-1g-4s.h @@ -10,6 +10,7 @@ * High Level Configuration Options (easy to change) */ +#define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024) /* 64 MB */ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg #define CONFIG_SYS_TCLK 200000000 /* 200MHz */ -- cgit v1.3.1 From fd9d70d7383d7f3afa54af4308c78ce1c99dbddb Mon Sep 17 00:00:00 2001 From: Pascal Linder Date: Tue, 18 Jun 2019 08:44:02 +0200 Subject: km/spi: remove deprecated SPI flash driver code for KM Kirkwood boards KM Kirkwood boards now implement the driver model for its SPI flash interface. Therefore, the old board specific claim and release functions can be deleted. The preprocessor definition CONFIG_SYS_KW_SPI_MPP is yet unused as well. All its appearances and dependencies are removed in the kirkwood_spi driver, header files and finally the configuration whitelist. Signed-off-by: Pascal Linder Signed-off-by: Holger Brunck Signed-off-by: Stefan Roese --- arch/arm/include/asm/arch-mvebu/spi.h | 11 ----------- board/keymile/km_arm/km_arm.c | 12 ------------ drivers/spi/kirkwood_spi.c | 36 ----------------------------------- include/configs/km/km_arm.h | 5 ----- scripts/config_whitelist.txt | 1 - 5 files changed, 65 deletions(-) (limited to 'include') diff --git a/arch/arm/include/asm/arch-mvebu/spi.h b/arch/arm/include/asm/arch-mvebu/spi.h index d6f6d1ac574..58b6c32c4d8 100644 --- a/arch/arm/include/asm/arch-mvebu/spi.h +++ b/arch/arm/include/asm/arch-mvebu/spi.h @@ -23,17 +23,6 @@ struct kwspi_registers { u32 dw_cfg; /* 0x10620 - Direct Write Configuration */ }; -/* They are used to define CONFIG_SYS_KW_SPI_MPP - * each of the below #defines selects which mpp is - * configured for each SPI signal in spi_claim_bus - * bit 0: selects pin for MOSI (MPP1 if 0, MPP6 if 1) - * bit 1: selects pin for SCK (MPP2 if 0, MPP10 if 1) - * bit 2: selects pin for MISO (MPP3 if 0, MPP11 if 1) - */ -#define MOSI_MPP6 (1 << 0) -#define SCK_MPP10 (1 << 1) -#define MISO_MPP11 (1 << 2) - /* Control Register */ #define KWSPI_CSN_ACT (1 << 0) /* Activates serial memory interface */ #define KWSPI_SMEMRDY (1 << 1) /* SerMem Data xfer ready */ diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 7087cc520fd..3db80615ef6 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -310,18 +310,6 @@ int board_late_init(void) return 0; } -int board_spi_claim_bus(struct spi_slave *slave) -{ - kw_gpio_set_value(KM_FLASH_GPIO_PIN, 0); - - return 0; -} - -void board_spi_release_bus(struct spi_slave *slave) -{ - kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1); -} - static const u32 spi_mpp_config[] = { MPP1_SPI_MOSI, MPP2_SPI_SCK, diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index 881a7750031..c725625146d 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -151,10 +151,6 @@ void spi_free_slave(struct spi_slave *slave) free(slave); } -#if defined(CONFIG_SYS_KW_SPI_MPP) -u32 spi_mpp_backup[4]; -#endif - __attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave) { return 0; @@ -162,34 +158,6 @@ __attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave) int spi_claim_bus(struct spi_slave *slave) { -#if defined(CONFIG_SYS_KW_SPI_MPP) - u32 config; - u32 spi_mpp_config[4]; - - config = CONFIG_SYS_KW_SPI_MPP; - - if (config & MOSI_MPP6) - spi_mpp_config[0] = MPP6_SPI_MOSI; - else - spi_mpp_config[0] = MPP1_SPI_MOSI; - - if (config & SCK_MPP10) - spi_mpp_config[1] = MPP10_SPI_SCK; - else - spi_mpp_config[1] = MPP2_SPI_SCK; - - if (config & MISO_MPP11) - spi_mpp_config[2] = MPP11_SPI_MISO; - else - spi_mpp_config[2] = MPP3_SPI_MISO; - - spi_mpp_config[3] = 0; - spi_mpp_backup[3] = 0; - - /* set new spi mpp and save current mpp config */ - kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup); -#endif - return board_spi_claim_bus(slave); } @@ -199,10 +167,6 @@ __attribute__((weak)) void board_spi_release_bus(struct spi_slave *slave) void spi_release_bus(struct spi_slave *slave) { -#if defined(CONFIG_SYS_KW_SPI_MPP) - kirkwood_mpp_conf(spi_mpp_backup, NULL); -#endif - board_spi_release_bus(slave); } diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index 8a00ac015ac..a381a984702 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -201,11 +201,6 @@ int get_scl(void); #define CONFIG_SYS_REDUNDAND_ENVIRONMENT - -/* SPI bus claim MPP configuration */ -#define CONFIG_SYS_KW_SPI_MPP 0x0 - -#define FLASH_GPIO_PIN 0x00010000 #define KM_FLASH_GPIO_PIN 16 #define CONFIG_KM_UPDATE_UBOOT \ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 2fc77b77c21..2c9cfb450d0 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -3066,7 +3066,6 @@ CONFIG_SYS_JFFS2_SORT_FRAGMENTS CONFIG_SYS_KMBEC_FPGA_BASE CONFIG_SYS_KMBEC_FPGA_SIZE CONFIG_SYS_KWD_CONFIG -CONFIG_SYS_KW_SPI_MPP CONFIG_SYS_L2 CONFIG_SYS_L2_PL310 CONFIG_SYS_L2_SIZE -- cgit v1.3.1