From 04a710a593138a0a3cfe88cd3a0ba036973a9fda Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 11 Aug 2014 11:02:17 +0200 Subject: tools: fix typo in tools/image-host.c fix a typo in error printf. If FIT_CONFS_PATH is not found print FIT_CONFS_PATH not FIT_IMAGES_PATH. Signed-off-by: Heiko Schocher Cc: Simon Glass Acked-by: Simon Glass --- tools/image-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/image-host.c b/tools/image-host.c index 0eff720..7effb6c 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -689,7 +689,7 @@ int fit_add_verification_data(const char *keydir, void *keydest, void *fit, confs_noffset = fdt_path_offset(fit, FIT_CONFS_PATH); if (confs_noffset < 0) { printf("Can't find images parent node '%s' (%s)\n", - FIT_IMAGES_PATH, fdt_strerror(confs_noffset)); + FIT_CONFS_PATH, fdt_strerror(confs_noffset)); return -ENOENT; } -- cgit v1.1 From 686dca0fc4eb077b089c7507f899097d001c8ce3 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 11 Aug 2014 11:17:08 +0200 Subject: tools, fit_info: increase buffer for command name currently the buffer for command name is 50 bytes only. If using fit_info with long absolute paths, this is not enough, so raise it to 256 (as it is in fit_check_sign) Signed-off-by: Heiko Schocher Cc: Simon Glass Acked-by: Simon Glass --- tools/fit_info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/fit_info.c b/tools/fit_info.c index 481ac6d..652abcd 100644 --- a/tools/fit_info.c +++ b/tools/fit_info.c @@ -48,10 +48,11 @@ int main(int argc, char **argv) char *fdtfile = NULL; char *nodename = NULL; char *propertyname = NULL; - char cmdname[50]; + char cmdname[256]; int c; - strcpy(cmdname, *argv); + strncpy(cmdname, *argv, sizeof(cmdname) - 1); + cmdname[sizeof(cmdname) - 1] = '\0'; while ((c = getopt(argc, argv, "f:n:p:")) != -1) switch (c) { case 'f': -- cgit v1.1 From d878c9a932eae626aced58128357fc6155f88739 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 11 Aug 2014 16:09:28 -0600 Subject: pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM If a 32-bit system has 2GB of RAM, and the base address of that RAM is 2GB, then start+size will overflow a 32-bit value (to a value of 0). To avoid such an overflow, convert __pci_hose_bus_to_phys() to calculate the offset of a bus address into a PCI region, rather than comparing a bus address against the end of a PCI region. Signed-off-by: Stephen Warren --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index ed113bf..4fd9c53 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -323,7 +323,7 @@ int __pci_hose_bus_to_phys(struct pci_controller *hose, continue; if (bus_addr >= res->bus_start && - bus_addr < res->bus_start + res->size) { + (bus_addr - res->bus_start) < res->size) { *pa = (bus_addr - res->bus_start + res->phys_start); return 0; } -- cgit v1.1 From 31cbe80c3346649cfe6a52e268d75ac4a338a086 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sat, 9 Aug 2014 18:17:47 +0200 Subject: mkimage: fix compilation issues on OpenBSD Signed-off-by: Luka Perkov --- tools/mkimage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/mkimage.c b/tools/mkimage.c index 123d0c7..c70408c 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -458,6 +458,7 @@ NXTARG: ; #if defined(_POSIX_SYNCHRONIZED_IO) && \ !defined(__sun__) && \ !defined(__FreeBSD__) && \ + !defined(__OpenBSD__) && \ !defined(__APPLE__) (void) fdatasync (ifd); #else @@ -501,6 +502,7 @@ NXTARG: ; #if defined(_POSIX_SYNCHRONIZED_IO) && \ !defined(__sun__) && \ !defined(__FreeBSD__) && \ + !defined(__OpenBSD__) && \ !defined(__APPLE__) (void) fdatasync (ifd); #else -- cgit v1.1 From 5be1af019877aaab708b6537d9db76a1610276ca Mon Sep 17 00:00:00 2001 From: vijay rai Date: Wed, 23 Jul 2014 18:33:16 +0530 Subject: driver/qe: update status of QE microcode This Patch updates error print for QE which should be easily understood Signed-off-by: Vijay Rai --- drivers/qe/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index be09a17..4358a91 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -333,7 +333,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) /* Check the magic */ if ((hdr->magic[0] != 'Q') || (hdr->magic[1] != 'E') || (hdr->magic[2] != 'F')) { - printf("Not a microcode\n"); + printf("QE microcode not found\n"); #ifdef CONFIG_DEEP_SLEEP setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_QE_DISABLE); #endif -- cgit v1.1 From 412921d29e11adcb14bd1d6c5b7145af0dd10599 Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Mon, 21 Jul 2014 11:06:16 +0200 Subject: RTC: add support for DS1339 (using DS1307 driver) Signed-off-by: Markus Niebel --- README | 1 + drivers/rtc/Makefile | 1 + drivers/rtc/ds1307.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README b/README index 1d71359..4fd8794 100644 --- a/README +++ b/README @@ -1152,6 +1152,7 @@ The following options need to be configured: CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC + CONFIG_RTC_DS1339 - use Maxim, Inc. DS1339 RTC CONFIG_RTC_DS164x - use Dallas DS164x RTC CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 003d322..43f8546 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -16,6 +16,7 @@ obj-$(CONFIG_RTC_DS1302) += ds1302.o obj-$(CONFIG_RTC_DS1306) += ds1306.o obj-$(CONFIG_RTC_DS1307) += ds1307.o obj-$(CONFIG_RTC_DS1338) += ds1307.o +obj-$(CONFIG_RTC_DS1339) += ds1307.o obj-$(CONFIG_RTC_DS1337) += ds1337.o obj-$(CONFIG_RTC_DS1374) += ds1374.o obj-$(CONFIG_RTC_DS1388) += ds1337.o diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c index 1a2bad3..03ab1a8 100644 --- a/drivers/rtc/ds1307.c +++ b/drivers/rtc/ds1307.c @@ -9,7 +9,7 @@ /* * Date & Time support (no alarms) for Dallas Semiconductor (now Maxim) - * DS1307 and DS1338 Real Time Clock (RTC). + * DS1307 and DS1338/9 Real Time Clock (RTC). * * based on ds1337.c */ -- cgit v1.1 From 1668d64439ecf4af64d5de2e24bb3d7c4e643b25 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 14 Jul 2014 09:17:11 +0200 Subject: mtdparts: fix usecount bug add missing put_mtd_device, so mtd->usecount gets correct decremented in get_mtd_info(). Signed-off-by: Heiko Schocher Cc: Scott Wood Cc: Tom Rini --- common/cmd_mtdparts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 40b6333..3cb0571 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -292,6 +292,7 @@ static int get_mtd_info(u8 type, u8 num, struct mtd_info **mtd) printf("Device %s not found!\n", mtd_dev); return 1; } + put_mtd_device(*mtd); return 0; } -- cgit v1.1 From feb858012f51e672025a8c12e69077646280b68b Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sun, 11 Aug 2013 16:40:43 +0200 Subject: README: document CONFIG_BOARD_SIZE_LIMIT CONFIG_BOARD_SIZE_LIMIT was introduced by f3a14d37 [Makefile: allow boards to check file size limits] and is in use by several boards, but never got documented. Signed-off-by: Sascha Silbe --- README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README b/README index 4fd8794..5c85fe0 100644 --- a/README +++ b/README @@ -4371,6 +4371,11 @@ use the "saveenv" command to store a valid environment. later, once stdio is running and output goes to the LCD, if present. +- CONFIG_BOARD_SIZE_LIMIT: + Maximum size of the U-Boot image. When defined, the + build system checks that the actual size does not + exceed it. + Low Level (hardware related) configuration options: --------------------------------------------------- -- cgit v1.1 From 9fa7bbc126d697f1415adbac72bb7f6d978ff50d Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sun, 11 Aug 2013 16:40:45 +0200 Subject: openrd: fail build if U-Boot would overlap with environment in flash Set CONFIG_BOARD_SIZE_LIMIT so we'll notice at build time if U-Boot has grown so large that it would overlap with the environment area in flash, rather than bricking the device at run-time on first saveenv. Signed-off-by: Sascha Silbe --- include/configs/openrd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/configs/openrd.h b/include/configs/openrd.h index 3eb408f..b65bdfd 100644 --- a/include/configs/openrd.h +++ b/include/configs/openrd.h @@ -77,6 +77,11 @@ #define CONFIG_ENV_SIZE 0x20000 /* 128k */ #define CONFIG_ENV_ADDR 0x60000 #define CONFIG_ENV_OFFSET 0x60000 /* env starts here */ +/* + * Environment is right behind U-Boot in flash. Make sure U-Boot + * doesn't grow into the environment area. + */ +#define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET /* * Default environment variables -- cgit v1.1