mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM
Subsystems (6)
PATCH v3 1/1 mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM
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.
---
Documentation/arm/SH-Mobile/Makefile | 8 + Documentation/arm/SH-Mobile/vrl4.c | 167 +++++++++++++++++++++ Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt | 29 +++ arch/arm/Kconfig | 12 + arch/arm/boot/compressed/Makefile | 13 + arch/arm/boot/compressed/head-shmobile.S | 31 +++ arch/arm/boot/compressed/mmcif-sh7372.c | 87 ++++++++++ arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h | 29 +++ arch/arm/mach-shmobile/include/mach/mmcif.h | 16 ++ 9 files changed, 391 insertions(+), 1 deletion(-)
This patch depends on:
* "ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM" which has been merged into the devel branch of Russell King's linux-2.6-arm tree.
* "mmc, sh: Move MMCIF_PROGRESS_* into sh_mmcif.h"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
* "mmc, sh: Remove sh_mmcif_boot_slurp()"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
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
arch/arm/boot/compressed/mmcif-sh7372.c new file +87 -0
@@ -0,0 +1,87 @@ +/* +* sh7372 MMCIF loader +* +* Copyright (C) 2010 Magnus Damm +* Copyright (C) 2010 Simon Horman +* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ + +#include <linux/mmc/sh_mmcif.h> +#include <mach/mmcif.h> + +#define MMCIF_BASE (void __iomem *)0xe6bd0000 + +#define PORT84CR 0xe6050054 +#define PORT85CR 0xe6050055 +#define PORT86CR 0xe6050056 +#define PORT87CR 0xe6050057 +#define PORT88CR 0xe6050058 +#define PORT89CR 0xe6050059 +#define PORT90CR 0xe605005a +#define PORT91CR 0xe605005b +#define PORT92CR 0xe605005c +#define PORT99CR 0xe6050063 + +#define SMSTPCR3 0xe615013c + +/* SH7372 specific MMCIF loader +* +* loads the zImage from an MMC card starting from block 1. +* +* The image must be start with a vrl4 header and +* the zImage must start at offset 512 of the image. That is, +* at block 2 (=byte 1024) on the media +* +* Use the following line to write the vrl4 formated zImage +* to an MMC card +* # dd if=vrl4.out of=/dev/sdx bs=512 seek=1 +*/ +asmlinkage void mmcif_loader(unsigned char *buf, unsigned long len) +{ +mmcif_init_progress (); +mmcif_update_progress (MMCIF_PROGRESS_ENTER ); + +/* Initialise MMC +* registers: PORT84CR-PORT92CR +* (MMCD0_0-MMCD0_7,MMCCMD0 Control) +* value: 0x04 - select function 4 +*/ +__raw_writeb (0x04 ,PORT84CR ); +__raw_writeb (0x04 ,PORT85CR ); +__raw_writeb (0x04 ,PORT86CR ); +__raw_writeb (0x04 ,PORT87CR ); +__raw_writeb (0x04 ,PORT88CR ); +__raw_writeb (0x04 ,PORT89CR ); +__raw_writeb (0x04 ,PORT90CR ); +__raw_writeb (0x04 ,PORT91CR ); +__raw_writeb (0x04 ,PORT92CR ); + +/* Initialise MMC +* registers: PORT99CR (MMCCLK0 Control) +* value: 0x10 | 0x04 - enable output | select function 4 +*/ +__raw_writeb (0x14 ,PORT99CR ); + +/* Enable clock to MMC hardware block */ +__raw_writel (__raw_readl (SMSTPCR3 ) & ~(1 <<12 ),SMSTPCR3 ); + +mmcif_update_progress (MMCIF_PROGRESS_INIT ); + +/* setup MMCIF hardware */ +sh_mmcif_boot_init (MMCIF_BASE ); + +mmcif_update_progress (MMCIF_PROGRESS_LOAD ); + +/* load kernel via MMCIF interface */ +sh_mmcif_boot_do_read (MMCIF_BASE ,2 ,/* Kernel is@block 2 */ + (len +SH_MMCIF_BBS -1 ) /SH_MMCIF_BBS , buf); + + +/* Disable clock to MMC hardware block */ +__raw_writel (__raw_readl (SMSTPCR3 ) & (1 <<12 ),SMSTPCR3 ); + +mmcif_update_progress (MMCIF_PROGRESS_DONE ); +}
arch/arm/boot/compressed/Makefile +12 -1
@@ -4,9 +4,20 @@ # create a compressed vmlinuz image from the original vmlinux # +OBJS = + +# Ensure that mmcif loader code appears early in the image +# to minimise that number of bocks that have to be read in +# order to load it. +ifeq ($(CONFIG_ZBOOT_ROM_MMCIF),y) +ifeq ($(CONFIG_ARCH_SH7372),y) +OBJS += mmcif-sh7372.o +endif +endif + AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) HEAD = head.o -OBJS = misc.o decompress.o +OBJS += misc.o decompress.o FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c #
arch/arm/boot/compressed/head-shmobile.S +31 -0
@@ -25,6 +25,37 @@ /* load board-specific initialization code */ #include <mach/zboot.h> +#ifdef CONFIG_ZBOOT_ROM_MMCIF + /* Load image from MMC */ + adr sp, __tmp_stack + add sp, sp, #128 + ldr r0, __image_start + ldr r1, __image_end + subs r1, r1, r0 + ldr r0, __load_base + mov lr, pc + b mmcif_loader + + /* Jump to loaded code */ + ldr r0, __loaded + ldr r1, __image_start + sub r0, r0, r1 + ldr r1, __load_base + add pc, r0, r1 + +__image_start: + .long _start +__image_end: + .long _got_end +__load_base: + .long CONFIG_MEMORY_START + 0x02000000 @ Load at 32Mb into SDRAM +__loaded: + .long __loaded + .align +__tmp_stack: + .space 128 +#endif /* CONFIG_ZBOOT_ROM_MMCIF */ + b 1f __atags:@ tag #1 .long 12 @ tag->hdr.size = tag_size(tag_core);
arch/arm/Kconfig +12 -0
@@ -1587,6 +1587,18 @@ config ZBOOT_ROM Say Y here if you intend to execute your compressed kernel image (zImage) directly from ROM or flash. If unsure, say N. +config ZBOOT_ROM_MMCIF + bool "Include MMCIF loader in zImage (EXPERIMENTAL)" + depends on ZBOOT_ROM && ARCH_SH7372 && EXPERIMENTAL + help + Say Y here to include experimental MMCIF loading code in the + ROM-able zImage. With this enabled it is possible to write the + the ROM-able zImage kernel image to an MMC card and boot the + kernel straight from the reset vector. At reset the processor + Mask ROM will load the first part of the the ROM-able zImage + which in turn loads the rest the kernel image to RAM using the + MMCIF hardware block. + config CMDLINE string "Default kernel command string" default ""
arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h new file +29 -0
@@ -0,0 +1,29 @@ +#ifndef MMCIF_AP4EB_H +#define MMCIF_AP4EB_H + +#define PORT185CR 0xe60520b9 +#define PORT186CR 0xe60520ba +#define PORT187CR 0xe60520bb +#define PORT188CR 0xe60520bc + +#define PORTR191_160DR 0xe6056014 + +static inline void mmcif_init_progress (void ) +{ +/* Initialise LEDS1-4 +* registers: PORT185CR-PORT188CR (LED1-LED4 Control) +* value: 0x10 - enable output +*/ +__raw_writeb (0x10 ,PORT185CR ); +__raw_writeb (0x10 ,PORT186CR ); +__raw_writeb (0x10 ,PORT187CR ); +__raw_writeb (0x10 ,PORT188CR ); +} + +static inline void mmcif_update_progress (int n) +{ +__raw_writel ((__raw_readl (PORTR191_160DR ) & ~(0xf <<25 )) | + (1 << (25 + n)),PORTR191_160DR ); +} + +#endif /* MMCIF_AP4EB_H */
arch/arm/mach-shmobile/include/mach/mmcif.h new file +16 -0
@@ -0,0 +1,16 @@ +#ifndef MMCIF_H +#define MMCIF_H + +/************************************************** +* +* board specific settings +* +**************************************************/ + +#ifdef CONFIG_MACH_AP4EVB +#include "mach/mmcif-ap4eb.h" +#else +#error "unsupported board." +#endif + +#endif /* MMCIF_H */
Documentation/arm/SH-Mobile/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +BIN := vrl4 + +.PHONY: all +all: $(BIN) + +.PHONY: clean +clean: + rm -f *.o $(BIN)
Documentation/arm/SH-Mobile/vrl4.c new file +167 -0
167 lines not on this page · raw message
Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt new file +29 -0
@@ -0,0 +1,29 @@ +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@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.
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
When CONFIG_ZBOOT_ROM is selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.
Compile tested only.
This patch assumes that head-mackerel.txt will be the same as head-ap4evb.txt. I am waiting for verification of this.
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* MACH_MACKEREL (3211) being present in arch/arm/tools/mach-types
v2:
* Use head-mackerel.txt for Mackerel.
head-ap4evb.txt was used by mistake.
v3:
* Actually make the change to use head-mackerel.txt
--- .../mach-shmobile/include/mach/head-mackerel.txt | 87 ++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/zboot.h | 3 + 2 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-shmobile/include/mach/head-mackerel.txt
arch/arm/mach-shmobile/include/mach/head-mackerel.txt new file +87 -0
@@ -0,0 +1,87 @@ +LIST "partner-jet-setup.txt" +LIST "(C) Copyright 2010 Renesas Solutions Corp" +LIST "Kuninori Morimoto <[email protected]>" + +LIST "RWT Setting" +EW 0xE6020004, 0xA500 +EW 0xE6030004, 0xA500 + +DD 0x01001000, 0x01001000 + +LIST "GPIO Setting" +EB 0xE6051013, 0xA2 + +LIST "CPG" +ED 0xE6150080, 0x00000180 +ED 0xE61500C0, 0x00000002 + +WAIT 1, 0xFE40009C + +LIST "FRQCR" +ED 0xE6150000, 0x2D1305C3 +ED 0xE61500E0, 0x9E40358E +ED 0xE6150004, 0x80331050 + +WAIT 1, 0xFE40009C + +ED 0xE61500E4, 0x00002000 + +WAIT 1, 0xFE40009C + +LIST "PLL" +ED 0xE6150028, 0x00004000 + +WAIT 1, 0xFE40009C + +ED 0xE615002C, 0x93000040 + +WAIT 1, 0xFE40009C + +LIST "BSC" +ED 0xFEC10000, 0x00E0001B + +LIST "SBSC1" +ED 0xFE400354, 0x01AD8000 +ED 0xFE400354, 0x01AD8001 + +WAIT 5, 0xFE40009C + +ED 0xFE400008, 0xBCC90151 +ED 0xFE400040, 0x41774113 +ED 0xFE400044, 0x2712E229 +ED 0xFE400048, 0x20C18505 +ED 0xFE40004C, 0x00110209 +ED 0xFE400010, 0x00000087 + +WAIT 10, 0xFE40009C + +ED 0xFE400084, 0x0000003F +EB 0xFE500000, 0x00 + +WAIT 5, 0xFE40009C + +ED 0xFE400084, 0x0000FF0A +EB 0xFE500000, 0x00 + +WAIT 1, 0xFE40009C + +ED 0xFE400084, 0x00002201 +EB 0xFE500000, 0x00 +ED 0xFE400084, 0x00000302 +EB 0xFE500000, 0x00 +EB 0xFE5C0000, 0x00 +ED 0xFE400008, 0xBCC90159 +ED 0xFE40008C, 0x88800004 +ED 0xFE400094, 0x00000004 +ED 0xFE400028, 0xA55A0032 +ED 0xFE40002C, 0xA55A000C +ED 0xFE400020, 0xA55A2048 +ED 0xFE400008, 0xBCC90959 + +LIST "Change CPGA setting" +ED 0xE61500E0, 0x9E40352E +ED 0xE6150004, 0x80331050 + +WAIT 1, 0xFE40009C + +ED 0xE6150354, 0x00000002
arch/arm/mach-shmobile/include/mach/zboot.h +3 -0
@@ -13,6 +13,9 @@#ifdef CONFIG_MACH_AP4EVB #define MACH_TYPE MACH_TYPE_AP4EVB#include "mach/head-ap4evb.txt" +#elif CONFIG_MACH_MACKEREL +#define MACH_TYPE MACH_TYPE_MACKEREL +#include "mach/head-mackerel.txt" #else #error "unsupported board."#endif
Signature · 1 line
1.7.2.3
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
Quoted 4 lines · Simon Horman
When
CONFIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.Compile tested only.
I now have access to a Mackerel board and have verified that this patch works.
My verification method was to usa a hack; I removed the SDRAM initialisation portion of head-mackerel.txt and then booting the resulting zImage from uboot using:
=> bootp
=> go 0x42000000
This is the same method that I used to test the AP4 variant of this change.
Morimoto-san, could you test this by burning an image (without the above hack) to Flash? I can provide an image or tree if that helps.
Quoted 25 lines
This patch assumes that head-mackerel.txt will be the same as head-ap4evb.txt. I am waiting for verification of this.
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
*MACH_MACKEREL(3211) being present inarch/arm/tools/mach-typesv2:
* Use head-mackerel.txt for Mackerel.
head-ap4evb.txt was used by mistake.v3:
* Actually make the change to use head-mackerel.txtCc Magnus Damm <[email protected]>Cc Kuninori Morimoto <[email protected]>--- .../mach-shmobile/include/mach/head-mackerel.txt | 87 ++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/zboot.h | 3 + 2 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-shmobile/include/mach/head-mackerel.txt
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
Quoted 13 lines · Simon Horman
Quoted 4 lines · Simon Horman
When
CONFIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.Compile tested only.
I now have access to a Mackerel board and have verified that this patch works.
My verification method was to usa a hack; I removed the SDRAM initialisation portion of head-mackerel.txt and then booting the resulting zImage from uboot using:
Quoted 7 lines
=> bootp
=> go0x42000000This is the same method that I used to test the AP4 variant of this change.
Morimoto-san, could you test this by burning an image (without the above hack) to Flash? I can provide an image or tree if that helps.
I have now verified the .txt file by booting from the MMCIF hardware block using "[PATCH] rfc v1: ARM: mach-shmobile: mackerel: Add zboot MMCIF support".
Paul, I think that it should be pretty safe to merge both this patch and the "... MMCIF support" patch into your tree from a feature point of view. I'm unsure what you want to do about dependencies.
Quoted 30 lines
Quoted 17 lines
This patch assumes that head-mackerel.txt will be the same as head-ap4evb.txt. I am waiting for verification of this.
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
*MACH_MACKEREL(3211) being present inarch/arm/tools/mach-typesv2:
* Use head-mackerel.txt for Mackerel.
head-ap4evb.txt was used by mistake.v3:
* Actually make the change to use head-mackerel.txtQuoted 8 lines
Cc Magnus Damm <[email protected]>Cc Kuninori Morimoto <[email protected]>--- .../mach-shmobile/include/mach/head-mackerel.txt | 87 ++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/zboot.h | 3 + 2 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-shmobile/include/mach/head-mackerel.txt--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
Quoted 22 lines · Simon Horman
Quoted 13 lines · Simon Horman
Quoted 4 lines · Simon Horman
When
CONFIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.Compile tested only.
I now have access to a Mackerel board and have verified that this patch works.
My verification method was to usa a hack; I removed the SDRAM initialisation portion of head-mackerel.txt and then booting the resulting zImage from uboot using:
Quoted 7 lines
=> bootp
=> go0x42000000This is the same method that I used to test the AP4 variant of this change.
Morimoto-san, could you test this by burning an image (without the above hack) to Flash? I can provide an image or tree if that helps.
Quoted 7 lines
I have now verified the .txt file by booting from the MMCIF hardware block using "[PATCH] rfc v1: ARM: mach-shmobile: mackerel: Add zboot MMCIF support".
Paul, I think that it should be pretty safe to merge both this patch and the "... MMCIF support" patch into your tree from a feature point of view. I'm unsure what you want to do about dependencies.
Actually, the LED code in "rfc v1: ARM: mach-shmobile: mackerel: Add zboot MMCIF support" is bogus - I can see that now that I have a mackerel to test. I will post a fixed version shortly.
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
In reply to Simon HormanQuoted 8 lines · Simon Horman
When
CONFIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.Compile tested only.
This patch assumes that head-mackerel.txt will be the same as head-ap4evb.txt. I am waiting for verification of this.
Quoted 7 lines
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
*MACH_MACKEREL(3211) being present inarch/arm/tools/mach-types
Ok, I've applied this one now that the dependencies are out of the way.
I plan to send my rmobile updates to Linus today, at which point you should be able to submit the outstanding MMCIF patch to Russell's patch tracker.
PATCH 1/1 rfc v3: ARM: mach-shmobile: mackerel: Add zboot support
Quoted 16 lines · Paul Mundt
Quoted 8 lines · Simon Horman
When
CONFIG_ZBOOT_ROMis selected, the resulting zImage file will be small boot loader and may be burned to rom or flash.Compile tested only.
This patch assumes that head-mackerel.txt will be the same as head-ap4evb.txt. I am waiting for verification of this.
Quoted 7 lines
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
*MACH_MACKEREL(3211) being present inarch/arm/tools/mach-types
Quoted 5 lines
Ok, I've applied this one now that the dependencies are out of the way.
I plan to send my rmobile updates to Linus today, at which point you should be able to submit the outstanding MMCIF patch to Russell's patch tracker.
Thanks
PATCH 1/1 rfc v1: ARM: mach-shmobile: mackerel: Add zboot MMCIF support
Hi Magnus, Hi Morimoto-san, I wonder if this might be sufficient to get MMCIF zboot working on mackerel.
This patch depends on
* ARM: 6515/1: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM (merged into the devel branch of Russel King's linux-2.6-arm tree)
* MACH_MACKEREL (3211) being present in arch/arm/tools/mach-types
* ARM: mach-shmobile: mackerel: Add zboot support
* rfc v3: mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM, which depends on
* mmc, sh: Remove sh_mmcif_boot_slurp()
(merged into the common/mmcif branch of Paul Mundt's sh-2.6 tree)
* sh, mmc: Use defines when setting CE_CLK_CTRL
(merged into the common/mmcif branch of Paul Mundt's sh-2.6 tree)
* mmc, sh: Move MMCIF_PROGRESS_* into sh_mmcif.h
(merged into the common/mmcif branch of Paul Mundt's sh-2.6 tree)
--- .../mach-shmobile/include/mach/mmcif-mackerel.h | 29 ++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/mmcif.h | 2 + 2 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h
arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h new file +29 -0
@@ -0,0 +1,29 @@ +#ifndef MMCIF_MACKEREL_H +#define MMCIF_MACKEREL_H + +#define PORT0CR 0xe6051001 +#define PORT1CR 0xe6051002 +#define PORT2CR 0xe6051003 +#define PORT3CR 0xe6051004 + +#define PORTR031_000DR 0xe6055000 + +static inline void mmcif_init_progress (void ) +{ +/* Initialise LEDS0-3 +* registers: PORT0CR-PORT1CR (LED0-LED3 Control) +* value: 0x10 - enable output +*/ +__raw_writeb (0x10 ,PORT0CR ); +__raw_writeb (0x10 ,PORT1CR ); +__raw_writeb (0x10 ,PORT2CR ); +__raw_writeb (0x10 ,PORT3CR ); +} + +static inline void mmcif_update_progress (int n) +{ +__raw_writel ((__raw_readl (PORTR031_000DR ) &0xf ) | + (1 << n),PORTR031_000DR ); +} + +#endif /* MMCIF_MACKEREL_H */
arch/arm/mach-shmobile/include/mach/mmcif.h +2 -0
@@ -9,6 +9,8 @@#ifdef CONFIG_MACH_AP4EVB #include "mach/mmcif-ap4eb.h" +#elif CONFIG_MACH_MACKEREL +#include "mach/mmcif-mackerel.h" #else #error "unsupported board."#endif
Signature · 1 line
1.7.2.3
PATCH v3 1/1 mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM
Quoted 11 lines · Simon Horman
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.
Quoted 10 lines
This patch depends on:
* "ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM" which has been merged into the devel branch of Russell King's linux-2.6-arm tree.
* "mmc, sh: Move MMCIF_PROGRESS_* intosh_mmcif.h"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
* "mmc, sh: Removesh_mmcif_boot_slurp()"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
This one at least should go through Russell's tree. The dependencies from my side will be sorted out early in the merge window, so you should be able to submit this to Russell's patch tracker after that for a late -rc1 merge, or for -rc2. After that's done, there don't seem to be any more outstanding dependencies, so at that point I'll be able to take care of the remaining patches.
PATCH v3 1/1 mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM
Quoted 23 lines · Paul Mundt
Quoted 11 lines · Simon Horman
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.
Quoted 10 lines
This patch depends on:
* "ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM" which has been merged into the devel branch of Russell King's linux-2.6-arm tree.
* "mmc, sh: Move MMCIF_PROGRESS_* intosh_mmcif.h"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
* "mmc, sh: Removesh_mmcif_boot_slurp()"
which has been merged into the common/mmcif branch of
Paul Mundt's sh-2.6 tree
Quoted 6 lines
This one at least should go through Russell's tree. The dependencies from my side will be sorted out early in the merge window, so you should be able to submit this to Russell's patch tracker after that for a late -rc1 merge, or for -rc2. After that's done, there don't seem to be any more outstanding dependencies, so at that point I'll be able to take care of the remaining patches.
Thanks, will do. I agree that Russell's tree is appropriate for this change.