
Hi Eric,
On 05/09/2017 15:49, Eric Nelson wrote:
Hi Stefano,
On 09/05/2017 04:16 AM, Stefano Babic wrote:
Hi Stefan, On 05/09/2017 03:21, Stefan Agner wrote:
From: Stefan Agner stefan.agner@toradex.com
This macro allows to detect whether the boot ROM initialized USB already (serial downloader). This is helpful to reliably detect if the system has been recovered via USB serial downloader.
Signed-off-by: Stefan Agner stefan.agner@toradex.com Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Hi Stefano,
I noted already in my initial post that detection of serial downloader mode is somewhat brittle: https://lists.denx.de/pipermail/u-boot/2017-August/301952.html
This came up quite fast now also for other boards: https://www.mail-archive.com/u-boot@lists.denx.de/msg262234.html
We use this patches since quite some time. Also NXP uses this detection method to start their mfgr tools...
Then it seems to be an "undocumented feature" rather a hack.
This patch only detects that the OTG PHY is active, so it's not really a hack.
Agree.
The next patch uses this to infer how it happened (booted using SDP), and since I don't think there's another way for that to happen, it also seems to be reasonable.
Right. It is absolutely reasonable.
Can you think of another way that the OTG PHY could be alive when the code is hit in SPL?
No, I can't - nothing that makes sense ;-)
... A comment to that effect is probably in order though.
Please advise,
Regards, Stefano