Merge tag 'u-boot-imx-2019-02-16' of git://git.denx.de/u-boot-imx
u-boot-imx-2019-02-16 --------------------- - vhybrid: add calibration - gw_ventana: fixes - Improve documentation for Secure Boot (HABv4) - Fix Marvell Switch - MX6 Sabre, switch to DM - Fixes for NAND
This commit is contained in:
@@ -804,7 +804,7 @@ static int esdhc_set_voltage(struct mmc *mmc)
|
||||
case MMC_SIGNAL_VOLTAGE_330:
|
||||
if (priv->vs18_enable)
|
||||
return -EIO;
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
if (!IS_ERR_OR_NULL(priv->vqmmc_dev)) {
|
||||
ret = regulator_set_value(priv->vqmmc_dev, 3300000);
|
||||
if (ret) {
|
||||
@@ -823,7 +823,7 @@ static int esdhc_set_voltage(struct mmc *mmc)
|
||||
|
||||
return -EAGAIN;
|
||||
case MMC_SIGNAL_VOLTAGE_180:
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
if (!IS_ERR_OR_NULL(priv->vqmmc_dev)) {
|
||||
ret = regulator_set_value(priv->vqmmc_dev, 1800000);
|
||||
if (ret) {
|
||||
@@ -1442,7 +1442,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
|
||||
int node = dev_of_offset(dev);
|
||||
struct esdhc_soc_data *data =
|
||||
(struct esdhc_soc_data *)dev_get_driver_data(dev);
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
struct udevice *vqmmc_dev;
|
||||
#endif
|
||||
fdt_addr_t addr;
|
||||
@@ -1500,7 +1500,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
|
||||
|
||||
priv->vs18_enable = 0;
|
||||
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
/*
|
||||
* If emmc I/O has a fixed voltage at 1.8V, this must be provided,
|
||||
* otherwise, emmc will work abnormally.
|
||||
|
||||
@@ -1092,7 +1092,7 @@ int mxs_nand_alloc_buffers(struct mxs_nand_info *nand_info)
|
||||
/*
|
||||
* Initializes the NFC hardware.
|
||||
*/
|
||||
int mxs_nand_init_dma(struct mxs_nand_info *info)
|
||||
static int mxs_nand_init_dma(struct mxs_nand_info *info)
|
||||
{
|
||||
int i = 0, j, ret = 0;
|
||||
|
||||
@@ -1163,6 +1163,12 @@ int mxs_nand_init_spl(struct nand_chip *nand)
|
||||
|
||||
nand_info->gpmi_regs = (struct mxs_gpmi_regs *)MXS_GPMI_BASE;
|
||||
nand_info->bch_regs = (struct mxs_bch_regs *)MXS_BCH_BASE;
|
||||
|
||||
if (is_mx6sx() || is_mx7())
|
||||
nand_info->max_ecc_strength_supported = 62;
|
||||
else
|
||||
nand_info->max_ecc_strength_supported = 40;
|
||||
|
||||
err = mxs_nand_alloc_buffers(nand_info);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -1185,9 +1191,6 @@ int mxs_nand_init_spl(struct nand_chip *nand)
|
||||
nand->ecc.read_page = mxs_nand_ecc_read_page;
|
||||
|
||||
nand->ecc.mode = NAND_ECC_HW;
|
||||
nand->ecc.bytes = 9;
|
||||
nand->ecc.size = 512;
|
||||
nand->ecc.strength = 8;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@ static int mxs_nand_init(void)
|
||||
/* setup flash layout (does not scan as we override that) */
|
||||
mtd->size = nand_chip.chipsize;
|
||||
nand_chip.scan_bbt(mtd);
|
||||
mxs_nand_setup_ecc(mtd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1348,7 +1348,7 @@ static int fecmxc_probe(struct udevice *dev)
|
||||
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
if (priv->phy_supply) {
|
||||
ret = regulator_autoset(priv->phy_supply);
|
||||
ret = regulator_set_enable(priv->phy_supply, true);
|
||||
if (ret) {
|
||||
printf("%s: Error enabling phy supply\n", dev->name);
|
||||
return ret;
|
||||
|
||||
@@ -945,16 +945,16 @@ static int mv88e61xx_phy_config(struct phy_device *phydev)
|
||||
continue;
|
||||
}
|
||||
|
||||
res = genphy_config_aneg(phydev);
|
||||
if (res < 0) {
|
||||
printf("Error setting PHY %i autoneg\n", i);
|
||||
continue;
|
||||
}
|
||||
res = phy_reset(phydev);
|
||||
if (res < 0) {
|
||||
printf("Error resetting PHY %i\n", i);
|
||||
continue;
|
||||
}
|
||||
res = genphy_config_aneg(phydev);
|
||||
if (res < 0) {
|
||||
printf("Error setting PHY %i autoneg\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Return success if any PHY succeeds */
|
||||
ret = 0;
|
||||
|
||||
@@ -138,13 +138,18 @@ struct mxc_uart {
|
||||
u32 ts;
|
||||
};
|
||||
|
||||
static void _mxc_serial_init(struct mxc_uart *base)
|
||||
static void _mxc_serial_init(struct mxc_uart *base, int use_dte)
|
||||
{
|
||||
writel(0, &base->cr1);
|
||||
writel(0, &base->cr2);
|
||||
|
||||
while (!(readl(&base->cr2) & UCR2_SRST));
|
||||
|
||||
if (use_dte)
|
||||
writel(0x404 | UCR3_ADNIMP, &base->cr3);
|
||||
else
|
||||
writel(0x704 | UCR3_ADNIMP, &base->cr3);
|
||||
|
||||
writel(0x704 | UCR3_ADNIMP, &base->cr3);
|
||||
writel(0x8000, &base->cr4);
|
||||
writel(0x2b, &base->esc);
|
||||
@@ -226,7 +231,7 @@ static int mxc_serial_tstc(void)
|
||||
*/
|
||||
static int mxc_serial_init(void)
|
||||
{
|
||||
_mxc_serial_init(mxc_base);
|
||||
_mxc_serial_init(mxc_base, false);
|
||||
|
||||
serial_setbrg();
|
||||
|
||||
@@ -271,7 +276,7 @@ static int mxc_serial_probe(struct udevice *dev)
|
||||
{
|
||||
struct mxc_serial_platdata *plat = dev->platdata;
|
||||
|
||||
_mxc_serial_init(plat->reg);
|
||||
_mxc_serial_init(plat->reg, plat->use_dte);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -367,7 +372,7 @@ static inline void _debug_uart_init(void)
|
||||
{
|
||||
struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE;
|
||||
|
||||
_mxc_serial_init(base);
|
||||
_mxc_serial_init(base, false);
|
||||
_mxc_serial_setbrg(base, CONFIG_DEBUG_UART_CLOCK,
|
||||
CONFIG_BAUDRATE, false);
|
||||
}
|
||||
|
||||
@@ -404,6 +404,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
if (priv->vbus_supply) {
|
||||
ret = regulator_set_enable(priv->vbus_supply,
|
||||
(type == USB_INIT_DEVICE) ?
|
||||
@@ -413,6 +414,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (type == USB_INIT_DEVICE)
|
||||
return 0;
|
||||
@@ -514,15 +516,17 @@ static int ehci_usb_probe(struct udevice *dev)
|
||||
priv->portnr = dev->seq;
|
||||
priv->init_type = type;
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
ret = device_get_supply_regulator(dev, "vbus-supply",
|
||||
&priv->vbus_supply);
|
||||
if (ret)
|
||||
debug("%s: No vbus supply\n", dev->name);
|
||||
|
||||
#endif
|
||||
ret = ehci_mx6_common_init(ehci, priv->portnr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
if (priv->vbus_supply) {
|
||||
ret = regulator_set_enable(priv->vbus_supply,
|
||||
(type == USB_INIT_DEVICE) ?
|
||||
@@ -532,6 +536,7 @@ static int ehci_usb_probe(struct udevice *dev)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (priv->init_type == USB_INIT_HOST) {
|
||||
setbits_le32(&ehci->usbmode, CM_HOST);
|
||||
|
||||
Reference in New Issue
Block a user