summaryrefslogtreecommitdiff
path: root/firmware/target/mips
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-08-25 11:37:30 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-09-02 13:29:43 -0400
commita2cc7546d88bf9c4071f0f56f6c43d59654fc212 (patch)
treeed009cf793dd1b99048a50ebd3e2c55c00ed1d9e /firmware/target/mips
parentc16dbbfd1fb7bf4bc268a4693bbed21497456b30 (diff)
downloadrockbox-a2cc7546d88bf9c4071f0f56f6c43d59654fc212.tar.gz
rockbox-a2cc7546d88bf9c4071f0f56f6c43d59654fc212.zip
Add DeviceData to bootloaders
same vein as bootdata but for devices that need to pass info back to a running firmware Change-Id: I0cdcdc0475804dfbbee415ab487104ae8fc8ac69
Diffstat (limited to 'firmware/target/mips')
-rw-r--r--firmware/target/mips/ingenic_x1000/crt0.S7
-rw-r--r--firmware/target/mips/ingenic_x1000/system-x1000.c14
2 files changed, 21 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/crt0.S b/firmware/target/mips/ingenic_x1000/crt0.S
index 6c0942b0db..23daaefb5e 100644
--- a/firmware/target/mips/ingenic_x1000/crt0.S
+++ b/firmware/target/mips/ingenic_x1000/crt0.S
@@ -23,6 +23,10 @@
23#include "mips.h" 23#include "mips.h"
24#include "bootdata.h" 24#include "bootdata.h"
25 25
26#if defined(HAVE_DEVICEDATA) && !defined(BOOTLOADER)
27#include "devicedata.h"
28#endif
29
26 .text 30 .text
27 .extern main 31 .extern main
28 .extern system_early_init 32 .extern system_early_init
@@ -52,6 +56,9 @@ _header:
52#ifndef BOOTLOADER 56#ifndef BOOTLOADER
53 /* Multiboot support header; this is not part of the above header. */ 57 /* Multiboot support header; this is not part of the above header. */
54 put_boot_data_here 58 put_boot_data_here
59#ifdef HAVE_DEVICEDATA
60 put_device_data_here
61#endif
55#endif 62#endif
56 63
57_realstart: 64_realstart:
diff --git a/firmware/target/mips/ingenic_x1000/system-x1000.c b/firmware/target/mips/ingenic_x1000/system-x1000.c
index 64890a6c3a..32ac66ec92 100644
--- a/firmware/target/mips/ingenic_x1000/system-x1000.c
+++ b/firmware/target/mips/ingenic_x1000/system-x1000.c
@@ -81,6 +81,20 @@ void system_early_init(void)
81 clk_init(); 81 clk_init();
82} 82}
83 83
84#if defined (HAVE_DEVICEDATA) && defined(EROS_QN)
85void fill_devicedata(struct device_data_t *data)
86{
87#ifdef BOOTLOADER
88 memset(data->payload, 0xff, data->length);
89 data->lcd_version = EROSQN_VER;
90#else
91 uint8_t lcd_version = data->lcd_version;
92 memset(data->payload, 0xff, data->length);
93 data->lcd_version = lcd_version;
94#endif
95}
96#endif
97
84/* First thing called from Rockbox main() */ 98/* First thing called from Rockbox main() */
85void system_init(void) 99void system_init(void)
86{ 100{