mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
- Turris_omnia/mox: SPI NOR and MTD related changes / fixes (Marek) - a37xx: pci: Misc fixes / optimizations (Pali) - Espressobin: Fix setting $fdtfile env & changes in MMC detection (Pali) - MMC: mmc_get_op_cond: Allow quiet detection of eMMC (Pali)
This commit is contained in:
commit
18e7ebf755
12 changed files with 28 additions and 22 deletions
|
@ -331,6 +331,10 @@ int a3700_fdt_fix_pcie_regions(void *blob)
|
|||
/* Calculate fixup offset from first child address (in last cell) */
|
||||
fix_offset = base - fdt32_to_cpu(ranges[2]);
|
||||
|
||||
/* If fixup offset is zero then there is nothing to fix */
|
||||
if (!fix_offset)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Fix address (last cell) of each child address and each parent
|
||||
* address
|
||||
|
|
|
@ -124,7 +124,7 @@ int board_late_init(void)
|
|||
|
||||
/* eMMC is mmc dev num 1 */
|
||||
mmc_dev = find_mmc_device(1);
|
||||
emmc = (mmc_dev && mmc_init(mmc_dev) == 0);
|
||||
emmc = (mmc_dev && mmc_get_op_cond(mmc_dev, true) == 0);
|
||||
|
||||
/* if eMMC is not present then remove it from DM */
|
||||
if (!emmc && mmc_dev) {
|
||||
|
@ -133,9 +133,6 @@ int board_late_init(void)
|
|||
device_unbind(dev);
|
||||
}
|
||||
|
||||
if (env_get("fdtfile"))
|
||||
return 0;
|
||||
|
||||
/* Ensure that 'env default -a' set correct value to $fdtfile */
|
||||
if (ddr4 && emmc)
|
||||
strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin-v7-emmc.dtb");
|
||||
|
@ -146,10 +143,6 @@ int board_late_init(void)
|
|||
else
|
||||
strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin.dtb");
|
||||
|
||||
/* If $fdtfile was not set explicitly by user then set default value */
|
||||
if (!env_get("fdtfile"))
|
||||
env_set("fdtfile", ptr + sizeof("fdtfile="));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -374,7 +374,7 @@ static bool has_emmc(void)
|
|||
mmc = find_mmc_device(2);
|
||||
if (!mmc)
|
||||
return 0;
|
||||
return (mmc_get_op_cond(mmc) < 0) ? 0 : 1;
|
||||
return (mmc_get_op_cond(mmc, true) < 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
int checkboard(void)
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000
|
|||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="armada-3720-db"
|
||||
CONFIG_DEBUG_UART_BASE=0xd0012000
|
||||
CONFIG_DEBUG_UART_CLOCK=25804800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000
|
|||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="armada-3720-espressobin"
|
||||
CONFIG_DEBUG_UART_BASE=0xd0012000
|
||||
CONFIG_DEBUG_UART_CLOCK=25804800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
|
|
|
@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000
|
|||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="armada-3720-turris-mox"
|
||||
CONFIG_DEBUG_UART_BASE=0xd0012000
|
||||
CONFIG_DEBUG_UART_CLOCK=25804800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_OF_BOARD_FIXUP=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
|
@ -31,6 +30,7 @@ CONFIG_CMD_CLK=y
|
|||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_MTD=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_USB=y
|
||||
|
@ -60,12 +60,14 @@ CONFIG_MMC_SDHCI=y
|
|||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_XENON=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_SF_DEFAULT_MODE=0
|
||||
CONFIG_SF_DEFAULT_SPEED=20000000
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_SPANSION=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
CONFIG_PHY_MARVELL=y
|
||||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
|
|
|
@ -41,6 +41,7 @@ CONFIG_CMD_LZMADEC=y
|
|||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_MTD=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_SATA=y
|
||||
CONFIG_CMD_SPI=y
|
||||
|
@ -56,7 +57,7 @@ CONFIG_CMD_FS_UUID=y
|
|||
# CONFIG_SPL_PARTITION_UUIDS is not set
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_USE_ENV_SPI_MAX_HZ=y
|
||||
CONFIG_ENV_SPI_MAX_HZ=50000000
|
||||
CONFIG_ENV_SPI_MAX_HZ=40000000
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_SPL_OF_TRANSLATE=y
|
||||
CONFIG_AHCI_PCI=y
|
||||
|
@ -65,8 +66,13 @@ CONFIG_AHCI_MVEBU=y
|
|||
CONFIG_DM_PCA953X=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_MV=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
CONFIG_SPI_FLASH_SPANSION=y
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
CONFIG_SF_DEFAULT_MODE=0x0
|
||||
CONFIG_SF_DEFAULT_SPEED=40000000
|
||||
CONFIG_PHY_MARVELL=y
|
||||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
|
|
|
@ -10,7 +10,6 @@ CONFIG_ENV_SECT_SIZE=0x10000
|
|||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="armada-3720-uDPU"
|
||||
CONFIG_DEBUG_UART_BASE=0xd0012000
|
||||
CONFIG_DEBUG_UART_CLOCK=25804800
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
|
|
|
@ -2766,7 +2766,7 @@ static int mmc_power_cycle(struct mmc *mmc)
|
|||
return mmc_power_on(mmc);
|
||||
}
|
||||
|
||||
int mmc_get_op_cond(struct mmc *mmc)
|
||||
int mmc_get_op_cond(struct mmc *mmc, bool quiet)
|
||||
{
|
||||
bool uhs_en = supports_uhs(mmc->cfg->host_caps);
|
||||
int err;
|
||||
|
@ -2842,6 +2842,7 @@ retry:
|
|||
|
||||
if (err) {
|
||||
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
|
||||
if (!quiet)
|
||||
pr_err("Card did not respond to voltage select! : %d\n", err);
|
||||
#endif
|
||||
return -EOPNOTSUPP;
|
||||
|
@ -2882,7 +2883,7 @@ int mmc_start_init(struct mmc *mmc)
|
|||
return -ENOMEDIUM;
|
||||
}
|
||||
|
||||
err = mmc_get_op_cond(mmc);
|
||||
err = mmc_get_op_cond(mmc, false);
|
||||
|
||||
if (!err)
|
||||
mmc->init_in_progress = 1;
|
||||
|
|
|
@ -605,25 +605,26 @@ static void pcie_advk_set_ob_region(struct pcie_advk *pcie, int *wins,
|
|||
|
||||
/*
|
||||
* The n-th PCIe window is configured by tuple (match, remap, mask)
|
||||
* and an access to address A uses this window it if A matches the
|
||||
* and an access to address A uses this window if A matches the
|
||||
* match with given mask.
|
||||
* So every PCIe window size must be a power of two and every start
|
||||
* address must be aligned to window size. Minimal size is 64 KiB
|
||||
* because lower 16 bits of mask must be zero.
|
||||
* because lower 16 bits of mask must be zero. Remapped address
|
||||
* may have set only bits from the mask.
|
||||
*/
|
||||
while (*wins < OB_WIN_COUNT && size > 0) {
|
||||
/* Calculate the largest aligned window size */
|
||||
win_size = (1ULL << (fls64(size) - 1)) |
|
||||
(phys_start ? (1ULL << __ffs64(phys_start)) : 0);
|
||||
win_size = 1ULL << __ffs64(win_size);
|
||||
if (win_size < 0x10000)
|
||||
win_mask = ~(win_size - 1);
|
||||
if (win_size < 0x10000 || (bus_start & ~win_mask))
|
||||
break;
|
||||
|
||||
dev_dbg(pcie->dev,
|
||||
"Configuring PCIe window %d: [0x%llx-0x%llx] as 0x%x\n",
|
||||
*wins, (u64)phys_start, (u64)phys_start + win_size,
|
||||
actions);
|
||||
win_mask = ~(win_size - 1) & ~0xffff;
|
||||
pcie_advk_set_ob_win(pcie, *wins, phys_start, bus_start,
|
||||
win_mask, actions);
|
||||
|
||||
|
|
|
@ -443,6 +443,7 @@ config DEBUG_UART_CLOCK
|
|||
int "UART input clock"
|
||||
depends on DEBUG_UART
|
||||
default 0 if DEBUG_UART_SANDBOX
|
||||
default 0 if DEBUG_MVEBU_A3700_UART
|
||||
help
|
||||
The UART input clock determines the speed of the internal UART
|
||||
circuitry. The baud rate is derived from this by dividing the input
|
||||
|
|
|
@ -900,9 +900,10 @@ int mmc_set_bkops_enable(struct mmc *mmc);
|
|||
* the presence of SD/eMMC when no card detect logic is available.
|
||||
*
|
||||
* @param mmc Pointer to a MMC device struct
|
||||
* @param quiet Be quiet, do not print error messages when card is not detected.
|
||||
* @return 0 on success, <0 on error.
|
||||
*/
|
||||
int mmc_get_op_cond(struct mmc *mmc);
|
||||
int mmc_get_op_cond(struct mmc *mmc, bool quiet);
|
||||
|
||||
/**
|
||||
* Start device initialization and return immediately; it does not block on
|
||||
|
|
Loading…
Reference in a new issue