mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 03:50:54 +07:00
f45b114991
This allows a ROM-able zImage to be written to MMC and for SuperH Mobile ARM to boot directly from the MMCIF hardware block. This is achieved by the MaskROM loading the first portion of the image into MERAM and then jumping to it. This portion contains loader code which copies the entire image to SDRAM and jumps to it. From there the zImage boot code proceeds as normal, uncompressing the image into its final location and then jumping to it. Cc: Magnus Damm <magnus.damm@gmail.com> Russell, please consider merging this for 2.6.38. This patch depends on: * "mmc, sh: Move MMCIF_PROGRESS_* into sh_mmcif.h" which will be merged though Paul Mundt's rmobile sh-2.6. The absence of this patch will break the build if the (new) CONFIG_ZBOOT_ROM_MMCIF option is set. There are no subtle side-effects. v2: Addressed comments by Magnus Damm * Fix copyright in vrl4.c * Fix use of #define CONFIG_ZBOOT_ROM_MMCIF in mmcif-sh7372.c * Initialise LED GPIO lines in head-ap4evb.txt instead of mmcif-sh7372.c as this is considered board-specific. v3: Addressed comments made in person by Magnus Damm * Move mmcif_loader to be earlier in the image and reduce the number of blocks of boot program loaded by the MaskRom from 40 to 8 accordingly. * Move LED GPIO initialisation into mmcif_progress_init - This leaves the partner jet script unbloated Other * inline mmcif_update_progress so it is a static inline in a header file v4: * Use htole16() and htole32() in v4rl.c to ensure that the output is little endian v5: Addressed comments by Russell King * Simplify assembly code * Jump to code rather than an address <- bug fix * Use (void __iomem *) as appropriate Roll in mackerel support * This was previously a separate patch, only because of the order in which this code was developed Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
ROM-able zImage boot from MMC
|
|
-----------------------------
|
|
|
|
An ROM-able zImage compiled with ZBOOT_ROM_MMCIF may be written to MMC and
|
|
SuperH Mobile ARM will to boot directly from the MMCIF hardware block.
|
|
|
|
This is achieved by the mask ROM loading the first portion of the image into
|
|
MERAM and then jumping to it. This portion contains loader code which
|
|
copies the entire image to SDRAM and jumps to it. From there the zImage
|
|
boot code proceeds as normal, uncompressing the image into its final
|
|
location and then jumping to it.
|
|
|
|
This code has been tested on an AP4EB board using the developer 1A eMMC
|
|
boot mode which is configured using the following jumper settings.
|
|
The board used for testing required a patched mask ROM in order for
|
|
this mode to function.
|
|
|
|
8 7 6 5 4 3 2 1
|
|
x|x|x|x|x| |x|
|
|
S4 -+-+-+-+-+-+-+-
|
|
| | | | |x| |x on
|
|
|
|
The zImage must be written to the MMC card at sector 1 (512 bytes) in
|
|
vrl4 format. A utility vrl4 is supplied to accomplish this.
|
|
|
|
e.g.
|
|
vrl4 < zImage | dd of=/dev/sdX bs=512 seek=1
|
|
|
|
A dual-voltage MMC 4.0 card was used for testing.
|