[U-Boot] allow LED initialization without STATUS_LED_BOOT

2015-03-29 Thread Bernhard Nortmann
For current U-Boot to initialize status LEDs via status_led_init(), it is required to have both CONFIG_STATUS_LED and STATUS_LED_BOOT defined. This may be a particular concern with GPIO LEDs, where __led_init() is required to correctly set up the GPIO (gpio_request and gpio_direction_output). W

[U-Boot] Generic stubs for GPIO LEDs

2015-03-29 Thread Bernhard Nortmann
For boards that support LEDs driven via GPIO (CONFIG_GPIO_LED), it may be useful to have some generic stubs (wrapper functions) for the "colored" LEDs. This allows definitions like: #define GREEN_LED_GPIO 248 /* = PH24 */ #define STATUS_LED_BIT GREEN_LED_GPIO #define STATUS_L

[U-Boot] [PATCH 1/2] add generic stubs for GPIO LEDs

2015-08-21 Thread Bernhard Nortmann
onal, it's probably best to introduce an additional configuration setting. I've chosen CONFIG_GPIO_LED_STUBS for that. Placing the code in drivers/misc/gpio_led.c also ensures that it automatically depends on CONFIG_GPIO_LED too. Signed-off-by: Bernhard Nortmann --- drivers/

[U-Boot] [PATCH 2/2] allow LED initialization without STATUS_LED_BOOT

2015-08-21 Thread Bernhard Nortmann
G_STATUS_LED is sufficient to justify a corresponding call to status_led_init(), even with no STATUS_LED_BOOT defined. To do so, common/board_r.c needs call that routine, so it now is exposed via status_led.h. Signed-off-by: Bernhard Nortmann --- common/board_r.c | 9 ++--- drivers/mi

[U-Boot] [PATCH 0/2] GPIO LED improvements (resend)

2015-08-21 Thread Bernhard Nortmann
This is a resubmission of http://patchwork.ozlabs.org/patch/455748/ and http://patchwork.ozlabs.org/patch/455747/, but this time with proper formatting and through patman. Regards, B. Nortmann Bernhard Nortmann (2): add generic stubs for GPIO LEDs allow LED initialization without

[U-Boot] [RFC PATCH 3/3] avoid eth_unregister() call when function is unavailable

2015-08-21 Thread Bernhard Nortmann
unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann --- common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index 667c934..c0d0d09 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -474,7 +474,9 @@ ulong

[U-Boot] [RFC PATCH 1/3] expose eth_is_active() function to test network device state

2015-08-21 Thread Bernhard Nortmann
epts a device struct pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann --- include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/net.h b/include/net.h index d09bec9..c135ec4 100644 --- a

[U-Boot] [RFC PATCH 0/3] fix netconsole for CONFIG_DM_ETH

2015-08-21 Thread Bernhard Nortmann
inner A20) and had a functional netconsole again. I've also backported eth_is_active() and netconsole.c to v2015.04 to make sure they properly worked in case CONFIG_DM_ETH is absent. Regards, B. Nortmann Bernhard Nortmann (3): expose eth_is_active() function to test network device state fix netc

[U-Boot] [RFC PATCH 2/3] fix netconsole when CONFIG_DM_ETH is set

2015-08-21 Thread Bernhard Nortmann
This patches uses the eth_is_active() function to work around issues that prevented compilation with the newer driver model. Signed-off-by: Bernhard Nortmann --- drivers/net/netconsole.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net

[U-Boot] [RFC PATCH 0/1] sunxi board-specific options

2015-08-22 Thread Bernhard Nortmann
r includes, depending on board-specific definitions. The latter would probably originate from the boards' *_defconfig files. Regards, B. Nortmann Bernhard Nortmann (1): sunxi: support board-specific configuration options configs/Bananapi_defconfig | 2 +- include/configs/bananapi.h |

[U-Boot] [RFC PATCH] sunxi: support board-specific configuration options

2015-08-22 Thread Bernhard Nortmann
Extend sunxi-common.h to include sunxi-boards.h - which in turn can support multiple configurations/options/includes, based on board-specific symbols (preprocessor definitions). These might be supplied by the respective *_defconfig files. Signed-off-by: Bernhard Nortmann --- configs

Re: [U-Boot] [RFC PATCH] sunxi: support board-specific configuration options

2015-08-24 Thread Bernhard Nortmann
Hi Hans! I agree that picking user-defined LEDs as an example might not have been the best choice. Stuff like that should probably go into more 'generic' frameworks, e.g. a place to deal with those would be to define them in the device tree and have a proper driver handling them. Unfortunatel

Re: [U-Boot] [PATCH 1/2] add generic stubs for GPIO LEDs

2015-08-24 Thread Bernhard Nortmann
Hello Simon! Am 23.08.2015 23:21, schrieb Simon Glass: Hi Bernard, [...] If this is a new option it should be added to Kconfig. Otherwise: Reviewed-by: Simon Glass Right. Kconfig wasn't on my agenda, but I agree that it should go in there. Unfortunately this points out further problems. The

Re: [U-Boot] [RFC PATCH 1/3] expose eth_is_active() function to test network device state

2015-08-24 Thread Bernhard Nortmann
Hi Simon! Am 23.08.2015 23:21, schrieb Simon Glass: A few points: - You should tag your patch with the subsystem it targets - in your case I think you should prefix the subject with 'net: ' Okay. I'll keep that in mind for future reiterations of this patch set. Btw: Thanks for looking into my

Re: [U-Boot] [RFC PATCH 1/3] expose eth_is_active() function to test network device state

2015-08-25 Thread Bernhard Nortmann
Am 24.08.2015 um 19:02 schrieb Joe Hershberger: Hi Simon, On Mon, Aug 24, 2015 at 11:59 AM, Simon Glass wrote: Hi Bernhard, [...] i.e. sunxi GMAC (by simply adding #define CONFIG_NETCONSOLE). In that case how about adding that config to that board? Does it cause problems for other people? I'

Re: [U-Boot] [RFC PATCH 1/3] expose eth_is_active() function to test network device state

2015-08-25 Thread Bernhard Nortmann
Am 25.08.2015 um 17:55 schrieb Joe Hershberger: > Hi Bernhard, > > [...] > It's good to have a build target and also a test or so. We should > maybe enable it in sandbox. I'm not familiar at all with the U-Boot "sandbox" architecture, so I'd prefer to leave that to someone else. > I'm pretty s

[U-Boot] [PATCH v2 2/5] net: fix netconsole when CONFIG_DM_ETH is set

2015-08-26 Thread Bernhard Nortmann
This patches uses the eth_is_active() function to work around issues that prevented compilation with the newer driver model. Signed-off-by: Bernhard Nortmann --- Changes in v2: - add "net:" prefix to commit message drivers/net/netconsole.c | 14 +++--- 1 file changed, 11

[U-Boot] [PATCH v2 1/5] net: expose eth_is_active() function to test network device state

2015-08-26 Thread Bernhard Nortmann
epts a device struct pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass --- Changes in v2: - add "net:" prefix to commit message include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions(+), 1 del

[U-Boot] [PATCH v2 4/5] net: support NETCONSOLE option via Kconfig

2015-08-26 Thread Bernhard Nortmann
nsole might 'vanish' if they start to use CONFIG_NET or CONFIG_NETDEVICES. Signed-off-by: Bernhard Nortmann --- Changes in v2: None net/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/Kconfig b/net/Kconfig index 915371d..77a2f7e 100644 --- a/net/Kconfig +++ b/net/K

[U-Boot] [PATCH v2 5/5] sunxi: add NetConsole by default for Banana Pi/Pro

2015-08-26 Thread Bernhard Nortmann
all sunxi boards using CONFIG_SUNXI_[EG]MAC.) Signed-off-by: Bernhard Nortmann --- Changes in v2: None configs/Bananapi_defconfig | 3 ++- configs/Bananapro_defconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defco

[U-Boot] [PATCH v2 3/5] net: avoid eth_unregister() call when function is unavailable

2015-08-26 Thread Bernhard Nortmann
unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass --- Changes in v2: - add "net:" prefix to commit message common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index 667c93

[U-Boot] [PATCH v2 0/5] fix NetConsole for CONFIG_DM_ETH

2015-08-26 Thread Bernhard Nortmann
commit message - add "net:" prefix to commit message - add "net:" prefix to commit message Bernhard Nortmann (5): net: expose eth_is_active() function to test network device state net: fix netconsole when CONFIG_DM_ETH is set net: avoid eth_unregister() call when fun

[U-Boot] [PATCH v3 1/5] net: expose eth_is_active() function to test network device state

2015-08-26 Thread Bernhard Nortmann
epts a device struct pointer and tests it for ETH_STATE_ACTIVE. Series-changes: 3 - use dev_get_uclass_priv() Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass --- include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --g

Re: [U-Boot] [PATCH 1/2] add generic stubs for GPIO LEDs

2015-09-01 Thread Bernhard Nortmann
hat the "future" direction we want to take for GPIO LEDs will be based on driver model anyway... Regards, B. Nortmann Am 28.08.2015 um 17:00 schrieb Tom Rini: > On Mon, Aug 24, 2015 at 11:51:46AM +0200, Bernhard Nortmann wrote: >> Hello Simon! >> >> Am 23.08.2015 23

[U-Boot] [PATCH] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant

2015-09-02 Thread Bernhard Nortmann
"pub_head_size" field. This can be used to reliably distinguish between compatible versions of sunxi SPL and anything else (older variants or Allwinner's boot0). Signed-off-by: Bernhard Nortmann --- tools/mksunxiboot.c | 27 ++- 1 file changed, 2

Re: [U-Boot] [PATCH] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant

2015-09-02 Thread Bernhard Nortmann
Am 02.09.2015 um 16:51 schrieb Siarhei Siamashka: On Wed, 2 Sep 2015 15:17:11 +0200 Bernhard Nortmann wrote: This patch follows up on a discussion of ways to improve support for the sunxi FEL ("USB boot") mechanism, especially with regard to boot scripts, see: https://groups.google

[U-Boot] [RFC PATCH 0/2] sunxi: support FEL-provided environment vars and "fel" boot target

2015-09-03 Thread Bernhard Nortmann
'm sure it did it 'the right way'. Any feedback is appreciated. Regards, B. Nortmann Bernhard Nortmann (2): sunxi: retrieve FEL-provided values to environment variables sunxi: add "fel" boot target board/sunxi/board.c| 59 ++

[U-Boot] [RFC PATCH 2/2] sunxi: add "fel" boot target

2015-09-03 Thread Bernhard Nortmann
"false", causing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann --- include/configs/sunxi-common.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h inde

[U-Boot] [RFC PATCH 1/2] sunxi: retrieve FEL-provided values to environment variables

2015-09-03 Thread Bernhard Nortmann
ng specific customizations for the "FEL boot" case. Signed-off-by: Bernhard Nortmann --- board/sunxi/board.c | 59 + 1 file changed, 59 insertions(+) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 9c855f6..ceab1e0 1006

Re: [U-Boot] [PATCH] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant

2015-09-11 Thread Bernhard Nortmann
Hello Hans! Thanks for looking into this. Am 10.09.2015 um 20:29 schrieb Hans de Goede: I believe these 2 should be renamed to: uint32_t fel_boot_script_address; uint32_t fel_boot_script_size; To properly reflect what they are (they are not some abstract data, they are specifically a

Re: [U-Boot] [RFC PATCH 1/2] sunxi: retrieve FEL-provided values to environment variables

2015-09-11 Thread Bernhard Nortmann
Hi Hans! Am 10.09.2015 um 20:34 schrieb Hans de Goede: What if the user interrupts auto-boot with a fel provided boot.scr and then does "saveenv" ? Then we end up with a fel_data_addr and fel_data_size permanently in the env. At a minimum this function must always do: setenv("fel_data_addr",

Re: [U-Boot] [RFC PATCH 2/2] sunxi: add "fel" boot target

2015-09-11 Thread Bernhard Nortmann
Hi! Am 10.09.2015 um 20:36 schrieb Hans de Goede: Hi, I would prefer to have this like this: "bootcmd_fel=" \ "if test -n ${fel_booted} && test -n ${fel_data_addr}; then " \ "echo '(FEL boot)';" \ "source ${fel_data_addr}; " \ "fi\0" Sure, we coul

Re: [U-Boot] [RFC PATCH 1/2] sunxi: retrieve FEL-provided values to environment variables

2015-09-14 Thread Bernhard Nortmann
Hi Ian, hello Hans! That's an interesting find, Ian - thank you. Unfortunately it seems that flagging our environment vars accordingly isn't enough (on its own) to prevent them from being written by "saveenv". I've been testing #define CONFIG_ENV_FLAGS_LIST_STATIC "fel_booted:bo,fel_scriptaddr:

[U-Boot] [PATCH v2 1/3] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant

2015-09-14 Thread Bernhard Nortmann
"pub_head_size" field. This can be used to reliably distinguish between compatible versions of sunxi SPL and anything else (older variants or Allwinner's boot0). Signed-off-by: Bernhard Nortmann --- Changes in v2: - Rename field to fel_script_address, discard fel_data_siz

[U-Boot] [PATCH v2 2/3] sunxi: retrieve FEL-provided values to environment variables

2015-09-14 Thread Bernhard Nortmann
oot process, allowing specific customizations for the "FEL boot" case. Signed-off-by: Bernhard Nortmann --- Changes in v2: - renamed fel_data_addr to fel_script_addr, discarded fel_data_size - make sure that FEL-related environment vars are always cleared first - support minimum and maximum

[U-Boot] [PATCH v2 3/3] sunxi: add "fel" boot target

2015-09-14 Thread Bernhard Nortmann
"false", causing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann --- Changes in v2: - renamed fel_data_addr to fel_scriptaddr - combined both tests into one as suggested by Hans de Goede include/configs/sunxi-common.h | 11 ++

[U-Boot] [PATCH v2 0/3] sunxi: support FEL-provided environment vars and "fel" boot target

2015-09-14 Thread Bernhard Nortmann
s - renamed fel_data_addr to fel_scriptaddr - combined both tests into one as suggested by Hans de Goede Bernhard Nortmann (3): sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant sunxi: retrieve FEL-provided values to environmen

[U-Boot] [RESEND PATCH v3 2/5] net: fix netconsole when CONFIG_DM_ETH is set

2015-09-14 Thread Bernhard Nortmann
This patch uses the eth_is_active() function to work around issues that prevented compilation with the newer driver model. Signed-off-by: Bernhard Nortmann Acked-by: Joe Hershberger --- Changes in v3: None Changes in v2: - add "net:" prefix to commit message drivers/net/netcons

[U-Boot] [RESEND PATCH v3 1/5] net: expose eth_is_active() function to test network device state

2015-09-14 Thread Bernhard Nortmann
epts a device struct pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass --- Changes in v3: - use dev_get_uclass_priv() Changes in v2: None include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions(+), 1 delet

[U-Boot] [RESEND PATCH v3 0/5] fix NetConsole for CONFIG_DM_ETH

2015-09-14 Thread Bernhard Nortmann
s the introduction of DM_ETH, and I'm lacking other hardware to test CONFIG_NETCONSOLE with). Regards, B. Nortmann Changes in v3: - use dev_get_uclass_priv() Changes in v2: - add "net:" prefix to commit message - add "net:" prefix to commit message Bernhard Nortmann (5

[U-Boot] [RESEND PATCH v3 4/5] net: support NETCONSOLE option via Kconfig

2015-09-14 Thread Bernhard Nortmann
nsole might 'vanish' if they start to use CONFIG_NET or CONFIG_NETDEVICES. Signed-off-by: Bernhard Nortmann Acked-by: Joe Hershberger --- Changes in v3: None Changes in v2: None net/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/Kconfig b/net/Kconfig index 9

[U-Boot] [RESEND PATCH v3 5/5] sunxi: add NetConsole by default for Banana Pi/Pro

2015-09-14 Thread Bernhard Nortmann
all sunxi boards using CONFIG_SUNXI_[EG]MAC.) Signed-off-by: Bernhard Nortmann Acked-by: Joe Hershberger --- Changes in v3: None Changes in v2: None configs/Bananapi_defconfig | 3 ++- configs/Bananapro_defconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[U-Boot] [RESEND PATCH v3 3/5] net: avoid eth_unregister() call when function is unavailable

2015-09-14 Thread Bernhard Nortmann
unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- Changes in v3: None Changes in v2: - add "net:" prefix to commit message common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --gi

Re: [U-Boot] [PATCH v2 2/3] sunxi: retrieve FEL-provided values to environment variables

2015-09-17 Thread Bernhard Nortmann
Hi! Am 16.09.2015 um 03:00 schrieb Siarhei Siamashka: On Mon, 14 Sep 2015 15:15:29 +0200 Bernhard Nortmann wrote: This patch extends the misc_init_r() function on sunxi boards to test for the presence of a suitable "sunxi" SPL header. If found, and the loader ("fel" uti

[U-Boot] [PATCH v3 2/4] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant

2015-09-17 Thread Bernhard Nortmann
"pub_head_size" field. This can be used to reliably distinguish between compatible versions of sunxi SPL and anything else (older variants or Allwinner's boot0). Signed-off-by: Bernhard Nortmann --- Changes in v3: - adapted to use asm/arch/spl.h Changes in v2: - Rename

[U-Boot] [PATCH v3 1/4] sunxi: move SPL-related definitions to platform-specific include

2015-09-17 Thread Bernhard Nortmann
The sunxi platform currently doesn't seem to make any use of the asm/arch-sunxi/spl.h file. This patch moves some declarations from tools/mksunxiboot.c into it. This enables us to reuse those definitions when extending the sunxi board code (boards/sunxi/boards.c). Signed-off-by: Ber

[U-Boot] [PATCH v3 3/4] sunxi: retrieve FEL-provided values to environment variables

2015-09-17 Thread Bernhard Nortmann
oot process, allowing specific customizations for the "FEL boot" case. Signed-off-by: Bernhard Nortmann --- Changes in v3: - make use of asm/arch/spl.h to share definitions / helper macro - revert SPL version check to expect exact SPL_HEADER_VERSION Changes in v2: - renamed fel_data_addr to

[U-Boot] [PATCH v3 0/4] sunxi: support FEL-provided environment vars and "fel" boot target

2015-09-17 Thread Bernhard Nortmann
more verbose error messages - renamed fel_data_addr to fel_scriptaddr - combined both tests into one as suggested by Hans de Goede Bernhard Nortmann (4): sunxi: move SPL-related definitions to platform-specific include sunxi: (mksunxiboot) signature to indicate "sunxi" SPL varia

[U-Boot] [PATCH v3 4/4] sunxi: add "fel" boot target

2015-09-17 Thread Bernhard Nortmann
"false", causing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann Acked-by: Siarhei Siamashka --- Changes in v3: None Changes in v2: - renamed fel_data_addr to fel_scriptaddr - combined both tests into one as suggested by Hans de Goede inc

Re: [U-Boot] [PATCH v3 0/4] sunxi: support FEL-provided environment vars and "fel" boot target

2015-09-18 Thread Bernhard Nortmann
Hello Hans! Am 17.09.2015 um 23:48 schrieb Hans de Goede: Hi, Thanks, I've added these to my personal tree and will include it in a future pull-req. Regards, Hans Great. Thanks! Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http:

Re: [U-Boot] [PATCH v3 1/4] sunxi: move SPL-related definitions to platform-specific include

2015-09-18 Thread Bernhard Nortmann
Am 17.09.2015 um 18:52 schrieb Bernhard Nortmann: The sunxi platform currently doesn't seem to make any use of the asm/arch-sunxi/spl.h file. This patch moves some declarations from tools/mksunxiboot.c into it. This enables us to reuse those definitions when extending the sunxi board

[U-Boot] [PATCH] add CONFIG_SYS_64BIT_LBA

2015-06-10 Thread Bernhard Nortmann
>From c02e4e8d6f89889255f8f8ec78abc7f33faac3b5 Mon Sep 17 00:00:00 2001 From: Bernhard Nortmann Date: Wed, 10 Jun 2015 10:23:13 +0200 Subject: [PATCH] add CONFIG_SYS_64BIT_LBA Due to absence of CONFIG_SYS_64BIT_LBA, u-boot-sunxi currently has no support for the (GPT) partioning scheme of la

Re: [U-Boot] Please pull u-boot-sunxi master

2015-06-11 Thread Bernhard Nortmann
(The post to the ML was here: http://lists.denx.de/pipermail/u-boot/2015-June/216284.html) I've been asking around a bit on the issue on IRC in #linux-sunxi and #u-boot (and originally contacted Hans on this). The user "Kasreyn" brought the subject up on #linux-sunxi, reporting that his Banana Pi

Re: [U-Boot] [PATCH] mmc_write.c: Make mmc_berase do 32bit safe 64bit math

2015-06-12 Thread Bernhard Nortmann
4.8.3 armv7a-hardfloat-linux-gnueabi, on a Banana Pi = sun7i/A20). So I'll add a Tested-by: Bernhard Nortmann BTW: There's a small typo you also might want to fix: "The erase range would be change to " -> "The erase range would be changed to " Regards, B. Nortmann

[U-Boot] [RFC] sunxi: driver model breaks netconsole

2015-06-12 Thread Bernhard Nortmann
The switch to DM in http://git.denx.de/?p=u-boot.git;a=commit;h=b6006baf9c2553543e3384983d23d95efbf24fa6 causes u-boot compilation to fail when CONFIG_NETCONSOLE is enabled: CC common/bootm.o common/bootm.c: In function 'bootm_disable_interrupts': common/bootm.c:472:2: warning: implicit dec

Re: [U-Boot] d.bfd: error: /.../libgcc.a(_udivdi3.o) uses VFP register arguments, u-boot does not

2015-06-14 Thread Bernhard Nortmann
fabioca yahoo.com> writes: > I just cloned the repo (top commit: 64d16706a052553c85d2f8f4c741879a4e3e6116) > and run on a bananapi (armv7): > # make Bananapi_defconfig > # make > > The second command fails with errors like: > ld.bfd: error: > /usr/lib/gcc/armv7l-unknown-linux-gnueabihf/4.9.2/lib

Re: [U-Boot] FEL mode broken since

2015-07-01 Thread Bernhard Nortmann
Ian Campbell hellion.org.uk> writes: > > I would have expected this to become necessary at with "sunxi: Support > the FEL boot mode in the regular u-boot build" rather than at "sunxi: > Move all boards to the driver-model". > > Anyway, I'll try your suggested path tonight. I'm pretty certain th

[U-Boot] usb: hub enumeration and potential NULL ptr dereference in usb_device_info()

2016-06-22 Thread Bernhard Nortmann
Starting with commit b19236fd1c1ef289bab9e243ee5b50d658fcac3f I am observing a breakage of the "usb info" command on my BananaPi (Allwinner A20, sun7i), while "usb tree" and dm commands ("dm tree", "dm uclass") are fine. See attached usb-info-breakage.log Tracing back the error positon from pc an

Re: [U-Boot] usb: hub enumeration and potential NULL ptr dereference in usb_device_info()

2016-06-23 Thread Bernhard Nortmann
Hi Simon, thanks for replying! Am 23.06.2016 um 15:12 schrieb Simon Glass: Hi Benhard, On 22 June 2016 at 03:05, Bernhard Nortmann wrote: [...] I'm not sure why this particular problem didn't manifest earlier and only now became apparent with the change in SPL h

[U-Boot] [PATCH v1] dm: usb: Prevent NULL hub in usb_device_info()

2016-06-29 Thread Bernhard Nortmann
ailure can also be demonstrated with U-Boot's sandbox architecture, by simply enabling the inactive "usb_2" node in test.dts. This creates a similar situation, where the existing usb_device_info() implementation would crash (segfault) when issuing a "usb info" command. Sign

Re: [U-Boot] dm: usb: Prevent NULL hub in usb_device_info()

2016-07-03 Thread Bernhard Nortmann
bmit them officially. Ok I've just completed a battery of tests and these 2 look good, I'll submit them upstream right after this mail. Regards, Hans I can confirm that applying these two patches on top of 2016.07-rc3 solves the "usb info" problem I've been o

[U-Boot] [RFC PATCH 1/7] env: Allow unconditional access if H_PROGRAMMATIC is set

2016-07-11 Thread Bernhard Nortmann
ipts) is expected to be marked H_INTERACTIVE. Signed-off-by: Bernhard Nortmann --- common/env_flags.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/env_flags.c b/common/env_flags.c index 921d377..1087f4e 100644 --- a/common/env_flags.c +++ b/common/env_flags.c @@

[U-Boot] [RFC PATCH 0/7] "Transient" (= export-restricted) environment vars

2016-07-11 Thread Bernhard Nortmann
sn't a viable solution.) See also: http://lists.denx.de/pipermail/u-boot/2015-September/227611.html http://lists.denx.de/pipermail/u-boot/2016-April/250237.html Regards, B. Nortmann BTW: What the correct 'subsystem'/prefix for the "core" changes related to env vars? p

[U-Boot] [RFC PATCH 4/7] env: Introduce "transient" and "system" access flags

2016-07-11 Thread Bernhard Nortmann
"transient" (='t') is like "any", but requests that a variable should not be exported (ENV_FLAGS_VARACCESS_PREVENT_EXPORT). "system" (='S') is meant for 'internal' variables that aren't supposed to be changed by the user. It corr

[U-Boot] [RFC PATCH 2/7] net: dm: Ignore unknown env_op_* constants

2016-07-11 Thread Bernhard Nortmann
This prevents a possible compiler warning similar to "net/eth-uclass.c::: warning: enumeration value 'env_op_*' not handled in switch [-Wswitch]". Signed-off-by: Bernhard Nortmann --- net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/eth-uclass.

[U-Boot] [RFC PATCH 7/7] env: Automatically mark dynamic configuration info as "do not export"

2016-07-11 Thread Bernhard Nortmann
pdated via network configuration: BOOTP/DHCP (netboot_update_env), CDP (cdp_update_env) and link-local protocol (do_link_local). Signed-off-by: Bernhard Nortmann --- cmd/net.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/cmd/net.c b/cmd/n

[U-Boot] [RFC PATCH 3/7] env: Introduce "export" operation and (access flag) restriction

2016-07-11 Thread Bernhard Nortmann
env_print() is essentially an "export to text" operation. Signed-off-by: Bernhard Nortmann --- cmd/nvedit.c| 3 ++- common/env_flags.c | 8 +++- include/env_flags.h | 3 ++- include/search.h| 1 + lib/hashtable.c | 4 5 files changed, 16 insertions(+), 3 deleti

[U-Boot] [RFC PATCH 6/7] env: Introduce setenv_transient() helper function

2016-07-11 Thread Bernhard Nortmann
Like setenv(), but automatically marks the entry as "don't export". Signed-off-by: Bernhard Nortmann --- cmd/nvedit.c | 21 + include/common.h | 1 + 2 files changed, 22 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 88dbcb9..3c408f6 1

[U-Boot] [RFC PATCH 5/7] sunxi: env: flag fel_* environment vars as "system"

2016-07-11 Thread Bernhard Nortmann
ss flags, also enable the "env flags" command. Signed-off-by: Bernhard Nortmann --- include/configs/sunxi-common.h | 8 1 file changed, 8 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 94275a7..1b48cf2 100644 --- a/include/conf

Re: [U-Boot] [RFC PATCH 4/7] env: Introduce "transient" and "system" access flags

2016-07-11 Thread Bernhard Nortmann
Am 11.07.2016 um 20:14 schrieb Bernhard Nortmann: "transient" (='t') is like "any", but requests that a variable should not be exported (ENV_FLAGS_VARACCESS_PREVENT_EXPORT). "system" (='S') is meant for 'internal' variables that

Re: [U-Boot] [RFC PATCH 3/7] env: Introduce "export" operation and (access flag) restriction

2016-07-12 Thread Bernhard Nortmann
Am 11.07.2016 um 20:14 schrieb Bernhard Nortmann: This patch introduces a new "export" environment operation (env_op_export) and the corresponding access flag ENV_FLAGS_VARACCESS_PREVENT_EXPORT; so that env_flags_validate() may now check requests to export specific variables. In turn,

Re: [U-Boot] [RFC PATCH 2/7] net: dm: Ignore unknown env_op_* constants

2016-07-15 Thread Bernhard Nortmann
Hi Simon! Am 15.07.2016 um 05:19 schrieb Simon Glass: [...] Presumably hitting the default would be an internal error. So in that case there is no point in returning an error, I think, and what you have is best. Regards, Simon It's not pretty, but a "catch all" solution. The alternative is t

[U-Boot] [PATCH v2] sunxi: Increase SPL header size to 64 bytes to avoid code corruption

2016-05-16 Thread Bernhard Nortmann
Given that there now are quite a few additional "reserved" entries, and while we're still at SPL_HEADER_VERSION 1, I'd like to renew my request of dedicating one of these fields to the script length - which would enable us to set the U-Boot ${filesize} accordingly. i.e. --- arch-arm-include-as

Re: [U-Boot] [RFC] sunxi: Store the device tree name in the SPL header

2016-06-03 Thread Bernhard Nortmann
Am 02.06.2016 um 12:32 schrieb Siarhei Siamashka: This patch updates the mksunxiboot tool to optionally add the default device tree name string to the SPL header. This information can be used by the firmware upgrade tools to protect users from harming themselves by trying to upgrade to an incompa

Re: [U-Boot] [PATCH v2] sunxi: Increase SPL header size to 64 bytes to avoid code corruption

2016-06-03 Thread Bernhard Nortmann
Am 02.06.2016 um 16:57 schrieb Siarhei Siamashka: On Mon, 16 May 2016 19:52:33 +0200 Hans de Goede wrote: [...] Other then that worry, I see no problem with adding a fel_script_length, Siarhei what is your opinion on this ? I personally have no objections. Does it make sense if I submit a

[U-Boot] [PATCH] sunxi: Add the ability to pass (script) filesize in the SPL header

2016-06-04 Thread Bernhard Nortmann
pt_addr} ${filesize}" on them. Signed-off-by: Bernhard Nortmann --- arch/arm/include/asm/arch-sunxi/spl.h | 3 ++- board/sunxi/board.c | 8 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-sunxi/spl.h b/arch/arm/include/asm/ar

Re: [U-Boot] [PATCH] sunxi: Add the ability to pass (script) filesize in the SPL header

2016-06-05 Thread Bernhard Nortmann
Hi Siarhei! Am 05.06.2016 um 13:44 schrieb Siarhei Siamashka: Hello Bernhard, [...] How does this work in general with "boot.scr" and "uEnv.txt" use cases? Could you provide a bit more detailed description? I mean, who is going to do "import -t ${fel_script_addr} ${filesize}" invocation? This

Re: [U-Boot] [PATCH] sunxi: Add the ability to pass (script) filesize in the SPL header

2016-06-07 Thread Bernhard Nortmann
Hello Siarhei! Am 06.06.2016 um 11:20 schrieb Siarhei Siamashka: On Sun, 5 Jun 2016 15:01:30 +0200 Bernhard Nortmann wrote: Hi Siarhei! [...] No, you're right and not missing anything. Setting ${filesize} alone doesn't achieve much, and would require further customization to do

[U-Boot] [PATCH v2] sunxi: Add the ability to recognize and auto-import uEnv-style data

2016-06-08 Thread Bernhard Nortmann
attempt to autoboot - specifically, this also allows overriding "bootcmd". With fel_script_addr set and a zero fel_uEnv_length, U-Boot is safe to assume that data in .scr format (a mkimage-type script) was passed at fel_script_addr, and will handle it using the existing mechanism ("boot

Re: [U-Boot] [PATCH v2] sunxi: Add the ability to recognize and auto-import uEnv-style data

2016-06-08 Thread Bernhard Nortmann
Hi Hans! Am 08.06.2016 um 22:13 schrieb Hans de Goede: Hi, [...] This patch looks good to me. Siarhei any comments from your side ? If not then I'll add this to u-boot-sunxi/next. Regards, Hans Thanks for looking into it. One small thing I only noticed after posting the patch: The last "re

[U-Boot] [PATCH v3] sunxi: FEL - Add the ability to recognize and auto-import uEnv-style data

2016-06-08 Thread Bernhard Nortmann
attempt to autoboot - specifically, this also allows overriding "bootcmd". With fel_script_addr set and a zero fel_uEnv_length, U-Boot is safe to assume that data in .scr format (a mkimage-type script) was passed at fel_script_addr, and will handle it using the existing mechanism ("boot

[U-Boot] [RFC] setenv() and variable flags, especially "read-only"

2016-04-01 Thread Bernhard Nortmann
Hi everybody! I'm wondering what the correct / official way of setting a "read-only" environment variable is. It's simple enough to declare some #define CONFIG_ENV_FLAGS_LIST_STATIC "myvar:sr" to begin with, but this backfires - i.e. prevents write access - as soon as I try to set a value pr

Re: [U-Boot] [U-Boot,v4,04/21] ehci-hcd: Add init_after_reset

2016-04-03 Thread Bernhard Nortmann
Commit 3f9f8a5b83f8aec40c9f4ee496046a695e333c45 breaks U-Boot on Banana Pi (tested using FEL mode): --- snip --- U-Boot SPL 2016.03-00612-g3f9f8a5 (Apr 03 2016 - 12:53:35) DRAM: 1024 MiB CPU: 91200Hz, AXI/AHB/APB: 3/2/2 Trying to boot from U-Boot 2016.03-00612-g3f9f8a5 (Apr 03 2016 - 12:53

Re: [U-Boot] [PATCH] usb: ehci-hcd: Fix crash when no ops are provided to ehci_register()

2016-04-03 Thread Bernhard Nortmann
onfirmed working for Banana Pi, both on top of 3f9f8a5 and when applied to current master (563d8d9). Tested-by: Bernhard Nortmann Regards, B. Nortmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

[U-Boot] [PATCH][PATCH] sunxi: Properly announce BOOT_DEVICE_BOARD as "FEL"

2016-04-03 Thread Bernhard Nortmann
This addresses a cosmetic issue when booting a sunxi device over USB (FEL mode), where the SPL currently would just print "Trying to boot from ". The patch fixes that to properly read "Trying to boot from FEL". Signed-off-by: Bernhard Nortmann --- arch/arm/mach-sunxi/boar

[U-Boot] [RFC PATCH v2 2/7] net: dm: Ignore unknown env_op_* constants

2016-11-16 Thread Bernhard Nortmann
This prevents a possible compiler warning similar to "net/eth-uclass.c::: warning: enumeration value 'env_op_*' not handled in switch [-Wswitch]". Signed-off-by: Bernhard Nortmann Reviewed-by: Simon Glass --- Changes in v2: - Add "Reviewed-by" sjg net/eth-ucla

[U-Boot] [RFC PATCH v2 7/7] env: Automatically mark dynamic configuration info as "do not export"

2016-11-16 Thread Bernhard Nortmann
pdated via network configuration: BOOTP/DHCP (netboot_update_env), CDP (cdp_update_env) and link-local protocol (do_link_local). Signed-off-by: Bernhard Nortmann --- Changes in v2: None cmd/net.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff -

[U-Boot] [RFC PATCH v2 5/7] sunxi: env: flag fel_* environment vars as "system"

2016-11-16 Thread Bernhard Nortmann
ss flags, also enable the "env flags" command. Signed-off-by: Bernhard Nortmann --- Changes in v2: None include/configs/sunxi-common.h | 8 1 file changed, 8 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 8363414..2a7cf86 100

[U-Boot] [RFC PATCH v2 4/7] env: Introduce "transient" and "system" access flags

2016-11-16 Thread Bernhard Nortmann
"transient" (='t') is like "any", but requests that a variable should not be exported (ENV_FLAGS_VARACCESS_PREVENT_EXPORT). "system" (='S') is meant for 'internal' variables that aren't supposed to be changed by the user. It corr

[U-Boot] [RFC PATCH v2 6/7] env: Introduce setenv_transient() helper function

2016-11-16 Thread Bernhard Nortmann
Like setenv(), but automatically marks the entry as "don't export". Signed-off-by: Bernhard Nortmann --- Changes in v2: None cmd/nvedit.c | 21 + include/common.h | 1 + 2 files changed, 22 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 9

[U-Boot] [RFC PATCH v2 3/7] env: Introduce "export" operation and (access flag) restriction

2016-11-16 Thread Bernhard Nortmann
env_print() is essentially an "export to text" operation. Signed-off-by: Bernhard Nortmann --- Changes in v2: - Removed too narrow (flag & H_FORCE) expression, use "flag" directly cmd/nvedit.c| 3 ++- common/env_flags.c | 8 +++- include/env_flags.h | 3 +

[U-Boot] [RFC PATCH v2 1/7] env: Allow unconditional access if H_PROGRAMMATIC is set

2016-11-16 Thread Bernhard Nortmann
ipts) is expected to be marked H_INTERACTIVE. Signed-off-by: Bernhard Nortmann --- Changes in v2: None common/env_flags.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/env_flags.c b/common/env_flags.c index 921d377..1087f4e 100644 --- a/common/env_flags.c +++ b/common/env_flag

[U-Boot] [RFC PATCH v2 0/7] "Transient" (= export-restricted) environment vars

2016-11-16 Thread Bernhard Nortmann
t/2010-June/073031.html Regards, B. Nortmann Changes in v2: - Add "Reviewed-by" sjg - Removed too narrow (flag & H_FORCE) expression, use "flag" directly - Fixed outdated "env_flags_varaccess_lock" to the correct "env_flags_varaccess_system" Bernhard N

Re: [U-Boot] [RFC PATCH v2 4/7] env: Introduce "transient" and "system" access flags

2016-11-22 Thread Bernhard Nortmann
Hi Simon! Am 19.11.2016 um 14:47 schrieb Simon Glass: Hi Bernhard, On 16 November 2016 at 03:29, Bernhard Nortmann wrote: "transient" (='t') is like "any", but requests that a variable should not be exported (ENV_FLAGS_VARACCESS_PREVENT_EXPORT). "sy

Re: [U-Boot] [RFC PATCH v2 6/7] env: Introduce setenv_transient() helper function

2016-11-22 Thread Bernhard Nortmann
Hi Simon! Am 19.11.2016 um 14:47 schrieb Simon Glass: Hi Bernhard, On 16 November 2016 at 03:30, Bernhard Nortmann wrote: Like setenv(), but automatically marks the entry as "don't export". Signed-off-by: Bernhard Nortmann --- Changes in v2: None cmd/nv

Re: [U-Boot] [RFC PATCH v2 7/7] env: Automatically mark dynamic configuration info as "do not export"

2016-11-22 Thread Bernhard Nortmann
Hi Simon! Am 19.11.2016 um 14:47 schrieb Simon Glass: Hi Bernhard, On 16 November 2016 at 03:30, Bernhard Nortmann wrote: This is an attempt to prevent such information from ending up in exported environment data, especially when doing "saveenv". (http://lists.denx.de/pipermail/u

Re: [U-Boot] [RFC PATCH v2 4/7] env: Introduce "transient" and "system" access flags

2016-11-25 Thread Bernhard Nortmann
With that added to the series, do you think this has matured enough to promote it from "RFC" to an actual PATCH when submitting v3? Regards, B. Nortmann From f0cae5d87bcf9366786367976a71b908ee9f2410 Mon Sep 17 00:00:00 2001 From: Bernhard Nortmann Date: Wed, 23 Nov 2016 10:50:16 +010

Re: [U-Boot] [RFC PATCH v2 4/7] env: Introduce "transient" and "system" access flags

2016-11-30 Thread Bernhard Nortmann
Hi Joe! Thanks for chiming in, especially seeing that you have previously worked on something very similar. Am 27.11.2016 um 19:53 schrieb Joe Hershberger: On Wed, Nov 16, 2016 at 4:29 AM, Bernhard Nortmann wrote: "transient" (='t') is like "any", but requests

Re: [U-Boot] [linux-sunxi] Problems to Allwinner H3's eFUSE/SID

2016-12-20 Thread Bernhard Nortmann
Hi all! This is rather interesting stuff. Actually it's possible to find partial documentation for this method (of reading SID/efuse values) even for older SoCs. There's an early version of the A20 User Manual (Revision 1.0 - Feb. 18, 2013) available on the net, where chapter 1.18 describes the r

Re: [U-Boot] [linux-sunxi] Problems to Allwinner H3's eFUSE/SID

2016-12-21 Thread Bernhard Nortmann
Side note: Am 19.12.2016 um 16:22 schrieb Icenowy Zheng: [...] According to some facts: - The register based access to SID is weird: it needs ~5 register operations per word of SID. [...] My experiments seem to indicate that Allwinner's implementation might be overly complicated. I have u

  1   2   >