Support and General Use > Hardware
CompactFlash based iPod mini
dude52:
You were right. It looks like all I need to do is add the diff file into a build. I'll post again when I have results.
Compact Flash page
http://www.rockbox.org/twiki/bin/view/Main/MiniCF
dude52:
I tried patching rockbox with the diff file, but it failed. I'm not a big coder, so I can't tell what needs to be changed. But if someone could looks things over for me, I could test things out and post results. Any volunteers?
bluebrother:
You could try searching for the lines that get changed by that patch. From a quick look ata.c:713 might be the solution ... can't try it though, and as I don't know the ATA code I might be completely wrong.
dude52:
I tried mucking about with the code, but no change. I notice the diff file refers to an ata.c that is at least 1400 lines long, but the current file ends at 1016. Could this portion that needs to be changed have been moved elsewhere or removed?
dude52:
It would appear that I got things to work. Essentially, there was a section of code that I commented out and that took care of things. However, the USB seems a little spotty (sometimes it works and sometimes it hangs). But I don't know if this is a result of what I commented out.
Here is the function from ata.c that was causing problems:
--- Quote ---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
}
--- End quote ---
I made the function return 0 whenever it gets called (ie. a success) so it doesn't bother trying to tell the flash card to sleep. If I understand correctly, one could replace IPOD_NANO with whatever the correct name for the iPod mini is. It's not IPOD_MINI because I tried that and it didn't work.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version