* [PATCH 3/5] ARM i.MX51 babbage: register MMC update handler
2012-10-15 13:15 [PATCH] barebox in-system update infrastructure Sascha Hauer
2012-10-15 13:15 ` [PATCH 1/5] Add in-system barebox " Sascha Hauer
2012-10-15 13:15 ` [PATCH 2/5] ARM i.MX: Add barebox update handler for internal boot Sascha Hauer
@ 2012-10-15 13:15 ` Sascha Hauer
2012-10-15 13:15 ` [PATCH 4/5] ARM i.MX53 loco: " Sascha Hauer
2012-10-15 13:15 ` [PATCH 5/5] ARM i.MX53 tx53: register MMC and NAND " Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-10-15 13:15 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/freescale-mx51-pdk/board.c | 9 +++
arch/arm/boards/freescale-mx51-pdk/dcd-data.h | 60 ++++++++++++++++++++
| 61 +--------------------
3 files changed, 72 insertions(+), 58 deletions(-)
create mode 100644 arch/arm/boards/freescale-mx51-pdk/dcd-data.h
diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
index 0adceac..9db0ed9 100644
--- a/arch/arm/boards/freescale-mx51-pdk/board.c
+++ b/arch/arm/boards/freescale-mx51-pdk/board.c
@@ -25,6 +25,7 @@
#include <partition.h>
#include <fs.h>
#include <fcntl.h>
+#include <mach/bbu.h>
#include <nand.h>
#include <notifier.h>
#include <spi/spi.h>
@@ -39,6 +40,7 @@
#include <mach/devices-imx51.h>
#include <mach/revision.h>
#include <mach/iim.h>
+#include <mach/imx-flash-header.h>
static struct fec_platform_data fec_info = {
.xcv_type = MII100,
@@ -235,6 +237,10 @@ static void babbage_power_init(void)
mdelay(50);
}
+#define DCD_NAME static struct imx_dcd_entry dcd_entry
+
+#include "dcd-data.h"
+
static int f3s_devices_init(void)
{
spi_register_board_info(mx51_babbage_spi_board_info,
@@ -255,6 +261,9 @@ static int f3s_devices_init(void)
armlinux_set_bootparams((void *)0x90000100);
armlinux_set_architecture(MACH_TYPE_MX51_BABBAGE);
+ imx51_bbu_internal_mmc_register_handler("mmc", "/dev/disk0",
+ BBU_HANDLER_FLAG_DEFAULT, dcd_entry, sizeof(dcd_entry));
+
return 0;
}
diff --git a/arch/arm/boards/freescale-mx51-pdk/dcd-data.h b/arch/arm/boards/freescale-mx51-pdk/dcd-data.h
new file mode 100644
index 0000000..4dd6c0d
--- /dev/null
+++ b/arch/arm/boards/freescale-mx51-pdk/dcd-data.h
@@ -0,0 +1,60 @@
+
+DCD_NAME[] = {
+ { .ptr_type = 4, .addr = 0x73fa88a0, .val = 0x00000200, },
+ { .ptr_type = 4, .addr = 0x73fa850c, .val = 0x000020c5, },
+ { .ptr_type = 4, .addr = 0x73fa8510, .val = 0x000020c5, },
+ { .ptr_type = 4, .addr = 0x73fa883c, .val = 0x00000002, },
+ { .ptr_type = 4, .addr = 0x73fa8848, .val = 0x00000002, },
+ { .ptr_type = 4, .addr = 0x73fa84b8, .val = 0x000000e7, },
+ { .ptr_type = 4, .addr = 0x73fa84bc, .val = 0x00000045, },
+ { .ptr_type = 4, .addr = 0x73fa84c0, .val = 0x00000045, },
+ { .ptr_type = 4, .addr = 0x73fa84c4, .val = 0x00000045, },
+ { .ptr_type = 4, .addr = 0x73fa84c8, .val = 0x00000045, },
+ { .ptr_type = 4, .addr = 0x73fa8820, .val = 0x00000000, },
+ { .ptr_type = 4, .addr = 0x73fa84a4, .val = 0x00000003, },
+ { .ptr_type = 4, .addr = 0x73fa84a8, .val = 0x00000003, },
+ { .ptr_type = 4, .addr = 0x73fa84ac, .val = 0x000000e3, },
+ { .ptr_type = 4, .addr = 0x73fa84b0, .val = 0x000000e3, },
+ { .ptr_type = 4, .addr = 0x73fa84b4, .val = 0x000000e3, },
+ { .ptr_type = 4, .addr = 0x73fa84cc, .val = 0x000000e3, },
+ { .ptr_type = 4, .addr = 0x73fa84d0, .val = 0x000000e2, },
+ { .ptr_type = 4, .addr = 0x73fa882c, .val = 0x00000004, },
+ { .ptr_type = 4, .addr = 0x73fa88a4, .val = 0x00000004, },
+ { .ptr_type = 4, .addr = 0x73fa88ac, .val = 0x00000004, },
+ { .ptr_type = 4, .addr = 0x73fa88b8, .val = 0x00000004, },
+ { .ptr_type = 4, .addr = 0x83fd9000, .val = 0x82a20000, },
+ { .ptr_type = 4, .addr = 0x83fd9008, .val = 0x82a20000, },
+ { .ptr_type = 4, .addr = 0x83fd9010, .val = 0x000ad0d0, },
+ { .ptr_type = 4, .addr = 0x83fd9004, .val = 0x3f3584ab, },
+ { .ptr_type = 4, .addr = 0x83fd900c, .val = 0x3f3584ab, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801a, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801b, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00448019, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x07328018, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x06328018, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x03808019, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00408019, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008000, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801e, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801f, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801d, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0732801c, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0632801c, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0380801d, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0040801d, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008004, },
+ { .ptr_type = 4, .addr = 0x83fd9000, .val = 0xb2a20000, },
+ { .ptr_type = 4, .addr = 0x83fd9008, .val = 0xb2a20000, },
+ { .ptr_type = 4, .addr = 0x83fd9010, .val = 0x000ad6d0, },
+ { .ptr_type = 4, .addr = 0x83fd9034, .val = 0x90000000, },
+ { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00000000, },
+};
+
--git a/arch/arm/boards/freescale-mx51-pdk/flash_header.c b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
index c148eea..f3f1e4b 100644
--- a/arch/arm/boards/freescale-mx51-pdk/flash_header.c
+++ b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
@@ -7,64 +7,9 @@ void __naked __flash_header_start go(void)
barebox_arm_head();
}
-struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
- { .ptr_type = 4, .addr = 0x73fa88a0, .val = 0x00000200, },
- { .ptr_type = 4, .addr = 0x73fa850c, .val = 0x000020c5, },
- { .ptr_type = 4, .addr = 0x73fa8510, .val = 0x000020c5, },
- { .ptr_type = 4, .addr = 0x73fa883c, .val = 0x00000002, },
- { .ptr_type = 4, .addr = 0x73fa8848, .val = 0x00000002, },
- { .ptr_type = 4, .addr = 0x73fa84b8, .val = 0x000000e7, },
- { .ptr_type = 4, .addr = 0x73fa84bc, .val = 0x00000045, },
- { .ptr_type = 4, .addr = 0x73fa84c0, .val = 0x00000045, },
- { .ptr_type = 4, .addr = 0x73fa84c4, .val = 0x00000045, },
- { .ptr_type = 4, .addr = 0x73fa84c8, .val = 0x00000045, },
- { .ptr_type = 4, .addr = 0x73fa8820, .val = 0x00000000, },
- { .ptr_type = 4, .addr = 0x73fa84a4, .val = 0x00000003, },
- { .ptr_type = 4, .addr = 0x73fa84a8, .val = 0x00000003, },
- { .ptr_type = 4, .addr = 0x73fa84ac, .val = 0x000000e3, },
- { .ptr_type = 4, .addr = 0x73fa84b0, .val = 0x000000e3, },
- { .ptr_type = 4, .addr = 0x73fa84b4, .val = 0x000000e3, },
- { .ptr_type = 4, .addr = 0x73fa84cc, .val = 0x000000e3, },
- { .ptr_type = 4, .addr = 0x73fa84d0, .val = 0x000000e2, },
- { .ptr_type = 4, .addr = 0x73fa882c, .val = 0x00000004, },
- { .ptr_type = 4, .addr = 0x73fa88a4, .val = 0x00000004, },
- { .ptr_type = 4, .addr = 0x73fa88ac, .val = 0x00000004, },
- { .ptr_type = 4, .addr = 0x73fa88b8, .val = 0x00000004, },
- { .ptr_type = 4, .addr = 0x83fd9000, .val = 0x82a20000, },
- { .ptr_type = 4, .addr = 0x83fd9008, .val = 0x82a20000, },
- { .ptr_type = 4, .addr = 0x83fd9010, .val = 0x000ad0d0, },
- { .ptr_type = 4, .addr = 0x83fd9004, .val = 0x3f3584ab, },
- { .ptr_type = 4, .addr = 0x83fd900c, .val = 0x3f3584ab, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801a, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801b, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00448019, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x07328018, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x06328018, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x03808019, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00408019, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008000, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801e, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801f, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801d, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0732801c, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0632801c, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0380801d, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0040801d, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008004, },
- { .ptr_type = 4, .addr = 0x83fd9000, .val = 0xb2a20000, },
- { .ptr_type = 4, .addr = 0x83fd9008, .val = 0xb2a20000, },
- { .ptr_type = 4, .addr = 0x83fd9010, .val = 0x000ad6d0, },
- { .ptr_type = 4, .addr = 0x83fd9034, .val = 0x90000000, },
- { .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00000000, },
-};
+#define DCD_NAME struct imx_dcd_entry __dcd_entry_section dcd_entry
+
+#include "dcd-data.h"
#define APP_DEST 0x90000000
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/5] ARM i.MX53 loco: register MMC update handler
2012-10-15 13:15 [PATCH] barebox in-system update infrastructure Sascha Hauer
` (2 preceding siblings ...)
2012-10-15 13:15 ` [PATCH 3/5] ARM i.MX51 babbage: register MMC update handler Sascha Hauer
@ 2012-10-15 13:15 ` Sascha Hauer
2012-10-15 13:15 ` [PATCH 5/5] ARM i.MX53 tx53: register MMC and NAND " Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-10-15 13:15 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/freescale-mx53-loco/board.c | 9 ++++
arch/arm/boards/freescale-mx53-loco/dcd-data.h | 54 +++++++++++++++++++
| 56 ++------------------
3 files changed, 66 insertions(+), 53 deletions(-)
create mode 100644 arch/arm/boards/freescale-mx53-loco/dcd-data.h
diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index 0678e0a..45c05c2 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -36,6 +36,8 @@
#include <mach/iim.h>
#include <mach/imx5.h>
#include <mach/revision.h>
+#include <mach/bbu.h>
+#include <mach/imx-flash-header.h>
#include <i2c/i2c.h>
#include <mfd/mc34708.h>
@@ -177,6 +179,10 @@ 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"
+
static int loco_devices_init(void)
{
@@ -197,6 +203,9 @@ static int loco_devices_init(void)
armlinux_set_bootparams((void *)0x70000100);
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));
+
return 0;
}
diff --git a/arch/arm/boards/freescale-mx53-loco/dcd-data.h b/arch/arm/boards/freescale-mx53-loco/dcd-data.h
new file mode 100644
index 0000000..9f95fb4
--- /dev/null
+++ b/arch/arm/boards/freescale-mx53-loco/dcd-data.h
@@ -0,0 +1,54 @@
+
+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), },
+};
--git a/arch/arm/boards/freescale-mx53-loco/flash_header.c b/arch/arm/boards/freescale-mx53-loco/flash_header.c
index c2ab255..dc1162b 100644
--- a/arch/arm/boards/freescale-mx53-loco/flash_header.c
+++ b/arch/arm/boards/freescale-mx53-loco/flash_header.c
@@ -23,59 +23,9 @@ void __naked __flash_header_start go(void)
barebox_arm_head();
}
-struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
- { .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), },
-};
+#define DCD_NAME struct imx_dcd_v2_entry __dcd_entry_section dcd_entry
+
+#include "dcd-data.h"
#define APP_DEST 0x70000000
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/5] ARM i.MX53 tx53: register MMC and NAND update handler
2012-10-15 13:15 [PATCH] barebox in-system update infrastructure Sascha Hauer
` (3 preceding siblings ...)
2012-10-15 13:15 ` [PATCH 4/5] ARM i.MX53 loco: " Sascha Hauer
@ 2012-10-15 13:15 ` Sascha Hauer
4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-10-15 13:15 UTC (permalink / raw)
To: barebox
We support two different board revisions, both of which only differ
in the dcd table, so we can support both in a single binary with the
cost of storing both dcd tables in the binary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/karo-tx53/board.c | 18 +++
arch/arm/boards/karo-tx53/dcd-data-1011.h | 94 +++++++++++
arch/arm/boards/karo-tx53/dcd-data-xx30.h | 145 +++++++++++++++++
| 248 ++---------------------------
4 files changed, 269 insertions(+), 236 deletions(-)
create mode 100644 arch/arm/boards/karo-tx53/dcd-data-1011.h
create mode 100644 arch/arm/boards/karo-tx53/dcd-data-xx30.h
diff --git a/arch/arm/boards/karo-tx53/board.c b/arch/arm/boards/karo-tx53/board.c
index 99ddcec..8f87c9c 100644
--- a/arch/arm/boards/karo-tx53/board.c
+++ b/arch/arm/boards/karo-tx53/board.c
@@ -33,6 +33,8 @@
#include <mach/imx-nand.h>
#include <mach/iim.h>
#include <mach/imx5.h>
+#include <mach/imx-flash-header.h>
+#include <mach/bbu.h>
#include <asm/armlinux.h>
#include <io.h>
@@ -206,6 +208,14 @@ static inline void tx53_fec_init(void)
ARRAY_SIZE(tx53_fec_pads));
}
+#define DCD_NAME_1011 static struct imx_dcd_v2_entry dcd_entry_1011
+
+#include "dcd-data-1011.h"
+
+#define DCD_NAME_XX30 static u32 dcd_entry_xx30
+
+#include "dcd-data-xx30.h"
+
static int tx53_devices_init(void)
{
imx53_iim_register_fec_ethaddr();
@@ -217,6 +227,14 @@ static int tx53_devices_init(void)
armlinux_set_bootparams((void *)0x70000100);
armlinux_set_architecture(MACH_TYPE_TX53);
+ /* rev xx30 can boot from nand or USB */
+ imx53_bbu_internal_nand_register_handler("nand-xx30",
+ BBU_HANDLER_FLAG_DEFAULT, (void *)dcd_entry_xx30, sizeof(dcd_entry_xx30), SZ_512K);
+
+ /* rev 1011 can boot from MMC/SD, other bootsource currently unknown */
+ imx53_bbu_internal_mmc_register_handler("mmc-1011", "/dev/disk0",
+ 0, (void *)dcd_entry_1011, sizeof(dcd_entry_1011));
+
return 0;
}
diff --git a/arch/arm/boards/karo-tx53/dcd-data-1011.h b/arch/arm/boards/karo-tx53/dcd-data-1011.h
new file mode 100644
index 0000000..7034ff8
--- /dev/null
+++ b/arch/arm/boards/karo-tx53/dcd-data-1011.h
@@ -0,0 +1,94 @@
+DCD_NAME_1011[] = {
+ { .addr = cpu_to_be32(0x53fd406c), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd4070), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd4074), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd4078), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd407c), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd4080), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fd4088), .val = cpu_to_be32(0xffffffff), },
+ { .addr = cpu_to_be32(0x53fa8174), .val = cpu_to_be32(0x00000011), },
+ { .addr = cpu_to_be32(0x63fd800c), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8554), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8560), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8594), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8584), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8558), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa8568), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa8590), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa857c), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa8564), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa8580), .val = cpu_to_be32(0x00200040), },
+ { .addr = cpu_to_be32(0x53fa8570), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8578), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa872c), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8728), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa871c), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8718), .val = cpu_to_be32(0x00200000), },
+ { .addr = cpu_to_be32(0x53fa8574), .val = cpu_to_be32(0x00280000), },
+ { .addr = cpu_to_be32(0x53fa8588), .val = cpu_to_be32(0x00280000), },
+ { .addr = cpu_to_be32(0x53fa86f0), .val = cpu_to_be32(0x00280000), },
+ { .addr = cpu_to_be32(0x53fa8720), .val = cpu_to_be32(0x00280000), },
+ { .addr = cpu_to_be32(0x53fa86fc), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa86f4), .val = cpu_to_be32(0x00000200), },
+ { .addr = cpu_to_be32(0x53fa8714), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8724), .val = cpu_to_be32(0x06000000), },
+ { .addr = cpu_to_be32(0x63fd9088), .val = cpu_to_be32(0x36353b38), },
+ { .addr = cpu_to_be32(0x63fd9090), .val = cpu_to_be32(0x49434942), },
+ { .addr = cpu_to_be32(0x63fd90f8), .val = cpu_to_be32(0x00000800), },
+ { .addr = cpu_to_be32(0x63fd907c), .val = cpu_to_be32(0x01350138), },
+ { .addr = cpu_to_be32(0x63fd9080), .val = cpu_to_be32(0x01380139), },
+ { .addr = cpu_to_be32(0x63fd9018), .val = cpu_to_be32(0x00001710), },
+ { .addr = cpu_to_be32(0x63fd9000), .val = cpu_to_be32(0x84110000), },
+ { .addr = cpu_to_be32(0x63fd900c), .val = cpu_to_be32(0x4d5122d2), },
+ { .addr = cpu_to_be32(0x63fd9010), .val = cpu_to_be32(0xb6f18a22), },
+ { .addr = cpu_to_be32(0x63fd9014), .val = cpu_to_be32(0x00c700db), },
+ { .addr = cpu_to_be32(0x63fd902c), .val = cpu_to_be32(0x000026d2), },
+ { .addr = cpu_to_be32(0x63fd9030), .val = cpu_to_be32(0x009f000e), },
+ { .addr = cpu_to_be32(0x63fd9008), .val = cpu_to_be32(0x12272000), },
+ { .addr = cpu_to_be32(0x63fd9004), .val = cpu_to_be32(0x00030012), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008010), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008020), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008020), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0a528030), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x03868031), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00068031), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008032), },
+ { .addr = cpu_to_be32(0x63fd9020), .val = cpu_to_be32(0x00005800), },
+ { .addr = cpu_to_be32(0x63fd9058), .val = cpu_to_be32(0x00033332), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00448031), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008018), },
+ { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x63fd9040), .val = cpu_to_be32(0x04b80003), },
+ { .addr = cpu_to_be32(0x53fa8004), .val = cpu_to_be32(0x00194005), },
+ { .addr = cpu_to_be32(0x53fa819c), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81a0), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81a4), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81a8), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81ac), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81b0), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81b4), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81b8), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81dc), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa81e0), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8228), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa822c), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8230), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8234), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa8238), .val = cpu_to_be32(0x00000000), },
+ { .addr = cpu_to_be32(0x53fa84ec), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa84f0), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa84f4), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa84f8), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa84fc), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa8500), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa8504), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa8508), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa852c), .val = cpu_to_be32(0x00000004), },
+ { .addr = cpu_to_be32(0x53fa8530), .val = cpu_to_be32(0x00000004), },
+ { .addr = cpu_to_be32(0x53fa85a0), .val = cpu_to_be32(0x00000004), },
+ { .addr = cpu_to_be32(0x53fa85a4), .val = cpu_to_be32(0x00000004), },
+ { .addr = cpu_to_be32(0x53fa85a8), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa85ac), .val = cpu_to_be32(0x000000e4), },
+ { .addr = cpu_to_be32(0x53fa85b0), .val = cpu_to_be32(0x00000004), },
+};
diff --git a/arch/arm/boards/karo-tx53/dcd-data-xx30.h b/arch/arm/boards/karo-tx53/dcd-data-xx30.h
new file mode 100644
index 0000000..aa569c2
--- /dev/null
+++ b/arch/arm/boards/karo-tx53/dcd-data-xx30.h
@@ -0,0 +1,145 @@
+
+#define DCD_ITEM(adr, val) cpu_to_be32(adr), cpu_to_be32(val)
+#define DCD_WR_CMD(len) cpu_to_be32(0xcc << 24 | (len) << 8 | 0x04)
+#define DCD_CHECK_CMD(a, b, c) cpu_to_be32(a), cpu_to_be32(b), cpu_to_be32(c)
+
+/*
+ * This board uses advanced features of the DCD which do not corporate
+ * well with our flash header defines. The DCD consists of commands which
+ * have the length econded into them. Normally the DCDs only have a single
+ * command (DCD_COMMAND_WRITE_TAG) which is already part of struct
+ * imx_flash_header_v2. Now this board uses multiple commands, so we cannot
+ * calculate the command length using sizeof(dcd_entry).
+ */
+
+DCD_NAME_XX30[] = {
+ DCD_WR_CMD(0x21c),
+ DCD_ITEM(0x53fd4068, 0xffcc0fff),
+ DCD_ITEM(0x53fd406c, 0x000fffc3),
+ DCD_ITEM(0x53fd4070, 0x033c0000),
+ DCD_ITEM(0x53fd4074, 0x00000000),
+ DCD_ITEM(0x53fd4078, 0x00000000),
+ DCD_ITEM(0x53fd407c, 0x00fff033),
+ DCD_ITEM(0x53fd4080, 0x0f00030f),
+ DCD_ITEM(0x53fd4084, 0xfff00000),
+ DCD_ITEM(0x53fd4088, 0x00000000),
+ DCD_ITEM(0x53fa8174, 0x00000011),
+ DCD_ITEM(0x53fa8318, 0x00000011),
+ DCD_ITEM(0x63fd800c, 0x00000000),
+ DCD_ITEM(0x53fd4014, 0x00888944),
+ DCD_ITEM(0x53fd4018, 0x00016154),
+ DCD_ITEM(0x53fa8724, 0x04000000),
+ DCD_ITEM(0x53fa86f4, 0x00000000),
+ DCD_ITEM(0x53fa8714, 0x00000000),
+ DCD_ITEM(0x53fa86fc, 0x00000080),
+ DCD_ITEM(0x53fa8710, 0x00000000),
+ DCD_ITEM(0x53fa8708, 0x00000040),
+ DCD_ITEM(0x53fa8584, 0x00280000),
+ DCD_ITEM(0x53fa8594, 0x00280000),
+ DCD_ITEM(0x53fa8560, 0x00280000),
+ DCD_ITEM(0x53fa8554, 0x00280000),
+ DCD_ITEM(0x53fa857c, 0x00a80040),
+ DCD_ITEM(0x53fa8590, 0x00a80040),
+ DCD_ITEM(0x53fa8568, 0x00a80040),
+ DCD_ITEM(0x53fa8558, 0x00a80040),
+ DCD_ITEM(0x53fa8580, 0x00280040),
+ DCD_ITEM(0x53fa8578, 0x00280000),
+ DCD_ITEM(0x53fa8564, 0x00280040),
+ DCD_ITEM(0x53fa8570, 0x00280000),
+ DCD_ITEM(0x53fa858c, 0x000000c0),
+ DCD_ITEM(0x53fa855c, 0x000000c0),
+ DCD_ITEM(0x53fa8574, 0x00280000),
+ DCD_ITEM(0x53fa8588, 0x00280000),
+ DCD_ITEM(0x53fa86f0, 0x00280000),
+ DCD_ITEM(0x53fa8720, 0x00280000),
+ DCD_ITEM(0x53fa8718, 0x00280000),
+ DCD_ITEM(0x53fa871c, 0x00280000),
+ DCD_ITEM(0x53fa8728, 0x00280000),
+ DCD_ITEM(0x53fa872c, 0x00280000),
+ DCD_ITEM(0x63fd904c, 0x001f001f),
+ DCD_ITEM(0x63fd9050, 0x001f001f),
+ DCD_ITEM(0x63fd907c, 0x011e011e),
+ DCD_ITEM(0x63fd9080, 0x011f0120),
+ DCD_ITEM(0x63fd9088, 0x3a393d3b),
+ DCD_ITEM(0x63fd9090, 0x3f3f3f3f),
+ DCD_ITEM(0x63fd9018, 0x00011740),
+ DCD_ITEM(0x63fd9000, 0x83190000),
+ DCD_ITEM(0x63fd900c, 0x3f435316),
+ DCD_ITEM(0x63fd9010, 0xb66e0a63),
+ DCD_ITEM(0x63fd9014, 0x01ff00db),
+ DCD_ITEM(0x63fd902c, 0x000026d2),
+ DCD_ITEM(0x63fd9030, 0x00430f24),
+ DCD_ITEM(0x63fd9008, 0x1b221010),
+ DCD_ITEM(0x63fd9004, 0x00030012),
+ DCD_ITEM(0x63fd901c, 0x00008032),
+ DCD_ITEM(0x63fd901c, 0x00008033),
+ DCD_ITEM(0x63fd901c, 0x00408031),
+ DCD_ITEM(0x63fd901c, 0x055080b0),
+ DCD_ITEM(0x63fd9020, 0x00005800),
+ DCD_ITEM(0x63fd9058, 0x00011112),
+ DCD_ITEM(0x63fd90d0, 0x00000003),
+ DCD_ITEM(0x63fd901c, 0x04008010),
+ DCD_ITEM(0x63fd901c, 0x00008040),
+ DCD_ITEM(0x63fd9040, 0x0539002b),
+ DCD_CHECK_CMD(0xcf000c04, 0x63fd9040, 0x00010000),
+ DCD_WR_CMD(0x24),
+ DCD_ITEM(0x63fd901c, 0x00048033),
+ DCD_ITEM(0x63fd901c, 0x00848231),
+ DCD_ITEM(0x63fd901c, 0x00000000),
+ DCD_ITEM(0x63fd9048, 0x00000001),
+ DCD_CHECK_CMD(0xcf000c04, 0x63fd9048, 0x00000001),
+ DCD_WR_CMD(0x2c),
+ DCD_ITEM(0x63fd901c, 0x00048031),
+ DCD_ITEM(0x63fd901c, 0x00008033),
+ DCD_ITEM(0x63fd901c, 0x04008010),
+ DCD_ITEM(0x63fd901c, 0x00048033),
+ DCD_ITEM(0x63fd907c, 0x90000000),
+ DCD_CHECK_CMD(0xcf000c04, 0x63fd907c, 0x90000000),
+ DCD_WR_CMD(0x2c),
+ DCD_ITEM(0x63fd901c, 0x00008033),
+ DCD_ITEM(0x63fd901c, 0x00000000),
+ DCD_ITEM(0x63fd901c, 0x04008010),
+ DCD_ITEM(0x63fd901c, 0x00048033),
+ DCD_ITEM(0x63fd90a4, 0x00000010),
+ DCD_CHECK_CMD(0xcf000c04, 0x63fd90a4, 0x00000010),
+ DCD_WR_CMD(0x24),
+ DCD_ITEM(0x63fd901c, 0x00008033),
+ DCD_ITEM(0x63fd901c, 0x04008010),
+ DCD_ITEM(0x63fd901c, 0x00048033),
+ DCD_ITEM(0x63fd90a0, 0x00000010),
+ DCD_CHECK_CMD(0xcf000c04, 0x63fd90a0, 0x00000010),
+ DCD_WR_CMD(0x010c),
+ DCD_ITEM(0x63fd901c, 0x00008033),
+ DCD_ITEM(0x63fd901c, 0x00000000),
+ DCD_ITEM(0x53fa8004, 0x00194005),
+ DCD_ITEM(0x53fa819c, 0x00000000),
+ DCD_ITEM(0x53fa81a0, 0x00000000),
+ DCD_ITEM(0x53fa81a4, 0x00000000),
+ DCD_ITEM(0x53fa81a8, 0x00000000),
+ DCD_ITEM(0x53fa81ac, 0x00000000),
+ DCD_ITEM(0x53fa81b0, 0x00000000),
+ DCD_ITEM(0x53fa81b4, 0x00000000),
+ DCD_ITEM(0x53fa81b8, 0x00000000),
+ DCD_ITEM(0x53fa81dc, 0x00000000),
+ DCD_ITEM(0x53fa81e0, 0x00000000),
+ DCD_ITEM(0x53fa8228, 0x00000000),
+ DCD_ITEM(0x53fa822c, 0x00000000),
+ DCD_ITEM(0x53fa8230, 0x00000000),
+ DCD_ITEM(0x53fa8234, 0x00000000),
+ DCD_ITEM(0x53fa8238, 0x00000000),
+ DCD_ITEM(0x53fa84ec, 0x000000e4),
+ DCD_ITEM(0x53fa84f0, 0x000000e4),
+ DCD_ITEM(0x53fa84f4, 0x000000e4),
+ DCD_ITEM(0x53fa84f8, 0x000000e4),
+ DCD_ITEM(0x53fa84fc, 0x000000e4),
+ DCD_ITEM(0x53fa8500, 0x000000e4),
+ DCD_ITEM(0x53fa8504, 0x000000e4),
+ DCD_ITEM(0x53fa8508, 0x000000e4),
+ DCD_ITEM(0x53fa852c, 0x00000004),
+ DCD_ITEM(0x53fa8530, 0x00000004),
+ DCD_ITEM(0x53fa85a0, 0x00000004),
+ DCD_ITEM(0x53fa85a4, 0x00000004),
+ DCD_ITEM(0x53fa85a8, 0x000000e4),
+ DCD_ITEM(0x53fa85ac, 0x000000e4),
+ DCD_ITEM(0x53fa85b0, 0x00000004),
+};
--git a/arch/arm/boards/karo-tx53/flash_header.c b/arch/arm/boards/karo-tx53/flash_header.c
index 1e4a167..5c6aa53 100644
--- a/arch/arm/boards/karo-tx53/flash_header.c
+++ b/arch/arm/boards/karo-tx53/flash_header.c
@@ -28,247 +28,23 @@ void __naked __flash_header_start go(void)
* is not in production. It has 1GB DDR2 memory.
*/
#ifdef CONFIG_TX53_REV_1011
-struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
- { .addr = cpu_to_be32(0x53fd406c), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd4070), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd4074), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd4078), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd407c), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd4080), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fd4088), .val = cpu_to_be32(0xffffffff), },
- { .addr = cpu_to_be32(0x53fa8174), .val = cpu_to_be32(0x00000011), },
- { .addr = cpu_to_be32(0x63fd800c), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8554), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8560), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8594), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8584), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8558), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa8568), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa8590), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa857c), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa8564), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa8580), .val = cpu_to_be32(0x00200040), },
- { .addr = cpu_to_be32(0x53fa8570), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8578), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa872c), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8728), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa871c), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8718), .val = cpu_to_be32(0x00200000), },
- { .addr = cpu_to_be32(0x53fa8574), .val = cpu_to_be32(0x00280000), },
- { .addr = cpu_to_be32(0x53fa8588), .val = cpu_to_be32(0x00280000), },
- { .addr = cpu_to_be32(0x53fa86f0), .val = cpu_to_be32(0x00280000), },
- { .addr = cpu_to_be32(0x53fa8720), .val = cpu_to_be32(0x00280000), },
- { .addr = cpu_to_be32(0x53fa86fc), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa86f4), .val = cpu_to_be32(0x00000200), },
- { .addr = cpu_to_be32(0x53fa8714), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8724), .val = cpu_to_be32(0x06000000), },
- { .addr = cpu_to_be32(0x63fd9088), .val = cpu_to_be32(0x36353b38), },
- { .addr = cpu_to_be32(0x63fd9090), .val = cpu_to_be32(0x49434942), },
- { .addr = cpu_to_be32(0x63fd90f8), .val = cpu_to_be32(0x00000800), },
- { .addr = cpu_to_be32(0x63fd907c), .val = cpu_to_be32(0x01350138), },
- { .addr = cpu_to_be32(0x63fd9080), .val = cpu_to_be32(0x01380139), },
- { .addr = cpu_to_be32(0x63fd9018), .val = cpu_to_be32(0x00001710), },
- { .addr = cpu_to_be32(0x63fd9000), .val = cpu_to_be32(0x84110000), },
- { .addr = cpu_to_be32(0x63fd900c), .val = cpu_to_be32(0x4d5122d2), },
- { .addr = cpu_to_be32(0x63fd9010), .val = cpu_to_be32(0xb6f18a22), },
- { .addr = cpu_to_be32(0x63fd9014), .val = cpu_to_be32(0x00c700db), },
- { .addr = cpu_to_be32(0x63fd902c), .val = cpu_to_be32(0x000026d2), },
- { .addr = cpu_to_be32(0x63fd9030), .val = cpu_to_be32(0x009f000e), },
- { .addr = cpu_to_be32(0x63fd9008), .val = cpu_to_be32(0x12272000), },
- { .addr = cpu_to_be32(0x63fd9004), .val = cpu_to_be32(0x00030012), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008010), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008020), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008020), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0a528030), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x03868031), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00068031), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008032), },
- { .addr = cpu_to_be32(0x63fd9020), .val = cpu_to_be32(0x00005800), },
- { .addr = cpu_to_be32(0x63fd9058), .val = cpu_to_be32(0x00033332), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00448031), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008018), },
- { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x63fd9040), .val = cpu_to_be32(0x04b80003), },
- { .addr = cpu_to_be32(0x53fa8004), .val = cpu_to_be32(0x00194005), },
- { .addr = cpu_to_be32(0x53fa819c), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81a0), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81a4), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81a8), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81ac), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81b0), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81b4), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81b8), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81dc), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa81e0), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8228), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa822c), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8230), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8234), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa8238), .val = cpu_to_be32(0x00000000), },
- { .addr = cpu_to_be32(0x53fa84ec), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa84f0), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa84f4), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa84f8), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa84fc), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa8500), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa8504), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa8508), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa852c), .val = cpu_to_be32(0x00000004), },
- { .addr = cpu_to_be32(0x53fa8530), .val = cpu_to_be32(0x00000004), },
- { .addr = cpu_to_be32(0x53fa85a0), .val = cpu_to_be32(0x00000004), },
- { .addr = cpu_to_be32(0x53fa85a4), .val = cpu_to_be32(0x00000004), },
- { .addr = cpu_to_be32(0x53fa85a8), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa85ac), .val = cpu_to_be32(0x000000e4), },
- { .addr = cpu_to_be32(0x53fa85b0), .val = cpu_to_be32(0x00000004), },
-};
+
+#define DCD_NAME_1011 struct imx_dcd_v2_entry __dcd_entry_section dcd_entry
+
+#include "dcd-data-1011.h"
+
#elif defined(CONFIG_TX53_REV_XX30)
-#define DCD_ITEM(adr, val) cpu_to_be32(adr), cpu_to_be32(val)
-#define DCD_WR_CMD(len) cpu_to_be32(0xcc << 24 | (len) << 8 | 0x04)
-#define DCD_CHECK_CMD(a, b, c) cpu_to_be32(a), cpu_to_be32(b), cpu_to_be32(c)
+#define DCD_NAME_XX30 u32 __dcd_entry_section dcd_entry
+
+#include "dcd-data-xx30.h"
-/*
- * This board uses advanced features of the DCD which do not corporate
- * well with our flash header defines. The DCD consists of commands which
- * have the length econded into them. Normally the DCDs only have a single
- * command (DCD_COMMAND_WRITE_TAG) which is already part of struct
- * imx_flash_header_v2. Now this board uses multiple commands, so we cannot
- * calculate the command length using sizeof(dcd_entry).
- */
-u32 __dcd_entry_section dcd_entry[] = {
- DCD_ITEM(0x53fd4068, 0xffcc0fff),
- DCD_ITEM(0x53fd406c, 0x000fffc3),
- DCD_ITEM(0x53fd4070, 0x033c0000),
- DCD_ITEM(0x53fd4074, 0x00000000),
- DCD_ITEM(0x53fd4078, 0x00000000),
- DCD_ITEM(0x53fd407c, 0x00fff033),
- DCD_ITEM(0x53fd4080, 0x0f00030f),
- DCD_ITEM(0x53fd4084, 0xfff00000),
- DCD_ITEM(0x53fd4088, 0x00000000),
- DCD_ITEM(0x53fa8174, 0x00000011),
- DCD_ITEM(0x53fa8318, 0x00000011),
- DCD_ITEM(0x63fd800c, 0x00000000),
- DCD_ITEM(0x53fd4014, 0x00888944),
- DCD_ITEM(0x53fd4018, 0x00016154),
- DCD_ITEM(0x53fa8724, 0x04000000),
- DCD_ITEM(0x53fa86f4, 0x00000000),
- DCD_ITEM(0x53fa8714, 0x00000000),
- DCD_ITEM(0x53fa86fc, 0x00000080),
- DCD_ITEM(0x53fa8710, 0x00000000),
- DCD_ITEM(0x53fa8708, 0x00000040),
- DCD_ITEM(0x53fa8584, 0x00280000),
- DCD_ITEM(0x53fa8594, 0x00280000),
- DCD_ITEM(0x53fa8560, 0x00280000),
- DCD_ITEM(0x53fa8554, 0x00280000),
- DCD_ITEM(0x53fa857c, 0x00a80040),
- DCD_ITEM(0x53fa8590, 0x00a80040),
- DCD_ITEM(0x53fa8568, 0x00a80040),
- DCD_ITEM(0x53fa8558, 0x00a80040),
- DCD_ITEM(0x53fa8580, 0x00280040),
- DCD_ITEM(0x53fa8578, 0x00280000),
- DCD_ITEM(0x53fa8564, 0x00280040),
- DCD_ITEM(0x53fa8570, 0x00280000),
- DCD_ITEM(0x53fa858c, 0x000000c0),
- DCD_ITEM(0x53fa855c, 0x000000c0),
- DCD_ITEM(0x53fa8574, 0x00280000),
- DCD_ITEM(0x53fa8588, 0x00280000),
- DCD_ITEM(0x53fa86f0, 0x00280000),
- DCD_ITEM(0x53fa8720, 0x00280000),
- DCD_ITEM(0x53fa8718, 0x00280000),
- DCD_ITEM(0x53fa871c, 0x00280000),
- DCD_ITEM(0x53fa8728, 0x00280000),
- DCD_ITEM(0x53fa872c, 0x00280000),
- DCD_ITEM(0x63fd904c, 0x001f001f),
- DCD_ITEM(0x63fd9050, 0x001f001f),
- DCD_ITEM(0x63fd907c, 0x011e011e),
- DCD_ITEM(0x63fd9080, 0x011f0120),
- DCD_ITEM(0x63fd9088, 0x3a393d3b),
- DCD_ITEM(0x63fd9090, 0x3f3f3f3f),
- DCD_ITEM(0x63fd9018, 0x00011740),
- DCD_ITEM(0x63fd9000, 0x83190000),
- DCD_ITEM(0x63fd900c, 0x3f435316),
- DCD_ITEM(0x63fd9010, 0xb66e0a63),
- DCD_ITEM(0x63fd9014, 0x01ff00db),
- DCD_ITEM(0x63fd902c, 0x000026d2),
- DCD_ITEM(0x63fd9030, 0x00430f24),
- DCD_ITEM(0x63fd9008, 0x1b221010),
- DCD_ITEM(0x63fd9004, 0x00030012),
- DCD_ITEM(0x63fd901c, 0x00008032),
- DCD_ITEM(0x63fd901c, 0x00008033),
- DCD_ITEM(0x63fd901c, 0x00408031),
- DCD_ITEM(0x63fd901c, 0x055080b0),
- DCD_ITEM(0x63fd9020, 0x00005800),
- DCD_ITEM(0x63fd9058, 0x00011112),
- DCD_ITEM(0x63fd90d0, 0x00000003),
- DCD_ITEM(0x63fd901c, 0x04008010),
- DCD_ITEM(0x63fd901c, 0x00008040),
- DCD_ITEM(0x63fd9040, 0x0539002b),
- DCD_CHECK_CMD(0xcf000c04, 0x63fd9040, 0x00010000),
- DCD_WR_CMD(0x24),
- DCD_ITEM(0x63fd901c, 0x00048033),
- DCD_ITEM(0x63fd901c, 0x00848231),
- DCD_ITEM(0x63fd901c, 0x00000000),
- DCD_ITEM(0x63fd9048, 0x00000001),
- DCD_CHECK_CMD(0xcf000c04, 0x63fd9048, 0x00000001),
- DCD_WR_CMD(0x2c),
- DCD_ITEM(0x63fd901c, 0x00048031),
- DCD_ITEM(0x63fd901c, 0x00008033),
- DCD_ITEM(0x63fd901c, 0x04008010),
- DCD_ITEM(0x63fd901c, 0x00048033),
- DCD_ITEM(0x63fd907c, 0x90000000),
- DCD_CHECK_CMD(0xcf000c04, 0x63fd907c, 0x90000000),
- DCD_WR_CMD(0x2c),
- DCD_ITEM(0x63fd901c, 0x00008033),
- DCD_ITEM(0x63fd901c, 0x00000000),
- DCD_ITEM(0x63fd901c, 0x04008010),
- DCD_ITEM(0x63fd901c, 0x00048033),
- DCD_ITEM(0x63fd90a4, 0x00000010),
- DCD_CHECK_CMD(0xcf000c04, 0x63fd90a4, 0x00000010),
- DCD_WR_CMD(0x24),
- DCD_ITEM(0x63fd901c, 0x00008033),
- DCD_ITEM(0x63fd901c, 0x04008010),
- DCD_ITEM(0x63fd901c, 0x00048033),
- DCD_ITEM(0x63fd90a0, 0x00000010),
- DCD_CHECK_CMD(0xcf000c04, 0x63fd90a0, 0x00000010),
- DCD_WR_CMD(0x010c),
- DCD_ITEM(0x63fd901c, 0x00008033),
- DCD_ITEM(0x63fd901c, 0x00000000),
- DCD_ITEM(0x53fa8004, 0x00194005),
- DCD_ITEM(0x53fa819c, 0x00000000),
- DCD_ITEM(0x53fa81a0, 0x00000000),
- DCD_ITEM(0x53fa81a4, 0x00000000),
- DCD_ITEM(0x53fa81a8, 0x00000000),
- DCD_ITEM(0x53fa81ac, 0x00000000),
- DCD_ITEM(0x53fa81b0, 0x00000000),
- DCD_ITEM(0x53fa81b4, 0x00000000),
- DCD_ITEM(0x53fa81b8, 0x00000000),
- DCD_ITEM(0x53fa81dc, 0x00000000),
- DCD_ITEM(0x53fa81e0, 0x00000000),
- DCD_ITEM(0x53fa8228, 0x00000000),
- DCD_ITEM(0x53fa822c, 0x00000000),
- DCD_ITEM(0x53fa8230, 0x00000000),
- DCD_ITEM(0x53fa8234, 0x00000000),
- DCD_ITEM(0x53fa8238, 0x00000000),
- DCD_ITEM(0x53fa84ec, 0x000000e4),
- DCD_ITEM(0x53fa84f0, 0x000000e4),
- DCD_ITEM(0x53fa84f4, 0x000000e4),
- DCD_ITEM(0x53fa84f8, 0x000000e4),
- DCD_ITEM(0x53fa84fc, 0x000000e4),
- DCD_ITEM(0x53fa8500, 0x000000e4),
- DCD_ITEM(0x53fa8504, 0x000000e4),
- DCD_ITEM(0x53fa8508, 0x000000e4),
- DCD_ITEM(0x53fa852c, 0x00000004),
- DCD_ITEM(0x53fa8530, 0x00000004),
- DCD_ITEM(0x53fa85a0, 0x00000004),
- DCD_ITEM(0x53fa85a4, 0x00000004),
- DCD_ITEM(0x53fa85a8, 0x000000e4),
- DCD_ITEM(0x53fa85ac, 0x000000e4),
- DCD_ITEM(0x53fa85b0, 0x00000004),
-};
#endif
-#define APP_DEST 0x70000000
+#define APP_DEST 0x71000000
+
+int tx53_dcdentry_size = sizeof(dcd_entry);
+void *tx53_dcd_entry = &dcd_entry;
struct imx_flash_header_v2 __flash_header_section flash_header = {
.header.tag = IVT_HEADER_TAG,
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread