RFC Bootmode override on i.MX6
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ARM i.MX6: Add bootmode setting codearch/ arch/ arch/ +2 more | +156 | 0 replies | |
| 2/2 | commands: add bootmode commandcommands/ commands/ commands/ +2 more | +157 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] Bootmode override on i.MX6
The i.MX6 boot rom copies parts of the (persistent across reset) GPR9 register into SMBR1 if the GPR10[28] bit is set.
This allows to override the boot mode bits which are otherwise sampled from fuses or gpios, and can be used to temporarily (until the next power cycle) boot from a different device.
This patchset adds a bootmode command that conveniently writes to the GPR9/10 registers to tell the boot rom from which device to boot.
Example:
<power-on reset, boot ROM loads barebox from mmc3 as fused> # bootmode -l
mmc2
* mmc3
# barebox_update -t mmc2 /path/to/barebox.img
# bootmode mmc2
# reset
<boot ROM loads untested barebox from mmc2>
# barebox_update -t mmc3 /path/to/barebox.img <either power cycle, or>
# bootmode mmc3 ; reset
<boot ROM loads tested barebox from mmc3>
Philipp Zabel (2):
ARM i.MX6: Add bootmode setting code
commands: add bootmode command
arch/arm/mach-imx/boot.c | 75 ++++++++++++++++ arch/arm/mach-imx/imx6.c | 2 + arch/arm/mach-imx/include/mach/generic.h | 6 ++ commands/Kconfig | 9 ++ commands/Makefile | 1 + commands/bootmode.c | 143 +++++++++++++++++++++++++++++++ common/Kconfig | 3 + common/Makefile | 1 + common/bootmode.c | 39 +++++++++ include/bootmode.h | 34 ++++++++ 10 files changed, 313 insertions(+) create mode 100644 commands/bootmode.c create mode 100644 common/bootmode.c create mode 100644 include/bootmode.h
The SBMR1 override using GPR9/10 is based on the U-Boot rsmode patch by Troy Kisky:
http://lists.denx.de/pipermail/u-boot/2012-May/125283.html
Tested on GK802 and BD-SL with mmc and spi nor flash.
I chose to use device names as parameter to the bootmode command, but I'm unsure about that. Maybe reusing the bbu target name list would be better for consistency?
regards
Philipp
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox