summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/boot-x1000.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-05 17:46:58 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-25 21:36:51 +0000
commit5d0f697e87da01f5fe66d2e76af77b9bcdc6bbbc (patch)
tree7af09b65939db5a7b4a688236154fabf6f4b33af /firmware/target/mips/ingenic_x1000/boot-x1000.h
parent3ae4a98e3bbe4f2c449e614cda67efea129f16b1 (diff)
downloadrockbox-5d0f697e87da01f5fe66d2e76af77b9bcdc6bbbc.tar.gz
rockbox-5d0f697e87da01f5fe66d2e76af77b9bcdc6bbbc.zip
x1000: remove the last vestiges of boot option support
There should be no need for any compatibility hacks since this value was mostly used internally between the SPL and bootloader. clk_init() was the only user in the main Rockbox binary which accessed it, but when loaded by the Rockbox bootloader that code will not be reached since BOOT_FLAG_CLK_INIT is already set. Change-Id: Idd68b9834172e652b47432bfb1e00c923ea35407
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/boot-x1000.h')
-rw-r--r--firmware/target/mips/ingenic_x1000/boot-x1000.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/firmware/target/mips/ingenic_x1000/boot-x1000.h b/firmware/target/mips/ingenic_x1000/boot-x1000.h
index fa918a3ead..1b7a0db1e9 100644
--- a/firmware/target/mips/ingenic_x1000/boot-x1000.h
+++ b/firmware/target/mips/ingenic_x1000/boot-x1000.h
@@ -28,16 +28,6 @@
28#include <stddef.h> 28#include <stddef.h>
29 29
30enum { 30enum {
31 BOOT_OPTION_ROCKBOX = 0,
32 BOOT_OPTION_OFW_PLAYER,
33 BOOT_OPTION_OFW_RECOVERY,
34};
35
36enum {
37 /* 3 bits to store the boot option selected by the SPL */
38 BOOT_OPTION_MASK = 0x7,
39 BOOT_OPTION_SHIFT = 0,
40
41 /* Set after running clk_init() and setting up system clocks */ 31 /* Set after running clk_init() and setting up system clocks */
42 BOOT_FLAG_CLK_INIT = (1 << 31), 32 BOOT_FLAG_CLK_INIT = (1 << 31),
43 33
@@ -88,18 +78,4 @@ static inline void clr_boot_flag(uint32_t bit)
88 cpm_scratch_set(REG_CPM_SCRATCH & ~bit); 78 cpm_scratch_set(REG_CPM_SCRATCH & ~bit);
89} 79}
90 80
91static inline void set_boot_option(int opt)
92{
93 uint32_t r = REG_CPM_SCRATCH;
94 r &= ~(BOOT_OPTION_MASK << BOOT_OPTION_SHIFT);
95 r |= (opt & BOOT_OPTION_MASK) << BOOT_OPTION_SHIFT;
96 cpm_scratch_set(r);
97}
98
99static inline int get_boot_option(void)
100{
101 uint32_t r = REG_CPM_SCRATCH;
102 return (r >> BOOT_OPTION_SHIFT) & BOOT_OPTION_MASK;
103}
104
105#endif /* __BOOT_X1000_H__ */ 81#endif /* __BOOT_X1000_H__ */