Support and General Use > Hardware
Ipod Video 30gb cf
dreamlayers:
--- Quote from: LurkAzusa on January 03, 2009, 10:08:16 PM ---I'm willing try any tests you may have for an ipod 4G with a 16 Gb AData. It is the DEV_RS that I comment out. After that I could put it in my Video for testing, as well.
--- End quote ---
I think I know why that helped. The DEV_RS line resets various hardware, including DEV_IDE0. When DEV_IDE0 is reset, this resets the host and also hardware resets the device. The ATA standard defines proper timings for hardware reset (assert, wait >25 microseconds, negate, wait >2 milliseconds, and only then check status). This is totally disregarded in system_init(). An overly short asserted time can incompletely reset a device and cause it to malfunction (eg. lock up). I think that's what happened because -1 seems to mean wait_for_bsy() failed in init_and_check() in ata.c. (Checking for status too soon can give false status, but I don't think that happened.)
In ata.c, the initialization code tries a hard reset if the first try doesn't succeed. A proper reset would probably return the device to a working state. However, ata_reset() in ata-pp502x.c does nothing.
I've recently submitted a patch which disables DEV_IDE0 resetting in order to speed up startup on the video iPod. This may be another reason why that patch is a good idea.
Regarding my PIO timings idea, here are timings you can try:
0xC293, 0x43A2, 0x11A1, 0x7232, 0x3131
Array index is mode number (0 to 4). They go into IDE0_PRI_TIMING0. The mode is set on the device in set_features() in ata.c. If you want more help, I can send a patch.
(Note: Trying with a MK3008GAL is probably a waste of time. 0x10 is faster.)
LambdaCalculus:
--- Quote from: Chronon on January 03, 2009, 02:05:38 PM ---A timing issue, maybe?
--- End quote ---
I believe so, yes.
LurkAzusa:
dreamlayers,
I applied your patch to my ipod4G and it booted right up, extremely quick. Thank you so much. Sure hope this can get committed right away.
Do I still need to play with the timings? I don't quite understand what I am doing there, so a little more explanation would help me.
dreamlayers:
--- Quote from: LurkAzusa on January 04, 2009, 02:29:11 PM ---dreamlayers,
I applied your patch to my ipod4G and it booted right up, extremely quick. Thank you so much. Sure hope this can get committed right away.
Do I still need to play with the timings? I don't quite understand what I am doing there, so a little more explanation would help me.
--- End quote ---
Sorry about the delayed response.
If everything works properly now, you don't need to play with the timings. If you have other problems, then trying different PIO timings or a different PIO mode may help. If you want to do this, let me know if you're ok with patches or if you want pre-built binaries.
Actually, I'm extending this offer to anyone with a pp502x based device modded with a different drive or a CF card which works in the original firmware but not in Rockbox.
Navigation
[0] Message Index
[*] Previous page
Go to full version