mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Add DeviceData to bootloaders
same vein as bootdata but for devices that need to pass info back to a running firmware Change-Id: I0cdcdc0475804dfbbee415ab487104ae8fc8ac69
This commit is contained in:
parent
c16dbbfd1f
commit
a2cc7546d8
11 changed files with 274 additions and 1 deletions
|
|
@ -23,6 +23,10 @@
|
|||
#include "mips.h"
|
||||
#include "bootdata.h"
|
||||
|
||||
#if defined(HAVE_DEVICEDATA) && !defined(BOOTLOADER)
|
||||
#include "devicedata.h"
|
||||
#endif
|
||||
|
||||
.text
|
||||
.extern main
|
||||
.extern system_early_init
|
||||
|
|
@ -52,6 +56,9 @@ _header:
|
|||
#ifndef BOOTLOADER
|
||||
/* Multiboot support header; this is not part of the above header. */
|
||||
put_boot_data_here
|
||||
#ifdef HAVE_DEVICEDATA
|
||||
put_device_data_here
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_realstart:
|
||||
|
|
|
|||
|
|
@ -81,6 +81,20 @@ void system_early_init(void)
|
|||
clk_init();
|
||||
}
|
||||
|
||||
#if defined (HAVE_DEVICEDATA) && defined(EROS_QN)
|
||||
void fill_devicedata(struct device_data_t *data)
|
||||
{
|
||||
#ifdef BOOTLOADER
|
||||
memset(data->payload, 0xff, data->length);
|
||||
data->lcd_version = EROSQN_VER;
|
||||
#else
|
||||
uint8_t lcd_version = data->lcd_version;
|
||||
memset(data->payload, 0xff, data->length);
|
||||
data->lcd_version = lcd_version;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* First thing called from Rockbox main() */
|
||||
void system_init(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue