summaryrefslogtreecommitdiffstats
path: root/drivers/hab
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-02-05 15:50:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-02-05 15:51:42 +0100
commit1db47f7616b1b9940e34c9b1d3ba17de36e957a0 (patch)
treeb5f853145a30431cec10bdd15a80671862f27325 /drivers/hab
parent48d74b1ca4e2de002f548980e3bc4de3547a4293 (diff)
downloadbarebox-1db47f7616b1b9940e34c9b1d3ba17de36e957a0.tar.gz
i.MX habv4: Fix RVT address for newer SoCs
Newer i.MX SoCs have the RVT at 0x98, not at 0x94 any more. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/hab')
-rw-r--r--drivers/hab/habv4.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index a44a94b..91dbb7a 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -25,7 +25,8 @@
#include <mach/generic.h>
#define HABV4_RVT_IMX28 0xffff8af8
-#define HABV4_RVT_IMX6 0x00000094
+#define HABV4_RVT_IMX6_OLD 0x00000094
+#define HABV4_RVT_IMX6_NEW 0x00000098
enum hab_tag {
HAB_TAG_IVT = 0xd1, /* Image Vector Table */
@@ -216,9 +217,19 @@ static int habv4_get_status(const struct habv4_rvt *rvt)
int imx6_hab_get_status(void)
{
- const struct habv4_rvt *rvt = (void *)HABV4_RVT_IMX6;
+ const struct habv4_rvt *rvt;
- return habv4_get_status(rvt);
+ rvt = (void *)HABV4_RVT_IMX6_OLD;
+ if (rvt->header.tag == HAB_TAG_RVT)
+ return habv4_get_status(rvt);
+
+ rvt = (void *)HABV4_RVT_IMX6_NEW;
+ if (rvt->header.tag == HAB_TAG_RVT)
+ return habv4_get_status(rvt);
+
+ pr_err("ERROR - RVT not found!\n");
+
+ return -EINVAL;
}
int imx28_hab_get_status(void)