summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/imx/clk-imx5.c1
-rw-r--r--drivers/hab/hab.c4
-rw-r--r--drivers/mtd/nand/nand_omap_gpmc.c3
-rw-r--r--drivers/mtd/spi-nor/cadence-quadspi.c15
-rw-r--r--drivers/of/partition.c8
5 files changed, 16 insertions, 15 deletions
diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c
index c4c47a6d87..edebd25a38 100644
--- a/drivers/clk/imx/clk-imx5.c
+++ b/drivers/clk/imx/clk-imx5.c
@@ -313,6 +313,7 @@ int __init mx50_clocks_init(struct device_d *dev, void __iomem *regs)
clkdev_add_physbase(clks[IMX5_CLK_ESDHC_D_SEL], MX50_ESDHC4_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX50_PWM1_BASE_ADDR, "per");
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX50_PWM2_BASE_ADDR, "per");
+ clkdev_add_physbase(clks[IMX5_CLK_AHB], MX50_OTG_BASE_ADDR, NULL);
return 0;
}
diff --git a/drivers/hab/hab.c b/drivers/hab/hab.c
index 512ff7ecf2..0d71f5bf26 100644
--- a/drivers/hab/hab.c
+++ b/drivers/hab/hab.c
@@ -209,9 +209,9 @@ static struct imx_hab_ops *imx_get_hab_ops(void)
if (ops)
return ops;
- if (cpu_is_mx25() || cpu_is_mx35())
+ if (IS_ENABLED(CONFIG_HABV3) && (cpu_is_mx25() || cpu_is_mx35()))
tmp = &imx_hab_ops_iim;
- else if (cpu_is_mx6())
+ else if (IS_ENABLED(CONFIG_HABV4) && cpu_is_mx6())
tmp = &imx_hab_ops_ocotp;
else
return NULL;
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index a4e645201f..e18ce6358a 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -303,7 +303,8 @@ static int omap_correct_bch(struct mtd_info *mtd, uint8_t *dat,
int bitflip_count;
int bch_max_err;
- int eccsteps = oinfo->nand.ecc.steps;
+ int eccsteps = (nand->ecc.mode == NAND_ECC_HW) &&
+ (nand->ecc.size == 2048) ? 4 : 1;
int eccsize = oinfo->nand.ecc.bytes;
switch (oinfo->ecc_mode) {
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c
index 680f30f707..6269668187 100644
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -58,7 +58,7 @@ struct cqspi_st {
unsigned int irq_mask;
int current_cs;
unsigned int master_ref_clk_hz;
- unsigned int ext_decoder;
+ unsigned int is_decoded_cs;
unsigned int fifo_depth;
struct cqspi_flash_pdata f_pdata[CQSPI_MAX_CHIPSELECT];
bool no_reconfig;
@@ -903,7 +903,7 @@ static void cqspi_switch_cs(struct cqspi_st *cqspi, unsigned int cs)
writel(reg, reg_base + CQSPI_REG_SIZE);
/* configure the chip select */
- cqspi_chipselect(cqspi, cs, cqspi->ext_decoder);
+ cqspi_chipselect(cqspi, cs, cqspi->is_decoded_cs);
cqspi_controller_enable(cqspi);
}
@@ -1020,12 +1020,9 @@ static int cqspi_parse_dt(struct cqspi_st *cqspi)
struct device_node *np = cqspi->dev->device_node;
struct device_d *dev = cqspi->dev;
- if (of_property_read_u32(np, "ext-decoder", &cqspi->ext_decoder)) {
- dev_err(dev, "couldn't determine ext-decoder\n");
- return -ENXIO;
- }
+ cqspi->is_decoded_cs = of_property_read_bool(np, "cdns,is-decoded-cs");
- if (of_property_read_u32(np, "fifo-depth", &cqspi->fifo_depth)) {
+ if (of_property_read_u32(np, "cdns,fifo-depth", &cqspi->fifo_depth)) {
dev_err(dev, "couldn't determine fifo-depth\n");
return -ENXIO;
}
@@ -1123,7 +1120,7 @@ static int cqspi_probe(struct device_d *dev)
dev->priv = cqspi;
if (pdata) {
- cqspi->ext_decoder = pdata->ext_decoder;
+ cqspi->is_decoded_cs = pdata->is_decoded_cs;
cqspi->fifo_depth = pdata->fifo_depth;
} else {
ret = cqspi_parse_dt(cqspi);
@@ -1133,7 +1130,7 @@ static int cqspi_probe(struct device_d *dev)
}
}
- cqspi->qspi_clk = clk_get(dev, "qspi_clk");
+ cqspi->qspi_clk = clk_get(dev, NULL);
if (IS_ERR(cqspi->qspi_clk)) {
dev_err(dev, "cannot get qspi clk\n");
ret = PTR_ERR(cqspi->qspi_clk);
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 25b41cb012..ac20490231 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -253,9 +253,11 @@ static const char *of_binding_names[] = {
static int of_partition_init(void)
{
- dev_add_param_enum(&global_device, "of_partition_binding", NULL, NULL,
- &of_partition_binding, of_binding_names,
- ARRAY_SIZE(of_binding_names), NULL);
+ if (IS_ENABLED(CONFIG_GLOBALVAR))
+ dev_add_param_enum(&global_device, "of_partition_binding",
+ NULL, NULL,
+ &of_partition_binding, of_binding_names,
+ ARRAY_SIZE(of_binding_names), NULL);
return 0;
}