* [U-Boot] [PATCH] ARM: omap3_logic: Unlock NAND automatically in U-Boot
@ 2017-12-03 12:24 Adam Ford
2017-12-13 22:56 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2017-12-03 12:24 UTC (permalink / raw)
To: 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>
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 1da9e38..4935a49 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
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 3ecfb58..b095814 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -93,7 +93,6 @@
#define CONFIG_PREBOOT \
"setenv preboot;" \
- "nand unlock;" \
"saveenv;"
#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -192,7 +191,6 @@
"tftpboot $loadaddr zImage;" \
"bootz $loadaddr\0" \
"nandbootcommon=echo 'Booting kernel from NAND...';" \
- "nand unlock;" \
"run nandargs;" \
"run common_bootargs;" \
"run dump_bootargs;" \
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] ARM: omap3_logic: Unlock NAND automatically in U-Boot
2017-12-03 12:24 [U-Boot] [PATCH] ARM: omap3_logic: Unlock NAND automatically in U-Boot Adam Ford
@ 2017-12-13 22:56 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2017-12-13 22:56 UTC (permalink / raw)
To: u-boot
On Sun, Dec 03, 2017 at 06:24:53AM -0600, Adam Ford wrote:
> 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>
>
> diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
> index 1da9e38..4935a49 100644
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171213/8c75b900/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-13 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-03 12:24 [U-Boot] [PATCH] ARM: omap3_logic: Unlock NAND automatically in U-Boot Adam Ford
2017-12-13 22:56 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.