Skip to content

Commit 22c2871

Browse files
shraddha-chaudhari-imgtecHam22
authored andcommitted
pistacho_bub.h: add factory_reset command
Add factory_reset command which sets appropriate value in scratchpad register 1, this will trigger a factory reset when Linux boots. e.g. To trigger a factory reset in nand boot pistachio # run factory_reset pistachio # run dualnandboot Bug-Id: KIN-305 Change-Id: I1dae562faa83bda151af0544d3c64a030ffa6e0b Signed-off-by: Shraddha Chaudhari <[email protected]>
1 parent b37ab71 commit 22c2871

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/configs/pistachio_bub.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
* Note: scratchpad register 0 is in use for bootcount so should not be modified
7272
*/
7373
#define CONFIG_CMD_PISTACHIO_SCRATCHPAD
74+
/*
75+
* factory reset cmd just sets a value in scratchpad reg, actual
76+
* reset will be done by Linux when it boots
77+
*/
78+
#define FACTORY_RESET_CMD "scratchpad_write 1 0x1234"
7479

7580
/*
7681
* Console configuration
@@ -355,6 +360,7 @@
355360
"netboot="NET_BOOTCOMMAND"\0" \
356361
"dualnandboot="DUAL_NAND_BOOTCOMMAND"\0" \
357362
BOOTCOUNT_VARIABLES \
363+
"factory_reset="FACTORY_RESET_CMD"\0" \
358364
"\0"
359365

360366
#define CONFIG_BOOTDELAY 2

0 commit comments

Comments
 (0)