summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-08-27 19:37:10 +0200
committerTom Rini <trini@konsulko.com>2015-10-22 14:17:20 -0400
commit987a40d52ea617ee609fafcee5463274983d2827 (patch)
treeefa973fe9385832593cdb3d086d46834d8938d87 /arch/arm
parentb50a7685283b66623a6acb60329c57caa78795f5 (diff)
downloadu-boot-imx-987a40d52ea617ee609fafcee5463274983d2827.zip
u-boot-imx-987a40d52ea617ee609fafcee5463274983d2827.tar.gz
u-boot-imx-987a40d52ea617ee609fafcee5463274983d2827.tar.bz2
omap4: omap_die_id support
This introduces omap4 support for omap_die_id, which matches the common omap_die_id definition. It replaces board-specific code to grab the die id bits. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/omap4/hwinit.c8
-rw-r--r--arch/arm/cpu/armv7/omap4/prcm-regs.c5
-rw-r--r--arch/arm/include/asm/arch-omap4/omap.h4
3 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm/cpu/armv7/omap4/hwinit.c b/arch/arm/cpu/armv7/omap4/hwinit.c
index a68947f..7c6638c 100644
--- a/arch/arm/cpu/armv7/omap4/hwinit.c
+++ b/arch/arm/cpu/armv7/omap4/hwinit.c
@@ -156,6 +156,14 @@ void init_omap_revision(void)
}
}
+void omap_die_id(unsigned int *die_id)
+{
+ die_id[0] = readl((*ctrl)->control_std_fuse_die_id_0);
+ die_id[1] = readl((*ctrl)->control_std_fuse_die_id_1);
+ die_id[2] = readl((*ctrl)->control_std_fuse_die_id_2);
+ die_id[3] = readl((*ctrl)->control_std_fuse_die_id_3);
+}
+
#ifndef CONFIG_SYS_L2CACHE_OFF
void v7_outer_cache_enable(void)
{
diff --git a/arch/arm/cpu/armv7/omap4/prcm-regs.c b/arch/arm/cpu/armv7/omap4/prcm-regs.c
index 8698ec7..a09581e 100644
--- a/arch/arm/cpu/armv7/omap4/prcm-regs.c
+++ b/arch/arm/cpu/armv7/omap4/prcm-regs.c
@@ -280,7 +280,10 @@ struct prcm_regs const omap4_prcm = {
struct omap_sys_ctrl_regs const omap4_ctrl = {
.control_status = 0x4A0022C4,
- .control_id_code = 0x4A002204,
+ .control_std_fuse_die_id_0 = 0x4A002200,
+ .control_std_fuse_die_id_1 = 0x4A002208,
+ .control_std_fuse_die_id_2 = 0x4A00220C,
+ .control_std_fuse_die_id_3 = 0x4A002210,
.control_std_fuse_opp_bgap = 0x4a002260,
.control_status = 0x4a0022c4,
.control_ldosram_iva_voltage_ctrl = 0x4A002320,
diff --git a/arch/arm/include/asm/arch-omap4/omap.h b/arch/arm/include/asm/arch-omap4/omap.h
index 12b1a09..4712722 100644
--- a/arch/arm/include/asm/arch-omap4/omap.h
+++ b/arch/arm/include/asm/arch-omap4/omap.h
@@ -33,10 +33,6 @@
/* CONTROL_ID_CODE */
#define CONTROL_ID_CODE 0x4A002204
-#define STD_FUSE_DIE_ID_0 0x4A002200
-#define STD_FUSE_DIE_ID_1 0x4A002208
-#define STD_FUSE_DIE_ID_2 0x4A00220c
-#define STD_FUSE_DIE_ID_3 0x4A002210
#define OMAP4_CONTROL_ID_CODE_ES1_0 0x0B85202F
#define OMAP4_CONTROL_ID_CODE_ES2_0 0x1B85202F