mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-29 09:06:14 +02:00
Implemented ingenic_sdram_size
This commit is contained in:
parent
a524654c5c
commit
cc2de4cf26
12
ingenic.c
12
ingenic.c
@ -97,12 +97,8 @@ static void hexdump(const void *data, size_t size) {
|
||||
static uint32_t ingenic_probe(void *usb_hndl) {
|
||||
char magic[9];
|
||||
|
||||
if(usbdev_vendor(usb_hndl, USBDEV_FROMDEV, VR_GET_CPU_INFO, 0, 0, magic, 8) == -1) {
|
||||
if(errno == EFAULT) {
|
||||
debug(LEVEL_DEBUG, "Stage detected\n");
|
||||
} else
|
||||
if(usbdev_vendor(usb_hndl, USBDEV_FROMDEV, VR_GET_CPU_INFO, 0, 0, magic, 8) == -1)
|
||||
return 0;
|
||||
}
|
||||
|
||||
magic[8] = 0;
|
||||
|
||||
@ -212,6 +208,12 @@ int ingenic_rebuild(void *hndl) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t ingenic_sdram_size(void *hndl) {
|
||||
HANDLE;
|
||||
|
||||
return handle->total_sdram_size;
|
||||
}
|
||||
|
||||
static int ingenic_address(void *usb, uint32_t base) {
|
||||
debug(LEVEL_DEBUG, "Ingenic: address 0x%08X\n", base);
|
||||
|
||||
|
@ -28,6 +28,7 @@ void ingenic_set_callbacks(void *hndl, const ingenic_callbacks_t *callbacks, voi
|
||||
int ingenic_redetect(void *hndl);
|
||||
int ingenic_cmdset(void *hndl);
|
||||
int ingenic_type(void *hndl);
|
||||
uint32_t ingenic_sdram_size(void *hndl);
|
||||
|
||||
int ingenic_rebuild(void *hndl);
|
||||
int ingenic_loadstage(void *hndl, int id, const char *filename);
|
||||
|
Loading…
Reference in New Issue
Block a user