Welcome to the Rockbox Technical Forums!
There seem to be some questions about which CF-card works or not.
static int perform_soft_reset(void){/* If this code is allowed to run on a Nano, the next reads from the flash will * time out, so we disable it. It shouldn't be necessary anyway, since the * ATA -> Flash interface automatically sleeps almost immediately after the * last command. */#ifndef IPOD_NANO int ret; int retry_count; SET_REG(ATA_SELECT, SELECT_LBA | ata_device ); SET_REG(ATA_CONTROL, CONTROL_nIEN|CONTROL_SRST ); sleep(1); /* >= 5us */ SET_REG(ATA_CONTROL, CONTROL_nIEN); sleep(1); /* >2ms */ /* This little sucker can take up to 30 seconds */ retry_count = 8; do { ret = wait_for_rdy(); } while(!ret && retry_count--); /* Massage the return code so it is 0 on success and -1 on failure */ ret = ret?0:-1; return ret;#else return 0; /* Always report success */#endif}
Page created in 0.07 seconds with 20 queries.