1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 10:15:19 +02:00

Implemented ingenic_sdram_size

This commit is contained in:
Sergey Gridassov 2010-12-04 10:56:51 +03:00
parent a524654c5c
commit cc2de4cf26
3 changed files with 8 additions and 5 deletions

0
fw.bin Executable file → Normal file
View File

View File

@ -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);

View File

@ -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);