From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/8] ARM: i.MX53 loco: Switch to imximage
Date: Sun, 23 Jun 2013 23:05:28 +0200 [thread overview]
Message-ID: <1372021534-25470-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1372021534-25470-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/freescale-mx53-loco/Makefile | 4 +-
arch/arm/boards/freescale-mx53-loco/board.c | 7 ++-
arch/arm/boards/freescale-mx53-loco/dcd-data.h | 54 ----------------------
| 54 ++++++++++++++++++++++
| 52 ---------------------
arch/arm/mach-imx/Kconfig | 1 +
6 files changed, 60 insertions(+), 112 deletions(-)
delete mode 100644 arch/arm/boards/freescale-mx53-loco/dcd-data.h
create mode 100644 arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg
delete mode 100644 arch/arm/boards/freescale-mx53-loco/flash_header.c
diff --git a/arch/arm/boards/freescale-mx53-loco/Makefile b/arch/arm/boards/freescale-mx53-loco/Makefile
index d44f697..f1baae2 100644
--- a/arch/arm/boards/freescale-mx53-loco/Makefile
+++ b/arch/arm/boards/freescale-mx53-loco/Makefile
@@ -1,3 +1,3 @@
-obj-y += board.o
-lwl-y += flash_header.o
+obj-y += board.o flash-header.o
+extra-y += flash-header.S flash-header.dcd
lwl-y += lowlevel.o
diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index e041de6..82ff2d1 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -170,9 +170,7 @@ static void loco_ehci_init(void)
add_generic_usb_ehci_device(1, MX53_OTG_BASE_ADDR + 0x200, NULL);
}
-#define DCD_NAME static struct imx_dcd_v2_entry dcd_entry
-
-#include "dcd-data.h"
+extern char flash_header_start[], flash_header_end[];
static int loco_devices_init(void)
{
@@ -194,7 +192,8 @@ static int loco_devices_init(void)
armlinux_set_architecture(MACH_TYPE_MX53_LOCO);
imx53_bbu_internal_mmc_register_handler("mmc", "/dev/disk0",
- BBU_HANDLER_FLAG_DEFAULT, dcd_entry, sizeof(dcd_entry), 0);
+ BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_start,
+ flash_header_end - flash_header_start, 0);
return 0;
}
diff --git a/arch/arm/boards/freescale-mx53-loco/dcd-data.h b/arch/arm/boards/freescale-mx53-loco/dcd-data.h
deleted file mode 100644
index 9f95fb4..0000000
--- a/arch/arm/boards/freescale-mx53-loco/dcd-data.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-DCD_NAME[] = {
- { .addr = cpu_to_be32(0x53fa8554), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8558), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8560), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8564), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8568), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8570), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8574), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8578), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa857c), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8580), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8584), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8588), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8590), .val = cpu_to_be32(0x00300040), },
- { .addr = cpu_to_be32(0x53fa8594), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa86f0), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa86f4), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa86fc), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8714), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8718), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa871c), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8720), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa8724), .val = cpu_to_be32(0x04000000), },
- { .addr = cpu_to_be32(0x53fa8728), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x53fa872c), .val = cpu_to_be32(0x00300000), },
- { .addr = cpu_to_be32(0x63fd9088), .val = cpu_to_be32(0x35343535), },
- { .addr = cpu_to_be32(0x63fd9090), .val = cpu_to_be32(0x4d444c44), },
- { .addr = cpu_to_be32(0x63fd907c), .val = cpu_to_be32(0x01370138), },
- { .addr = cpu_to_be32(0x63fd9080), .val = cpu_to_be32(0x013b013c), },
- { .addr = cpu_to_be32(0x63fd9018), .val = cpu_to_be32(0x00011740), },
- { .addr = cpu_to_be32(0x63fd9000), .val = cpu_to_be32(0xc3190000), },
- { .addr = cpu_to_be32(0x63fd900c), .val = cpu_to_be32(0x9f5152e3), },
- { .addr = cpu_to_be32(0x63fd9010), .val = cpu_to_be32(0xb68e8a63), },
- { .addr = cpu_to_be32(0x63fd9014), .val = cpu_to_be32(0x01ff00db), },
- { .addr = cpu_to_be32(0x63fd902c), .val = cpu_to_be32(0x000026d2), },
- { .addr = cpu_to_be32(0x63fd9030), .val = cpu_to_be32(0x009f0e21), },
- { .addr = cpu_to_be32(0x63fd9008), .val = cpu_to_be32(0x12273030), },
- { .addr = cpu_to_be32(0x63fd9004), .val = cpu_to_be32(0x0002002d), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008032), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008033), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00028031), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x052080b0), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008040), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0000803a), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0000803b), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00028039), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x05208138), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008048), },
- { .addr = cpu_to_be32(0x63fd9020), .val = cpu_to_be32(0x00005800), },
- { .addr = cpu_to_be32(0x63fd9040), .val = cpu_to_be32(0x04b80003), },
- { .addr = cpu_to_be32(0x63fd9058), .val = cpu_to_be32(0x00022227), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), },
-};
diff --git a/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg b/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg
new file mode 100644
index 0000000..95bcd19
--- /dev/null
+++ b/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg
@@ -0,0 +1,54 @@
+loadaddr 0x70000000
+soc imx53
+dcdofs 0x400
+wm 32 0x53fa8554 0x00300000
+wm 32 0x53fa8558 0x00300040
+wm 32 0x53fa8560 0x00300000
+wm 32 0x53fa8564 0x00300040
+wm 32 0x53fa8568 0x00300040
+wm 32 0x53fa8570 0x00300000
+wm 32 0x53fa8574 0x00300000
+wm 32 0x53fa8578 0x00300000
+wm 32 0x53fa857c 0x00300040
+wm 32 0x53fa8580 0x00300040
+wm 32 0x53fa8584 0x00300000
+wm 32 0x53fa8588 0x00300000
+wm 32 0x53fa8590 0x00300040
+wm 32 0x53fa8594 0x00300000
+wm 32 0x53fa86f0 0x00300000
+wm 32 0x53fa86f4 0x00000000
+wm 32 0x53fa86fc 0x00000000
+wm 32 0x53fa8714 0x00000000
+wm 32 0x53fa8718 0x00300000
+wm 32 0x53fa871c 0x00300000
+wm 32 0x53fa8720 0x00300000
+wm 32 0x53fa8724 0x04000000
+wm 32 0x53fa8728 0x00300000
+wm 32 0x53fa872c 0x00300000
+wm 32 0x63fd9088 0x35343535
+wm 32 0x63fd9090 0x4d444c44
+wm 32 0x63fd907c 0x01370138
+wm 32 0x63fd9080 0x013b013c
+wm 32 0x63fd9018 0x00011740
+wm 32 0x63fd9000 0xc3190000
+wm 32 0x63fd900c 0x9f5152e3
+wm 32 0x63fd9010 0xb68e8a63
+wm 32 0x63fd9014 0x01ff00db
+wm 32 0x63fd902c 0x000026d2
+wm 32 0x63fd9030 0x009f0e21
+wm 32 0x63fd9008 0x12273030
+wm 32 0x63fd9004 0x0002002d
+wm 32 0x63fd901c 0x00008032
+wm 32 0x63fd901c 0x00008033
+wm 32 0x63fd901c 0x00028031
+wm 32 0x63fd901c 0x052080b0
+wm 32 0x63fd901c 0x04008040
+wm 32 0x63fd901c 0x0000803a
+wm 32 0x63fd901c 0x0000803b
+wm 32 0x63fd901c 0x00028039
+wm 32 0x63fd901c 0x05208138
+wm 32 0x63fd901c 0x04008048
+wm 32 0x63fd9020 0x00005800
+wm 32 0x63fd9040 0x04b80003
+wm 32 0x63fd9058 0x00022227
+wm 32 0x63fd901c 0x00000000
diff --git a/arch/arm/boards/freescale-mx53-loco/flash_header.c b/arch/arm/boards/freescale-mx53-loco/flash_header.c
deleted file mode 100644
index dc1162b..0000000
--- a/arch/arm/boards/freescale-mx53-loco/flash_header.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2011 Marc Kleine-Budde <mkl@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <common.h>
-#include <asm/byteorder.h>
-#include <mach/imx-flash-header.h>
-#include <asm/barebox-arm-head.h>
-
-void __naked __flash_header_start go(void)
-{
- barebox_arm_head();
-}
-
-#define DCD_NAME struct imx_dcd_v2_entry __dcd_entry_section dcd_entry
-
-#include "dcd-data.h"
-
-#define APP_DEST 0x70000000
-
-struct imx_flash_header_v2 __flash_header_section flash_header = {
- .header.tag = IVT_HEADER_TAG,
- .header.length = cpu_to_be16(32),
- .header.version = IVT_VERSION,
-
- .entry = APP_DEST + 0x1000,
- .dcd_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, dcd),
- .boot_data_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, boot_data),
- .self = APP_DEST + 0x400,
-
- .boot_data.start = APP_DEST,
- .boot_data.size = DCD_BAREBOX_SIZE,
-
- .dcd.header.tag = DCD_HEADER_TAG,
- .dcd.header.length = cpu_to_be16(sizeof(struct imx_dcd) + sizeof(dcd_entry)),
- .dcd.header.version = DCD_VERSION,
-
- .dcd.command.tag = DCD_COMMAND_WRITE_TAG,
- .dcd.command.length = cpu_to_be16(sizeof(struct imx_dcd_command) + sizeof(dcd_entry)),
- .dcd.command.param = DCD_COMMAND_WRITE_PARAM,
-};
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index b7282bb..1269a08 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -474,6 +474,7 @@ choice
config MACH_FREESCALE_MX53_LOCO
select HAVE_DEFAULT_ENVIRONMENT_NEW
+ select ARCH_IMX_INTERNAL_BOOT_USE_IMXIMAGE
bool "Freescale i.MX53 LOCO"
config MACH_FREESCALE_MX53_SMD
--
1.8.3.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-06-23 21:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 21:05 [PATCH 1/8] ARM: i.MX53 SMD: " Sascha Hauer
2013-06-23 21:05 ` Sascha Hauer [this message]
2013-06-23 21:05 ` [PATCH 3/8] ARM: i.MX6 sabrelite: " Sascha Hauer
2013-06-23 21:05 ` [PATCH 4/8] ARM: i.MX6 sabresd: " Sascha Hauer
2013-06-23 21:05 ` [PATCH 5/8] ARM: i.MX51 Efika SB: " Sascha Hauer
2013-06-23 21:05 ` [PATCH 6/8] ARM: i.MX51 ccxmx51: " Sascha Hauer
2013-06-23 21:05 ` [PATCH 7/8] ARM: i.MX51 karo-tx51: " Sascha Hauer
2013-06-23 21:05 ` [PATCH 8/8] ARM: i.MX51 vincell: " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372021534-25470-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox