aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAdam Ford2017-12-03 06:24:53 -0600
committerTom Rini2017-12-12 21:33:38 -0500
commit157af4f81fffd416d8952cd9ca5c5decc6d6de9e (patch)
tree0c8ad1ac7daeb743aa7d004e8f9ae9c00fbe611b /board
parent5decc7b014d4fd77b88eb4c71b023a4938134edf (diff)
ARM: omap3_logic: Unlock NAND automatically in U-Boot
The Micron Flash is locked by default. This will automaticlly unlock so manually unlocking is unnecessary in U-Boot. Signed-off-by: Adam Ford <aford173@gmail.com>
Diffstat (limited to 'board')
-rw-r--r--board/logicpd/omap3som/omap3logic.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index a55a520e63e..cebb200c5ff 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -207,6 +207,16 @@ int board_init(void)
}
#ifdef CONFIG_BOARD_LATE_INIT
+
+static void unlock_nand(void)
+{
+ int dev = nand_curr_device;
+ struct mtd_info *mtd;
+
+ mtd = get_nand_dev_by_index(dev);
+ nand_unlock(mtd, 0, mtd->size, 0);
+}
+
int board_late_init(void)
{
struct board_id *board;
@@ -256,6 +266,10 @@ int board_late_init(void)
/* restore hsusb0_data5 pin as hsusb0_data5 */
MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0));
+
+#ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
+ unlock_nand();
+#endif
return 0;
}
#endif