summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/boot-x1000.h
diff options
context:
space:
mode:
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__ */