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

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

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 <bernhard.nortm...@web.de> wrote: "transient" (='t') is like &qu

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 <bernhard.nortm...@web.de> Date: Wed, 2

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 <bernhard.nortm...@web.de> wrote: This is an attempt to prevent such information from ending up in exported environment data, especially when doing "save

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 <bernhard.nortm...@web.de> wrote: Like setenv(), but automatically marks the entry as "don't export". Signed-off-by: Bernhard Nortmann <bernhard.nortm...@w

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 <bernhard.nortm...@web.de> wrote: "transient" (='t') is like "any", but requests that a variable should not be exported (ENV_FLAGS_VARACCESS_PREVE

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

2016-11-16 Thread Bernhard Nortmann
031.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 Nortmann (7):

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

2016-11-16 Thread Bernhard Nortmann
scripts) is expected to be marked H_INTERACTIVE. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- 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/commo

[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 <bernhard.nortm...@web.de> --- Changes in v2: - Removed too narrow (flag & H_FORCE) expression, use "flag" directly cmd/nvedit.c| 3 ++- common/env_flags.c | 8 ++

[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 corresponds to "transient" pl

[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 <bernhard.nortm...@web.de> --- Changes in v2: None cmd/nvedit.c | 21 + include/common.h | 1 + 2 files changed, 22 insertions(+) diff --git a/cm

[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 <bernhard.nortm...@web.de> --- 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

[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 <bernhard.nortm...@web.de> --- Changes in v2: None cmd/net.c | 34 +- 1 file changed, 17 i

[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 <bernhard.nortm...@web.de> Reviewed-by: Simon Glass <s...@chromium.org> --- Changes in v2: -

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

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 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 aren't supposed to be chang

[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 <bernhard.nortm...@web.de> --- 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 94275

[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 <bernhard.nortm...@web.de> --- cmd/nvedit.c| 3 ++- common/env_flags.c | 8 +++- include/env_flags.h | 3 ++- include/search.h| 1 + lib/hashtable.c | 4 5 files ch

[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 <bernhard.nortm...@web.de> --- cmd/nvedit.c | 21 + include/common.h | 1 + 2 files changed, 22 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit

[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 <bernhard.nortm...@web.de> --- cmd/net.c | 34 +- 1 file changed, 17 insertions(+), 17 deletion

[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 corresponds to "transient" pl

[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 <bernhard.nortm...@web.de> --- net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff

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

2016-07-11 Thread Bernhard Nortmann
ble 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? patman isn't happy with my

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

2016-07-11 Thread Bernhard Nortmann
scripts) is expected to be marked H_INTERACTIVE. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- 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/co

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

2016-07-03 Thread Bernhard Nortmann
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 observing with sun7i-a20.

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

2016-06-29 Thread Bernhard Nortmann
e 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. Si

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 <bernhard.nortm...@web.de> wrote: [...] I'm not sure why this particular problem didn't manifest earlier and only now became apparent with the change

[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

[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

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

[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] 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 <bernhard.nortm...@web.de> wrote: Hi Siarhei! [...] No, you're right and not missing anything. Setting ${filesize} alone doesn't achieve much, and would require f

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?

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

2016-06-04 Thread Bernhard Nortmann
} ${filesize}" on them. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- 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

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

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

[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. ---

[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 <bernhard.nortm...@web.de>

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

2016-04-03 Thread Bernhard Nortmann
ateusz.kulikow...@gmail.com> >--- Confirmed working for Banana Pi, both on top of 3f9f8a5 and when applied to current master (563d8d9). Tested-by: Bernhard Nortmann <bernhard.nortm...@web.de> Regards, B. Nortmann ___ U-Boot mailing list U-

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 -

[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

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

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 code

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 <bernhard.nortm...@web.de> 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

[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 <bernhard.nortm...@web.de> --- 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

[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: Bernhard

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

2015-09-17 Thread Bernhard Nortmann
enamed 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 variant sunxi: retrieve FEL-provided v

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

2015-09-17 Thread Bernhard Nortmann
quot;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 <bernhard.nortm...@web.de> --- Changes in v3: - adapted to use asm/arch/spl.h Chang

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

2015-09-17 Thread Bernhard Nortmann
ausing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> Acked-by: Siarhei Siamashka <siarhei.siamas...@gmail.com> --- Changes in v3: None Changes in v2: - renamed fel_data_addr to fel_scriptaddr - combined both

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

2015-09-14 Thread Bernhard Nortmann
_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 environment variables sunxi:

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

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

2015-09-14 Thread Bernhard Nortmann
quot;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 <bernhard.nortm...@web.de> --- Changes in v2: - Rename field to fel_script_address,

[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 <bernhard.nortm...@web.de> --- 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 f

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

2015-09-14 Thread Bernhard Nortmann
ausing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- 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] [RESEND PATCH v3 3/5] net: avoid eth_unregister() call when function is unavailable

2015-09-14 Thread Bernhard Nortmann
to unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> Reviewed-by: Simon Glass <s...@chromium.org> Acked-by: Joe Hershberger <joe.hershber...@ni.com> --- Changes in v3: None Changes in v2: - add "net:" prefi

[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 <bernhard.nortm...@web.de> Acked-by: Joe Hershberger <joe.hershber...@ni.com> --- Changes in v3: None Changes in v2: None configs/Bananapi_defconfig | 3 ++- configs/Bananapro_defconfig | 3 ++- 2 files

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

2015-09-14 Thread Bernhard Nortmann
pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> Reviewed-by: Simon Glass <s...@chromium.org> --- Changes in v3: - use dev_get_uclass_priv() Changes in v2: None include/net.h | 6 ++ net/eth.c | 18 +- 2 f

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

2015-09-14 Thread Bernhard Nortmann
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): net:

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

2015-09-14 Thread Bernhard Nortmann
might 'vanish' if they start to use CONFIG_NET or CONFIG_NETDEVICES. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> Acked-by: Joe Hershberger <joe.hershber...@ni.com> --- Changes in v3: None Changes in v2: None net/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff

[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 <bernhard.nortm...@web.de> Acked-by: Joe Hershberger <joe.hershber...@ni.com> --- Changes in v3: None Changes in v2: - add &

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

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

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:

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

2015-09-03 Thread Bernhard Nortmann
lowing specific customizations for the "FEL boot" case. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- board/sunxi/board.c | 59 + 1 file changed, 59 insertions(+) diff --git a/board/sunxi/board.c b/board/sunxi/boa

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

2015-09-03 Thread Bernhard Nortmann
ausing "distro_bootcmd" to proceed with the next boot target. Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de> --- include/configs/sunxi-common.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-commo

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

2015-09-03 Thread Bernhard Nortmann
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 ++ include/conf

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 <bernhard.nortm...@web.de> 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 scr

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

2015-09-02 Thread Bernhard Nortmann
quot;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 <bernhard.nortm...@web.de> --- tools/mksunxiboot.c | 27 ++-

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

2015-09-01 Thread Bernhard Nortmann
nyway... 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:21, schrieb Simon Glass: >>> Hi Bernard, >>> >>> [...] >>> If

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

2015-08-26 Thread Bernhard Nortmann
pointer and tests it for ETH_STATE_ACTIVE. Series-changes: 3 - use dev_get_uclass_priv() Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de Reviewed-by: Simon Glass s...@chromium.org --- include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions(+), 1

[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 bernhard.nortm...@web.de --- Changes in v2: - add net: prefix to commit message drivers/net/netconsole.c | 14 +++--- 1 file

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

2015-08-26 Thread Bernhard Nortmann
pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de Reviewed-by: Simon Glass s...@chromium.org --- Changes in v2: - add net: prefix to commit message include/net.h | 6 ++ net/eth.c | 18 +- 2 files changed, 23 insertions

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

2015-08-26 Thread Bernhard Nortmann
might 'vanish' if they start to use CONFIG_NET or CONFIG_NETDEVICES. Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de --- 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

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

2015-08-26 Thread Bernhard Nortmann
boards using CONFIG_SUNXI_[EG]MAC.) Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de --- 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

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

2015-08-26 Thread Bernhard Nortmann
to unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de Reviewed-by: Simon Glass s...@chromium.org --- 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

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

2015-08-26 Thread Bernhard Nortmann
- 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 function is unavailable net: support NETCONSOLE

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 sure

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 s...@chromium.org 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

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] [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 s...@chromium.org Right. Kconfig wasn't on my agenda, but I agree that it should go in there. Unfortunately this points out

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.

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

2015-08-22 Thread Bernhard Nortmann
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 | 23 +++ include

[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 bernhard.nortm...@web.de

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

2015-08-21 Thread Bernhard Nortmann
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 bernhard.nortm...@web.de --- drivers/misc

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

2015-08-21 Thread Bernhard Nortmann
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 bernhard.nortm...@web.de --- common/board_r.c | 9

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

2015-08-21 Thread Bernhard Nortmann
to unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de --- 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

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

2015-08-21 Thread Bernhard Nortmann
pointer and tests it for ETH_STATE_ACTIVE. Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de --- 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

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

2015-08-21 Thread Bernhard Nortmann
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 netconsole when CONFIG_DM_ETH

[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 bernhard.nortm...@web.de --- drivers/net/netconsole.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

Re: [U-Boot] FEL mode broken since

2015-07-01 Thread Bernhard Nortmann
Ian Campbell ijc+uboot at 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

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 fabio_cannizzo at 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:

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

2015-06-12 Thread Bernhard Nortmann
, on a Banana Pi = sun7i/A20). So I'll add a Tested-by: Bernhard Nortmann bernhard.nortm...@web.de 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

[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

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

[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 bernhard.nortm...@web.de 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

[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).

[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