- SPL SATA enhancements to allow booting from RAW SATA device
  needed for Clearfog (Baruch)
- Enable SATA booting on Clearfog (Baruch)
- Misc changes to Turris Omnia (Marek)
- Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s
  (Luka)
- Enable FIT support for db-xc3-24g4xg (Chris)
- Enable DM_SPI on Keymile Kirkwood board with necessary changes
  for this (Pascal)
- Set 38x and 39x AVS on lower frequency (Baruch)
This commit is contained in:
Tom Rini 2019-07-11 18:09:38 -04:00
commit 68deea2308
31 changed files with 281 additions and 119 deletions

View File

@ -11,3 +11,11 @@
&sdhci {
u-boot,dm-spl;
};
&ahci0 {
u-boot,dm-spl;
};
&ahci1 {
u-boot,dm-spl;
};

View File

@ -13,6 +13,10 @@
device_type = "memory";
reg = <0x00000000 0x08000000>;
};
aliases {
spi0 = &spi0;
};
};
&mdio {
@ -29,3 +33,21 @@
phy-handle = <&ethphy0>;
};
};
&spi0 {
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "st,m25p80", "jedec,spi-nor", "spi-flash";
reg = <0>;
spi-max-frequency = <33000000>;
mode = <3>;
partition@uboot {
reg = <0x000000 0x0c0000>;
label = "uboot";
};
};
};

View File

@ -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 */

View File

@ -32,11 +32,8 @@ config TARGET_ICONNECT
bool "iconnect Board"
config TARGET_KM_KIRKWOOD
bool "KM_KIRKWOOD Board"
select BOARD_LATE_INIT
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
bool "KM Kirkwood Board"
select VENDOR_KM
config TARGET_NET2BIG_V2
bool "LaCie 2Big Network v2 NAS Board"
@ -82,7 +79,7 @@ source "board/buffalo/lsxl/Kconfig"
source "board/cloudengines/pogo_e02/Kconfig"
source "board/d-link/dns325/Kconfig"
source "board/iomega/iconnect/Kconfig"
source "board/keymile/km_arm/Kconfig"
source "board/keymile/Kconfig"
source "board/LaCie/net2big_v2/Kconfig"
source "board/LaCie/netspace_v2/Kconfig"
source "board/raidsonic/ib62x0/Kconfig"

View File

@ -239,6 +239,11 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
bool "SDIO/MMC card"
select SPL_LIBDISK_SUPPORT
config MVEBU_SPL_BOOT_DEVICE_SATA
bool "SATA"
select SPL_SATA_SUPPORT
select SPL_LIBDISK_SUPPORT
config MVEBU_SPL_BOOT_DEVICE_UART
bool "UART"

View File

@ -37,6 +37,9 @@ endif
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
KWB_CFG_BOOT_FROM=sdio
endif
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA),)
KWB_CFG_BOOT_FROM=sata
endif
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
KWB_CFG_BOOT_FROM=uart
endif

View File

@ -542,6 +542,10 @@ static void ahci_mvebu_mbus_config(void __iomem *base)
const struct mbus_dram_target_info *dram;
int i;
/* mbus is not initialized in SPL; keep the ROM settings */
if (IS_ENABLED(CONFIG_SPL_BUILD))
return;
dram = mvebu_mbus_dram_info();
for (i = 0; i < 4; i++) {

View File

@ -163,6 +163,13 @@ int serdes_phy_config(void);
*/
int ddr3_init(void);
/* Auto Voltage Scaling */
#if defined(CONFIG_ARMADA_38X) || defined(CONFIG_ARMADA_39X)
void mv_avs_init(void);
#else
static inline void mv_avs_init(void) {}
#endif
/*
* get_ref_clk
*

View File

@ -159,7 +159,9 @@
#define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS)
#define BOOT_FROM_NAND 0x0A
#define BOOT_FROM_SATA 0x22
#define BOOT_FROM_UART 0x28
#define BOOT_FROM_SATA_ALT 0x2A
#define BOOT_FROM_UART_ALT 0x3f
#define BOOT_FROM_SPI 0x32
#define BOOT_FROM_MMC 0x30

View File

@ -256,3 +256,29 @@ u8 sys_env_device_rev_get(void)
value = reg_read(DEV_VERSION_ID_REG);
return (value & (REVISON_ID_MASK)) >> REVISON_ID_OFFS;
}
void mv_avs_init(void)
{
u32 sar_freq;
if (!(IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARMADA_39X)))
return;
reg_write(AVS_DEBUG_CNTR_REG, AVS_DEBUG_CNTR_DEFAULT_VALUE);
reg_write(AVS_DEBUG_CNTR_REG, AVS_DEBUG_CNTR_DEFAULT_VALUE);
sar_freq = reg_read(DEVICE_SAMPLE_AT_RESET1_REG);
sar_freq = sar_freq >> SAR_FREQ_OFFSET & SAR_FREQ_MASK;
/* Set AVS value only for core frequency of 1600MHz or less.
* For higher frequency leave the default value.
*/
if (sar_freq <= 0xd) {
u32 avs_reg_data = reg_read(AVS_ENABLED_CONTROL);
avs_reg_data &= ~(AVS_LOW_VDD_LIMIT_MASK
| AVS_HIGH_VDD_LIMIT_MASK);
avs_reg_data |= AVS_LOW_VDD_SLOW_VAL | AVS_HIGH_VDD_SLOW_VAL;
reg_write(AVS_ENABLED_CONTROL, avs_reg_data);
}
}

View File

@ -33,6 +33,8 @@
#define DEV_ID_REG_DEVICE_ID_OFFS 16
#define DEV_ID_REG_DEVICE_ID_MASK 0xffff0000
#define SAR_FREQ_OFFSET 10
#define SAR_FREQ_MASK 0x1f
#define SAR_DEV_ID_OFFS 27
#define SAR_DEV_ID_MASK 0x7
@ -155,10 +157,12 @@
#define AVS_LOW_VDD_LIMIT_OFFS 4
#define AVS_LOW_VDD_LIMIT_MASK (0xff << AVS_LOW_VDD_LIMIT_OFFS)
#define AVS_LOW_VDD_LIMIT_VAL (0x27 << AVS_LOW_VDD_LIMIT_OFFS)
#define AVS_LOW_VDD_SLOW_VAL (0x23 << AVS_LOW_VDD_LIMIT_OFFS)
#define AVS_HIGH_VDD_LIMIT_OFFS 12
#define AVS_HIGH_VDD_LIMIT_MASK (0xff << AVS_HIGH_VDD_LIMIT_OFFS)
#define AVS_HIGH_VDD_LIMIT_VAL (0x27 << AVS_HIGH_VDD_LIMIT_OFFS)
#define AVS_HIGH_VDD_SLOW_VAL (0x23 << AVS_HIGH_VDD_LIMIT_OFFS)
/* Board ID numbers */
#define MARVELL_BOARD_ID_MASK 0x10

View File

@ -59,6 +59,11 @@ static u32 get_boot_device(void)
case BOOT_FROM_UART_ALT:
#endif
return BOOT_DEVICE_UART;
#ifdef BOOT_FROM_SATA
case BOOT_FROM_SATA:
case BOOT_FROM_SATA_ALT:
return BOOT_DEVICE_SATA;
#endif
case BOOT_FROM_SPI:
default:
return BOOT_DEVICE_SPI;
@ -121,6 +126,9 @@ void board_init_f(ulong dummy)
ddr3_init();
#endif
/* Initialize Auto Voltage Scaling */
mv_avs_init();
/*
* Return to the BootROM to continue the Marvell xmodem
* UART boot protocol. As initiated by the kwboot tool.

View File

@ -100,65 +100,43 @@ config TARGET_IDS8313
config TARGET_KMETER1
bool "Support kmeter1"
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMCOGE5NE
bool "Support kmcoge5ne"
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
select VENDOR_KM
config TARGET_SUVD3
bool "Support suvd3"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMVECT1
bool "Support kmvect1"
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMTEGR1
bool "Support kmtegr1"
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_TUXX1
bool "Support tuxx1"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMSUPX5
bool "Support kmsupx5"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_TUGE1
bool "Support tuge1"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMOPTI2
bool "Support kmopti2"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_KMTEPR2
bool "Support kmtepr2"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_TQM834X
bool "Support TQM834x"
@ -354,7 +332,7 @@ source "board/freescale/mpc8349itx/Kconfig"
source "board/freescale/mpc837xemds/Kconfig"
source "board/freescale/mpc837xerdb/Kconfig"
source "board/ids/ids8313/Kconfig"
source "board/keymile/km83xx/Kconfig"
source "board/keymile/Kconfig"
source "board/mpc8308_p1m/Kconfig"
source "board/sbc8349/Kconfig"
source "board/tqc/tqm834x/Kconfig"

View File

@ -412,11 +412,7 @@ config TARGET_CONTROLCENTERD
config TARGET_KMP204X
bool "Support kmp204x"
select ARCH_P2041
select PHYS_64BIT
select FSL_DDR_INTERACTIVE
imply CMD_CRAMFS
imply FS_CRAMFS
select VENDOR_KM
config TARGET_XPEDITE520X
bool "Support xpedite520x"
@ -1620,7 +1616,7 @@ source "board/freescale/t208xrdb/Kconfig"
source "board/freescale/t4qds/Kconfig"
source "board/freescale/t4rdb/Kconfig"
source "board/gdsys/p1022/Kconfig"
source "board/keymile/kmp204x/Kconfig"
source "board/keymile/Kconfig"
source "board/sbc8548/Kconfig"
source "board/socrates/Kconfig"
source "board/varisys/cyrus/Kconfig"

View File

@ -340,7 +340,8 @@ static int set_regdomain(void)
"i2c mw 0x2a.1 0x4 0x1c 1; " \
"mw.l 0x01000000 0x00ff000c; " \
"i2c write 0x01000000 0x2a.1 0x5 4 -s; " \
"setenv bootargs \"$bootargs omniarescue=$omnia_reset\"; " \
"setenv bootargs \"earlyprintk console=ttyS0,115200" \
" omniarescue=$omnia_reset\"; " \
"sf probe; " \
"sf read 0x1000000 0x100000 0x700000; " \
"bootm 0x1000000; " \
@ -412,6 +413,7 @@ int board_late_init(void)
set_regdomain();
handle_reset_button();
#endif
pci_init();
return 0;
}
@ -513,11 +515,6 @@ int misc_init_r(void)
mac[4] = mac1[2];
mac[5] = mac1[3];
if (is_valid_ethaddr(mac))
eth_env_set_enetaddr("ethaddr", mac);
increment_mac(mac);
if (is_valid_ethaddr(mac))
eth_env_set_enetaddr("eth1addr", mac);
@ -526,6 +523,11 @@ int misc_init_r(void)
if (is_valid_ethaddr(mac))
eth_env_set_enetaddr("eth2addr", mac);
increment_mac(mac);
if (is_valid_ethaddr(mac))
eth_env_set_enetaddr("ethaddr", mac);
out:
return 0;
}

16
board/keymile/Kconfig Normal file
View File

@ -0,0 +1,16 @@
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2019, Pascal Linder <pascal.linder@edu.hefr.ch>
config VENDOR_KM
bool
help
Selected by any KM board to have additional configurations.
if VENDOR_KM
source "board/keymile/km83xx/Kconfig"
source "board/keymile/kmp204x/Kconfig"
source "board/keymile/km_arm/Kconfig"
endif

View File

@ -9,6 +9,13 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmeter1"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
endif
if TARGET_KMCOGE5NE
@ -22,6 +29,13 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmcoge5ne"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
endif
if TARGET_KMVECT1
@ -35,6 +49,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmvect1"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_KMTEGR1
@ -48,6 +68,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmtegr1"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_SUVD3
@ -61,6 +87,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "suvd3"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_TUXX1
@ -74,6 +106,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "tuxx1"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_KMSUPX5
@ -87,6 +125,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmsupx5"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_TUGE1
@ -100,6 +144,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "tuge1"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_KMOPTI2
@ -113,6 +163,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmopti2"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif
if TARGET_KMTEPR2
@ -126,4 +182,10 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmtepr2"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
endif

View File

@ -9,4 +9,14 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "km_kirkwood"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select BOARD_LATE_INIT
select DM
select DM_SPI
select DM_SPI_FLASH
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
endif

View File

@ -310,16 +310,35 @@ int board_late_init(void)
return 0;
}
int board_spi_claim_bus(struct spi_slave *slave)
static const u32 spi_mpp_config[] = {
MPP1_SPI_MOSI,
MPP2_SPI_SCK,
MPP3_SPI_MISO,
0
};
static u32 spi_mpp_backup[4];
int mvebu_board_spi_claim_bus(struct udevice *dev)
{
spi_mpp_backup[3] = 0;
/* set new spi mpp config and save current one */
kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup);
kw_gpio_set_value(KM_FLASH_GPIO_PIN, 0);
return 0;
}
void board_spi_release_bus(struct spi_slave *slave)
int mvebu_board_spi_release_bus(struct udevice *dev)
{
/* restore saved mpp config */
kirkwood_mpp_conf(spi_mpp_backup, NULL);
kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
return 0;
}
#if (defined(CONFIG_KM_PIGGY4_88E6061))

View File

@ -9,4 +9,12 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "kmp204x"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_P2041
select FSL_DDR_INTERACTIVE
select PHYS_64BIT
imply CMD_CRAMFS
imply FS_CRAMFS
endif

View File

@ -40,6 +40,12 @@ Install U-Boot on eMMC boot partition from Linux running on Clearfog:
Note that the SD card is not accessible when the Clearfog SOM has eMMC.
Consider initial boot from UART (see below).
Install U-Boot on SATA:
-----------------------
When loading the main U-Boot image from raw SATA sector, set
CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR to 0x141.
Boot selection:
---------------

View File

@ -17,13 +17,23 @@
#include <fat.h>
#include <image.h>
#ifndef CONFIG_SYS_SATA_FAT_BOOT_PARTITION
#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
#endif
#ifndef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
#endif
static int spl_sata_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
int err;
int err = 0;
struct blk_desc *stor_dev;
#if !defined(CONFIG_DM_SCSI) && !defined(CONFIG_AHCI)
err = init_sata(CONFIG_SPL_SATA_BOOT_DEVICE);
#endif
if (err) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("spl: sata init failed: err - %d\n", err);
@ -43,9 +53,13 @@ static int spl_sata_load_image(struct spl_image_info *spl_image,
CONFIG_SYS_SATA_FAT_BOOT_PARTITION))
#endif
{
err = spl_load_image_fat(spl_image, stor_dev,
err = -ENOSYS;
if (IS_ENABLED(CONFIG_SPL_FS_FAT)) {
err = spl_load_image_fat(spl_image, stor_dev,
CONFIG_SYS_SATA_FAT_BOOT_PARTITION,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
}
}
if (err) {
puts("Error loading sata device\n");

View File

@ -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

View File

@ -4,6 +4,9 @@ CONFIG_SYS_TEXT_BASE=0x00800000
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_DB_XC3_24G4XG=y
CONFIG_BUILD_TARGET="u-boot.kwb"
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_FIT_BEST_MATCH=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y

View File

@ -28,6 +28,8 @@ CONFIG_MTDIDS_DEFAULT="nand0=orion_nand"
CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:-(ubi0);"
CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="kirkwood-km_kirkwood"
CONFIG_ENV_IS_IN_EEPROM=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_RAM=y
@ -42,4 +44,3 @@ CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y

View File

@ -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);
}
@ -338,6 +302,11 @@ static int mvebu_spi_xfer(struct udevice *dev, unsigned int bitlen,
return _spi_xfer(plat->spireg, bitlen, dout, din, flags);
}
__attribute__((weak)) int mvebu_board_spi_claim_bus(struct udevice *dev)
{
return 0;
}
static int mvebu_spi_claim_bus(struct udevice *dev)
{
struct udevice *bus = dev->parent;
@ -348,9 +317,19 @@ static int mvebu_spi_claim_bus(struct udevice *dev)
KWSPI_CS_MASK << KWSPI_CS_SHIFT,
spi_chip_select(dev) << KWSPI_CS_SHIFT);
return mvebu_board_spi_claim_bus(dev);
}
__attribute__((weak)) int mvebu_board_spi_release_bus(struct udevice *dev)
{
return 0;
}
static int mvebu_spi_release_bus(struct udevice *dev)
{
return mvebu_board_spi_release_bus(dev);
}
static int mvebu_spi_probe(struct udevice *bus)
{
struct mvebu_spi_platdata *plat = dev_get_platdata(bus);
@ -377,6 +356,7 @@ static int mvebu_spi_ofdata_to_platdata(struct udevice *bus)
static const struct dm_spi_ops mvebu_spi_ops = {
.claim_bus = mvebu_spi_claim_bus,
.release_bus = mvebu_spi_release_bus,
.xfer = mvebu_spi_xfer,
.set_speed = mvebu_spi_set_speed,
.set_mode = mvebu_spi_set_mode,

View File

@ -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

View File

@ -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 */

View File

@ -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 \

View File

@ -22,17 +22,12 @@
#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 */
/* 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" \
@ -97,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)
@ -122,6 +117,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 */

View File

@ -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