mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 02:51:33 +00:00
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>
This commit is contained in:
parent
5decc7b014
commit
157af4f81f
2 changed files with 14 additions and 2 deletions
|
@ -207,6 +207,16 @@ int board_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BOARD_LATE_INIT
|
#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)
|
int board_late_init(void)
|
||||||
{
|
{
|
||||||
struct board_id *board;
|
struct board_id *board;
|
||||||
|
@ -256,6 +266,10 @@ int board_late_init(void)
|
||||||
|
|
||||||
/* restore hsusb0_data5 pin as hsusb0_data5 */
|
/* restore hsusb0_data5 pin as hsusb0_data5 */
|
||||||
MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0));
|
MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0));
|
||||||
|
|
||||||
|
#ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
|
||||||
|
unlock_nand();
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -93,7 +93,6 @@
|
||||||
|
|
||||||
#define CONFIG_PREBOOT \
|
#define CONFIG_PREBOOT \
|
||||||
"setenv preboot;" \
|
"setenv preboot;" \
|
||||||
"nand unlock;" \
|
|
||||||
"saveenv;"
|
"saveenv;"
|
||||||
|
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
@ -192,7 +191,6 @@
|
||||||
"tftpboot $loadaddr zImage;" \
|
"tftpboot $loadaddr zImage;" \
|
||||||
"bootz $loadaddr\0" \
|
"bootz $loadaddr\0" \
|
||||||
"nandbootcommon=echo 'Booting kernel from NAND...';" \
|
"nandbootcommon=echo 'Booting kernel from NAND...';" \
|
||||||
"nand unlock;" \
|
|
||||||
"run nandargs;" \
|
"run nandargs;" \
|
||||||
"run common_bootargs;" \
|
"run common_bootargs;" \
|
||||||
"run dump_bootargs;" \
|
"run dump_bootargs;" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue