This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9749 - PP502x: Don't reset IDE0 on startup
Attached to Project:
Rockbox
Opened by Boris Gjenero (dreamlayers) - Friday, 02 January 2009, 21:59 GMT+2
Last edited by Andree Buschmann (Buschel) - Saturday, 21 February 2009, 10:44 GMT+2
Opened by Boris Gjenero (dreamlayers) - Friday, 02 January 2009, 21:59 GMT+2
Last edited by Andree Buschmann (Buschel) - Saturday, 21 February 2009, 10:44 GMT+2
|
DetailsI have a 30GB 5th generation iPod with a stock MK3008GAL hard drive. When starting Rockbox, I hear two clicks while the logo is displayed. It seems like the heads are unloaded and then loaded again. This delays startup a bit.
The unload is triggered when DEV_IDE0 is reset in system_init() in firmware/target/arm/system-pp502x.c. The load happens later when needed. From an experiment I found that resetting DEV_IDE0 unfreezes the lock, and the ATA standard says that can only happen if the device is powered down or hard reset. Because of this I think resetting DEV_IDE0 hard resets the ATA device. DEV_IDE0 resets also seem to reset some host settings because if done after ata_device_init() (which initializes the host, not the device) they break DMA ( DEV_RS = DEV_IDE0; DEV_RS = 0; ata_device_init(); However, since everything currently works with an ata_reset() which does nothing, I am not submitting a patch for that. I am submitting two patches to disable DEV_IDE0 resetting. One disables it only on the Video iPod and one disables it on all HD based pp502x targets. I have only tested this on my Video iPod, so it's up to others to see if this works and speeds up startup on other targets. This was started at: http://forums.rockbox.org/index.php?topic=19788.0 |
This task depends upon
Closed by Andree Buschmann (Buschel)
Saturday, 21 February 2009, 10:44 GMT+2
Reason for closing: Accepted
Additional comments about closing: Submitted for missing targets (H10, iPod color) with r20075.
Saturday, 21 February 2009, 10:44 GMT+2
Reason for closing: Accepted
Additional comments about closing: Submitted for missing targets (H10, iPod color) with r20075.
Can anybody else please test on other PP-HDD-targets?
By the way mine takes half a minute :(
Do others have any thoughts on whether to implement ata_reset()? It seems wasteful to start hard-resetting on every IDE power-on (causing the drive to restart its startup sequence) if everything works without that. (That's what ata.c tries to do, but can't do on pp502x because ata_reset() does nothing.)
According to http://www.ipodlinux.org/wiki/PP5020 and my own observations, IDE0_CFG & 0x80000000 can be used to hard-reset the ATA device without resetting the controller. Set the bit, wait >25 microseconds, negate, and wait >2 milliseconds. I am not submitting a patch to implement ata_reset() because (as I said earlier) I feel it is unnecessary.