* [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry
@ 2015-12-29 12:22 Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
` (9 more replies)
0 siblings, 10 replies; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
At present chromebook_jerry does not boot due to a configuration error and
a missing Makefile piece. This series fixes that and also adds a few more
adjustments mostly related to SPL and pinctrl.
The first three patches could perhaps be applied for this release - the
rest are for later.
Simon Glass (10):
rockchip: Enable generation of SPI images
rockchip: Drop a debug message when outputing SPI images
rockchip: Fix the configuration for chromebook_jerry
tiny-printf: Avoid printing NULL strings
dm: spi_flash: Allow the uclass to work without printf()
dm: gpio: Allow the uclass to work without printf()
dm: mmc: Try to honour the sequence order
i2c: Correct command return values
malloc_simple: Display an error when memory is exhausted
pinctrl: Avoid binding all pinconfig nodes before relocation
common/cmd_i2c.c | 6 ++++--
common/malloc_simple.c | 5 ++++-
configs/chromebook_jerry_defconfig | 4 ++++
doc/README.rockchip | 7 ++++---
drivers/gpio/gpio-uclass.c | 8 ++++++++
drivers/mmc/mmc.c | 20 +++++++++++++++-----
drivers/mtd/spi/sf-uclass.c | 8 +++++++-
drivers/pinctrl/pinctrl-uclass.c | 4 ++++
include/configs/chromebook_jerry.h | 1 +
lib/tiny-printf.c | 6 ++++--
tools/Makefile | 2 +-
tools/rkspi.c | 2 +-
12 files changed, 57 insertions(+), 16 deletions(-)
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing " Simon Glass
` (8 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
This feature was dropped at some point. Restore it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/Makefile b/tools/Makefile
index 9cfd80b..d49e40d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -64,7 +64,7 @@ RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := $(addprefix lib/rsa/, \
rsa-sign.o rsa-verify.o rsa-checksum.o \
rsa-mod-exp.o)
-ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o
+ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o
# common objs for dumpimage and mkimage
dumpimage-mkimage-objs := aisimage.o \
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing SPI images
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry Simon Glass
` (7 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
There is an unnecessary sector count displayed. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/rkspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/rkspi.c b/tools/rkspi.c
index 800e235..a0b0051 100644
--- a/tools/rkspi.c
+++ b/tools/rkspi.c
@@ -54,7 +54,7 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd,
* boot ROM. Its rationale is unknown.
*/
for (sector = size / RKSPI_SECT_LEN - 1; sector >= 0; sector--) {
- printf("sector %u\n", sector);
+ debug("sector %u\n", sector);
memmove(buf + sector * RKSPI_SECT_LEN * 2,
buf + sector * RKSPI_SECT_LEN,
RKSPI_SECT_LEN);
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing " Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings Simon Glass
` (6 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
Various updates did not make it through to this board. Also the instructions
for building a SPI image are no-longer correct. Fix these so that Jerry can
boot to a prompt again.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
configs/chromebook_jerry_defconfig | 4 ++++
doc/README.rockchip | 7 ++++---
include/configs/chromebook_jerry.h | 1 +
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index da47707..a515d8d 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -27,7 +27,9 @@ CONFIG_RESET=y
CONFIG_DM_MMC=y
CONFIG_ROCKCHIP_DWMMC=y
CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_FULL is not set
CONFIG_SPL_PINCTRL=y
+# CONFIG_SPL_PINCTRL_FULL is not set
CONFIG_ROCKCHIP_PINCTRL=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_ACT8846=y
@@ -41,5 +43,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_SYS_NS16550=y
CONFIG_USE_PRIVATE_LIBGCC=y
+CONFIG_USE_TINY_PRINTF=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_ROCKCHIP_SPI=y
diff --git a/doc/README.rockchip b/doc/README.rockchip
index b455f6f..9a2ebca 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -135,9 +135,10 @@ Booting from SPI
To write an image that boots from SPI flash (e.g. for the Haier Chromebook):
- ./chromebook_jerry/tools/mkimage -n rk3036 -T rkspi -d chromebook_jerry/spl/u-boot-spl-dtb.bin out
- dd if=spl.bin of=out.bin bs=128K conv=sync
- cat chromebook_jerry/u-boot-dtb.img out.bin
+ ./chromebook_jerry/tools/mkimage -n rk3288 -T rkspi \
+ -d chromebook_jerry/spl/u-boot-spl-dtb.bin spl.bin && \
+ dd if=spl.bin of=spl-out.bin bs=128K conv=sync && \
+ cat spl-out.bin chromebook_jerry/u-boot-dtb.img >out.bin && \
dd if=out.bin of=out.bin.pad bs=4M conv=sync
This converts the SPL image to the required SPI format by adding the Rockchip
diff --git a/include/configs/chromebook_jerry.h b/include/configs/chromebook_jerry.h
index 058325c..e29d776 100644
--- a/include/configs/chromebook_jerry.h
+++ b/include/configs/chromebook_jerry.h
@@ -13,5 +13,6 @@
#define CONFIG_SPL_SPI_SUPPORT
#define CONFIG_SPL_SPI_FLASH_SUPPORT
#define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SPI_FLASH_GIGADEVICE
#endif
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (2 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2015-12-29 13:23 ` Stefan Roese
2015-12-29 12:22 ` [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf() Simon Glass
` (5 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
Add a check for NULL strings to avoid printing junk to the console.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
lib/tiny-printf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 403b134..efe5c25 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -108,8 +108,10 @@ int vprintf(const char *fmt, va_list va)
w--;
while (w-- > 0)
putc(lz ? '0' : ' ');
- while ((ch = *p++))
- putc(ch);
+ if (p) {
+ while ((ch = *p++))
+ putc(ch);
+ }
}
}
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf()
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (3 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-15 13:22 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 06/10] dm: gpio: " Simon Glass
` (4 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/mtd/spi/sf-uclass.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 72e0f6b..5aa4e6f 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -55,11 +55,17 @@ int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
{
struct spi_slave *slave;
struct udevice *bus;
- char name[30], *str;
+ char *str;
int ret;
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_TINY_PRINTF)
+ str = "spi_flash";
+#else
+ char name[30];
+
snprintf(name, sizeof(name), "spi_flash@%d:%d", busnum, cs);
str = strdup(name);
+#endif
ret = spi_get_bus_and_cs(busnum, cs, max_hz, spi_mode,
"spi_flash_std", str, &bus, &slave);
if (ret)
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 06/10] dm: gpio: Allow the uclass to work without printf()
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (4 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf() Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order Simon Glass
` (3 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/gpio/gpio-uclass.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 4cce11f..3ed4d89 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -154,6 +154,7 @@ int dm_gpio_request(struct gpio_desc *desc, const char *label)
static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...)
{
+#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -161,6 +162,9 @@ static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...)
vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
return dm_gpio_request(desc, buf);
+#else
+ return dm_gpio_request(desc, fmt);
+#endif
}
/**
@@ -199,6 +203,7 @@ int gpio_request(unsigned gpio, const char *label)
*/
int gpio_requestf(unsigned gpio, const char *fmt, ...)
{
+#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -206,6 +211,9 @@ int gpio_requestf(unsigned gpio, const char *fmt, ...)
vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
return gpio_request(gpio, buf);
+#else
+ return gpio_request(gpio, fmt);
+#endif
}
int _dm_gpio_free(struct udevice *dev, uint offset)
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (5 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 06/10] dm: gpio: " Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 08/10] i2c: Correct command return values Simon Glass
` (2 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
At present we add driver-model MMC devices in the order we find them. The
'alias' order is not honoured.
It is difficult to fix this for the case where we have holes in the
sequence. But for the common case where the devices are numbered from 0
without any gaps, we can add the devices to the internal data structures
in this order.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/mmc/mmc.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 3a34028..ae24b63 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1772,18 +1772,28 @@ static int mmc_probe(bd_t *bis)
#elif defined(CONFIG_DM_MMC)
static int mmc_probe(bd_t *bis)
{
- int ret;
+ int ret, i;
struct uclass *uc;
- struct udevice *m;
+ struct udevice *dev;
ret = uclass_get(UCLASS_MMC, &uc);
if (ret)
return ret;
- uclass_foreach_dev(m, uc) {
- ret = device_probe(m);
+ /*
+ * Try to add them in sequence order. Really with driver model we
+ * should allow holes, but the current MMC list does not allow that.
+ * So if we request 0, 1, 3 we will get 0, 1, 2.
+ */
+ for (i = 0; ; i++) {
+ ret = uclass_get_device_by_seq(UCLASS_MMC, i, &dev);
+ if (ret == -ENODEV)
+ break;
+ }
+ uclass_foreach_dev(dev, uc) {
+ ret = device_probe(dev);
if (ret)
- printf("%s - probe failed: %d\n", m->name, ret);
+ printf("%s - probe failed: %d\n", dev->name, ret);
}
return 0;
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 08/10] i2c: Correct command return values
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (6 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-04 7:08 ` Heiko Schocher
2015-12-29 12:22 ` [U-Boot] [PATCH 09/10] malloc_simple: Display an error when memory is exhausted Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation Simon Glass
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
We should not return a -ve error code from command functions. Instead,
return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
shell" error messages from the hush shell.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/cmd_i2c.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 552c875..b3bb644 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1809,7 +1809,8 @@ static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
if (ret)
printf("Failure changing bus number (%d)\n", ret);
}
- return ret;
+
+ return ret ? CMD_RET_FAILURE : 0;
}
#endif /* defined(CONFIG_SYS_I2C) */
@@ -1852,7 +1853,8 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
if (ret)
printf("Failure changing bus speed (%d)\n", ret);
}
- return ret;
+
+ return ret ? CMD_RET_FAILURE : 0;
}
/**
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 09/10] malloc_simple: Display an error when memory is exhausted
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (7 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 08/10] i2c: Correct command return values Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation Simon Glass
9 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
This is an uncommon but annoying case. Normal error handling will ensure it
is reported, but it is useful to have a message which provides a little more
detail.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/malloc_simple.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index 479a1e4..4621b6d 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -21,8 +21,11 @@ void *malloc_simple(size_t bytes)
new_ptr = gd->malloc_ptr + bytes;
debug("%s: size=%zx, ptr=%lx, limit=%lx\n", __func__, bytes, new_ptr,
gd->malloc_limit);
- if (new_ptr > gd->malloc_limit)
+ if (new_ptr > gd->malloc_limit) {
+ printf("Out of memory (%zu bytes, %lx requested)\n", bytes,
+ new_ptr);
return NULL;
+ }
ptr = map_sysmem(gd->malloc_base + gd->malloc_ptr, bytes);
gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr));
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
` (8 preceding siblings ...)
2015-12-29 12:22 ` [U-Boot] [PATCH 09/10] malloc_simple: Display an error when memory is exhausted Simon Glass
@ 2015-12-29 12:22 ` Simon Glass
2016-01-16 1:26 ` Simon Glass
9 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2015-12-29 12:22 UTC (permalink / raw)
To: u-boot
This can create a large number of pinctrl devices. It chews up early
malloc() memory and takes time. Only bind those which are marked as needed
before relocation.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/pinctrl/pinctrl-uclass.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index b5fdcd1..c42b312 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -111,12 +111,16 @@ static int pinconfig_post_bind(struct udevice *dev)
{
const void *fdt = gd->fdt_blob;
int offset = dev->of_offset;
+ bool pre_reloc_only = !(gd->flags & GD_FLG_RELOC);
const char *name;
int ret;
for (offset = fdt_first_subnode(fdt, offset);
offset > 0;
offset = fdt_next_subnode(fdt, offset)) {
+ if (pre_reloc_only &&
+ !fdt_getprop(fdt, offset, "u-boot,dm-pre-reloc", NULL))
+ continue;
/*
* If this node has "compatible" property, this is not
* a pin configuration node, but a normal device. skip.
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings
2015-12-29 12:22 ` [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings Simon Glass
@ 2015-12-29 13:23 ` Stefan Roese
2016-01-16 1:25 ` Simon Glass
0 siblings, 1 reply; 22+ messages in thread
From: Stefan Roese @ 2015-12-29 13:23 UTC (permalink / raw)
To: u-boot
On 29.12.2015 13:22, Simon Glass wrote:
> Add a check for NULL strings to avoid printing junk to the console.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> lib/tiny-printf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
> index 403b134..efe5c25 100644
> --- a/lib/tiny-printf.c
> +++ b/lib/tiny-printf.c
> @@ -108,8 +108,10 @@ int vprintf(const char *fmt, va_list va)
> w--;
> while (w-- > 0)
> putc(lz ? '0' : ' ');
> - while ((ch = *p++))
> - putc(ch);
> + if (p) {
> + while ((ch = *p++))
> + putc(ch);
> + }
> }
> }
>
>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 08/10] i2c: Correct command return values
2015-12-29 12:22 ` [U-Boot] [PATCH 08/10] i2c: Correct command return values Simon Glass
@ 2016-01-04 7:08 ` Heiko Schocher
2016-01-16 1:25 ` Simon Glass
0 siblings, 1 reply; 22+ messages in thread
From: Heiko Schocher @ 2016-01-04 7:08 UTC (permalink / raw)
To: u-boot
Hello Simon,
Am 29.12.2015 um 13:22 schrieb Simon Glass:
> We should not return a -ve error code from command functions. Instead,
> return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
> shell" error messages from the hush shell.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/cmd_i2c.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Thanks! As it is in a patchserie:
Acked-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
>
> diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
> index 552c875..b3bb644 100644
> --- a/common/cmd_i2c.c
> +++ b/common/cmd_i2c.c
> @@ -1809,7 +1809,8 @@ static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
> if (ret)
> printf("Failure changing bus number (%d)\n", ret);
> }
> - return ret;
> +
> + return ret ? CMD_RET_FAILURE : 0;
> }
> #endif /* defined(CONFIG_SYS_I2C) */
>
> @@ -1852,7 +1853,8 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
> if (ret)
> printf("Failure changing bus speed (%d)\n", ret);
> }
> - return ret;
> +
> + return ret ? CMD_RET_FAILURE : 0;
> }
>
> /**
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
@ 2016-01-15 1:35 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-15 1:35 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> This feature was dropped at some point. Restore it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> tools/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-rockchip, and now in mainline.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing SPI images
2015-12-29 12:22 ` [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing " Simon Glass
@ 2016-01-15 1:35 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-15 1:35 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> There is an unnecessary sector count displayed. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> tools/rkspi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/rkspi.c b/tools/rkspi.c
> index 800e235..a0b0051 100644
> --- a/tools/rkspi.c
> +++ b/tools/rkspi.c
> @@ -54,7 +54,7 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd,
> * boot ROM. Its rationale is unknown.
> */
> for (sector = size / RKSPI_SECT_LEN - 1; sector >= 0; sector--) {
> - printf("sector %u\n", sector);
> + debug("sector %u\n", sector);
> memmove(buf + sector * RKSPI_SECT_LEN * 2,
> buf + sector * RKSPI_SECT_LEN,
> RKSPI_SECT_LEN);
> --
> 2.6.0.rc2.230.g3dd15c0
>
Applied to u-boot-rockchip, and now in mainline.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry
2015-12-29 12:22 ` [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry Simon Glass
@ 2016-01-15 1:35 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-15 1:35 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> Various updates did not make it through to this board. Also the instructions
> for building a SPI image are no-longer correct. Fix these so that Jerry can
> boot to a prompt again.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> configs/chromebook_jerry_defconfig | 4 ++++
> doc/README.rockchip | 7 ++++---
> include/configs/chromebook_jerry.h | 1 +
> 3 files changed, 9 insertions(+), 3 deletions(-)
Applied to u-boot-rockchip, and now in mainline.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf()
2015-12-29 12:22 ` [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf() Simon Glass
@ 2016-01-15 13:22 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-15 13:22 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> For SPL we don't really need sprintf() and with tiny-printf this is not
> available. Allow this to be dropped in SPL when using tiny-printf.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/mtd/spi/sf-uclass.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
Applied to u-boot-rockchip, as it fixes a build error with Jerry.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings
2015-12-29 13:23 ` Stefan Roese
@ 2016-01-16 1:25 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-16 1:25 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 06:23, Stefan Roese <sr@denx.de> wrote:
> On 29.12.2015 13:22, Simon Glass wrote:
>>
>> Add a check for NULL strings to avoid printing junk to the console.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> lib/tiny-printf.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
>> index 403b134..efe5c25 100644
>> --- a/lib/tiny-printf.c
>> +++ b/lib/tiny-printf.c
>> @@ -108,8 +108,10 @@ int vprintf(const char *fmt, va_list va)
>> w--;
>> while (w-- > 0)
>> putc(lz ? '0' : ' ');
>> - while ((ch = *p++))
>> - putc(ch);
>> + if (p) {
>> + while ((ch = *p++))
>> + putc(ch);
>> + }
>> }
>> }
>>
>>
>
> Reviewed-by: Stefan Roese <sr@denx.de>
Applied to u-boot-dm
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 06/10] dm: gpio: Allow the uclass to work without printf()
2015-12-29 12:22 ` [U-Boot] [PATCH 06/10] dm: gpio: " Simon Glass
@ 2016-01-16 1:25 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-16 1:25 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> For SPL we don't really need sprintf() and with tiny-printf this is not
> available. Allow this to be dropped in SPL when using tiny-printf.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/gpio/gpio-uclass.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied to u-boot-dm
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order
2015-12-29 12:22 ` [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order Simon Glass
@ 2016-01-16 1:25 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-16 1:25 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> At present we add driver-model MMC devices in the order we find them. The
> 'alias' order is not honoured.
>
> It is difficult to fix this for the case where we have holes in the
> sequence. But for the common case where the devices are numbered from 0
> without any gaps, we can add the devices to the internal data structures
> in this order.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/mmc/mmc.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
Applied to u-boot-dm
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 08/10] i2c: Correct command return values
2016-01-04 7:08 ` Heiko Schocher
@ 2016-01-16 1:25 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-16 1:25 UTC (permalink / raw)
To: u-boot
On 4 January 2016 at 00:08, Heiko Schocher <hs@denx.de> wrote:
> Hello Simon,
>
> Am 29.12.2015 um 13:22 schrieb Simon Glass:
>>
>> We should not return a -ve error code from command functions. Instead,
>> return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
>> shell" error messages from the hush shell.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> common/cmd_i2c.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>
> Thanks! As it is in a patchserie:
>
> Acked-by: Heiko Schocher <hs@denx.de>
>
Applied to u-boot-dm!
^ permalink raw reply [flat|nested] 22+ messages in thread
* [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation
2015-12-29 12:22 ` [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation Simon Glass
@ 2016-01-16 1:26 ` Simon Glass
0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2016-01-16 1:26 UTC (permalink / raw)
To: u-boot
On 29 December 2015 at 05:22, Simon Glass <sjg@chromium.org> wrote:
> This can create a large number of pinctrl devices. It chews up early
> malloc() memory and takes time. Only bind those which are marked as needed
> before relocation.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/pinctrl/pinctrl-uclass.c | 4 ++++
> 1 file changed, 4 insertions(+)
Applied to u-boot-dm!
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2016-01-16 1:26 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-29 12:22 [U-Boot] [PATCH 00/10] rockchip: Tidy up SPL operation on jerry Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 01/10] rockchip: Enable generation of SPI images Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 02/10] rockchip: Drop a debug message when outputing " Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 03/10] rockchip: Fix the configuration for chromebook_jerry Simon Glass
2016-01-15 1:35 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 04/10] tiny-printf: Avoid printing NULL strings Simon Glass
2015-12-29 13:23 ` Stefan Roese
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 05/10] dm: spi_flash: Allow the uclass to work without printf() Simon Glass
2016-01-15 13:22 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 06/10] dm: gpio: " Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 07/10] dm: mmc: Try to honour the sequence order Simon Glass
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 08/10] i2c: Correct command return values Simon Glass
2016-01-04 7:08 ` Heiko Schocher
2016-01-16 1:25 ` Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 09/10] malloc_simple: Display an error when memory is exhausted Simon Glass
2015-12-29 12:22 ` [U-Boot] [PATCH 10/10] pinctrl: Avoid binding all pinconfig nodes before relocation Simon Glass
2016-01-16 1:26 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.