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 | |
parent | a2487fe7af50d291be980fd5f01f64286e413df9 (diff) | |
parent | d9e5eb8ec4dfa70d2a3afb1a326da80ae82c06f0 (diff) | |
download | barebox-ea44dc8f3392ef94d8f958788571182f380c7b84.tar.gz barebox-ea44dc8f3392ef94d8f958788571182f380c7b84.tar.xz |
Merge branch 'for-next/misc' into next
-rw-r--r-- | arch/x86/Kconfig | 7 | ||||
-rw-r--r-- | drivers/ddr/fsl/ctrl_regs.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/build.c | 8 | ||||
-rw-r--r-- | scripts/bareboximd.c | 5 |
4 files changed, 10 insertions, 12 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1793055ae0..19009442a4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -86,13 +86,6 @@ choice some 16 bit real mode code and some restrictions everyone knows from BIOS based systems. - config X86_NATIVE_BRINGUP - bool "native" - help - Barebox will act as a native bootloader. This includes all the - required initialization needed to bring up a piece of hardware. - Note: Not implemented yet - endchoice source "arch/x86/boot/Kconfig" 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; diff --git a/scripts/bareboximd.c b/scripts/bareboximd.c index b733cae61c..d11b661fa3 100644 --- a/scripts/bareboximd.c +++ b/scripts/bareboximd.c @@ -53,7 +53,7 @@ int imd_command_setenv(const char *variable_name, const char *value) static int write_file(const char *filename, const void *buf, size_t size) { - int fd, ret; + int fd; int now; fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); @@ -74,9 +74,6 @@ static int write_file(const char *filename, const void *buf, size_t size) close(fd); - if (ret < 0) - return ret; - return 0; } |