diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-30 11:30:51 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-30 11:30:51 +0200 |
commit | ea44dc8f3392ef94d8f958788571182f380c7b84 (patch) | |
tree | ebee0b66d03c9660b440e98cf0a8c1d5282877ab /drivers | |
parent | a2487fe7af50d291be980fd5f01f64286e413df9 (diff) | |
parent | d9e5eb8ec4dfa70d2a3afb1a326da80ae82c06f0 (diff) | |
download | barebox-ea44dc8f3392ef94d8f958788571182f380c7b84.tar.gz barebox-ea44dc8f3392ef94d8f958788571182f380c7b84.tar.xz |
Merge branch 'for-next/misc' into next
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ddr/fsl/ctrl_regs.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/build.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c index 4957320d60..eb99e0ea21 100644 --- a/drivers/ddr/fsl/ctrl_regs.c +++ b/drivers/ddr/fsl/ctrl_regs.c @@ -1111,7 +1111,7 @@ static void set_ddr_sdram_mode_9(struct fsl_ddr_controller *c, unsigned short esdmode5; /* Extended SDRAM mode 5 */ int rtt_park = 0; bool four_cs = false; - const unsigned int mclk_ps = get_memory_clk_period_ps(0); + const unsigned int mclk_ps = get_memory_clk_period_ps(c); if ((ddr->cs[0].config & SDRAM_CS_CONFIG_EN) && (ddr->cs[1].config & SDRAM_CS_CONFIG_EN) && diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 604fe87e53..da409010f7 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -508,6 +508,14 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, struct ubi_device *ubi; int i, err, ref = 0; + /* + * Do not try to attach an UBI device if this device has partitions + * as it's not a good idea to attach UBI on a raw device when the + * real UBI only spans the first partition. + */ + if (!list_empty(&mtd->partitions)) + return -EBUSY; + if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT) return -EINVAL; |