summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
AgeCommit message (Collapse)Author
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-03Reinstate the awful ATA hack that has no proper reason to exist for iPod ↵Michael Sevakis
5.5g 60GB and/or 80GB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17682 a1c6a512-1295-4272-9138-f99709370657
2008-05-17Actually remove the ata lock hack code for that had been used for iPod Video ↵Michael Sevakis
60/80. It has been disabled for awhile anyway and the problem that nescessitated it really appears resolved. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17558 a1c6a512-1295-4272-9138-f99709370657
2008-05-11Disable the ata locking hack since a recent test strongly suggests it has ↵Michael Sevakis
been resolved as of r17426. Leave the code for now just in case. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17468 a1c6a512-1295-4272-9138-f99709370657
2008-05-10Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
2008-05-08Fix the short audio dropout at disk spinup from power-off on portalplayer ↵Jens Arnold
targets (observed on Mini G2, probably affected others as well). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17426 a1c6a512-1295-4272-9138-f99709370657
2008-05-08Apply 2 small size optimisations. * Put ICODE_ATTR into the function ↵Jens Arnold
definitions where applicable, saving the separate declaration. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17408 a1c6a512-1295-4272-9138-f99709370657
2008-05-06ata_hard_reset should be synchronized.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17397 a1c6a512-1295-4272-9138-f99709370657
2008-05-05Gigabeat S: Do the controller timing settings a more cleanly.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17379 a1c6a512-1295-4272-9138-f99709370657
2008-05-05Gigabeat S: Use the fastest PIO mode the installed drive allows instead of ↵Michael Sevakis
always PIO0. Centralize clock information in clkctl-imx31.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17371 a1c6a512-1295-4272-9138-f99709370657
2008-04-11iPod Video 30Gig doesn't seem to need the ata locking hack so we'll just ↵Michael Sevakis
attempt to remove it for this one. Works for me on 5.5g. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17071 a1c6a512-1295-4272-9138-f99709370657
2008-04-06Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now ↵Michael Sevakis
with shared variables in DRAM (it seems swp(b) is at least partially broken on all PP or I'm doing something very wrong here :\). For core-shared data use SHAREDBSS/DATA_ATTR. NOCACHEBSS/DATA_ATTR is available whether or not single core is forced for static peripheral-DMA buffer allocation without use of the UNCACHED_ADDR macro in code and is likely useful on a non-PP target with a data cache (although not actually enabled in config.h and the .lds's in this commit). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16981 a1c6a512-1295-4272-9138-f99709370657
2008-03-28Go back to the ata lock hack for 5g until whatever is going on there is ↵Michael Sevakis
discovered and fixed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16870 a1c6a512-1295-4272-9138-f99709370657
2008-03-25Add a complete priority inheritance implementation to the scheduler (all ↵Michael Sevakis
mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
2008-03-09Make Rockbox compatible with CF cards (FS #8644): 1) always init after ↵Peter D'Hoye
soft_reset (now nano can soft_reset too), 2) ignore error when setting advanced powermanagement, 3) fix minor bug where sleep mode flag was set even if the sleep command failed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16591 a1c6a512-1295-4272-9138-f99709370657
2008-03-09ATA driver: * Add protection against out-of-bounds accesses. Those can ↵Jens Arnold
happen e.g. with disks formatted in superfloppy mode, and were the cause for the excessive m:robe100 boot time with standard disk.c code. * Fix ata_mutex handling in case of errors on large sector targets (i.e. iPod Video). * Extra check for unsupported disk sizes when LBA48 support is enabled (>=2TiB). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16582 a1c6a512-1295-4272-9138-f99709370657
2008-03-08Revert accidental tree commit. Sorry for that.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16574 a1c6a512-1295-4272-9138-f99709370657
2008-03-08No need to have \n here. panicf() won't output it anyway.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16570 a1c6a512-1295-4272-9138-f99709370657
2008-02-22Remove sector 0 write protection from the ATA and MMC drivers. The one in ↵Jens Arnold
the ATA driver makes it impossible to change sector 0 from within rockbox USB mode, and nobody reported having seen that sector 0 panic for a loong time. Afaik it dates back to when ATA and filesystem write support were developed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16370 a1c6a512-1295-4272-9138-f99709370657
2008-02-22Give 5g owner's some immediate relief from playback trouble introduced in ↵Michael Sevakis
r16105 without reverting all the "spinlock" changes. A highly localized version of the patches in FS#8568. More permanent and correct measures are being worked out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16367 a1c6a512-1295-4272-9138-f99709370657
2008-02-14Do not waste RAM in the ATA driver. The identify info is a single sector.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16309 a1c6a512-1295-4272-9138-f99709370657
2008-02-11Some misc. ATA stuff: Increase threads' priority (important for idle ↵Michael Sevakis
callbacks to get done faster). Use a simpler loop for ata thread. Add a balancing mutex_lock call to ata_init (oops). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16278 a1c6a512-1295-4272-9138-f99709370657
2008-01-18Finally, out goes struct spinlock for anything but mutiprocessor targets ↵Michael Sevakis
where it becomes a reenterable corelock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
2008-01-18Properly serialize ata_init with other threads. Fix a bug that always ↵Michael Sevakis
initialized the lock on every call to ata_init - that should be a one time init or else the lock could be corrupted on connect. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16104 a1c6a512-1295-4272-9138-f99709370657
2007-11-03Finally: HDD power control for all PP502x iPods (4th gen Grayscale, Color, ↵Jens Arnold
Minis, Video). * Wait a short time after powering on the HDD on all disk based targets, as that seems like a good idea. Shorten the excessive wait on initial power on. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15444 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some ↵Michael Sevakis
threading code in IRAM that should be there on PP502x. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis
towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-08-01Add some new findings to the PP header files. * Clean up ata-target.h for ↵Jens Arnold
PP. * check_registers() seems to work fine on PP5002. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14114 a1c6a512-1295-4272-9138-f99709370657
2007-05-23ATA driver: * Support for drives with large physical sectors and no support ↵Jens Arnold
for partial access in the firmware (i.e. Toshiba MK8010GAH - iPod G5.5/80GB). Sequential writes with a single 512-byte buffer to that disk are really slow, so this is an intermediate solution that allows to adjust the FAT driver and the file system gradually. * Assume multisectors = 16 if the value reported by the drive is invalid (also MK8010GAH). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13480 a1c6a512-1295-4272-9138-f99709370657
2007-04-11Moved SH1 system code to target tree. * First shot at hwcompat cleanup.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13114 a1c6a512-1295-4272-9138-f99709370657
2007-03-09Put an end to priority inversion in the ata driver. Gave up trying to have ↵Michael Sevakis
fully atomic dual use mutexes so just replaced the ata driver locking with spins. Maybe I'll have better luck later. Things should run smoothly with database updates and such happening in the background. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12688 a1c6a512-1295-4272-9138-f99709370657
2007-03-04Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers
iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
2007-02-18Tiny size optimisation.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12396 a1c6a512-1295-4272-9138-f99709370657
2007-02-18Do the CONFIG_LED defineJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12383 a1c6a512-1295-4272-9138-f99709370657
2007-02-17Fix most (all?) CONFIG_LED warnings.Magnus Holmgren
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12370 a1c6a512-1295-4272-9138-f99709370657
2007-02-17ARM targets: Making a few functions non-static allows us to get rid of ↵Jens Arnold
-ffunction-sections, significantly decreasing binary size and making things run a bit faster because static functions are no longer long_call. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12349 a1c6a512-1295-4272-9138-f99709370657
2007-01-23Permanently enable powering down the disk when it's sleeping for supported ↵Nils Wallménius
targets (iriver h1xx, h3xx and h10, iaudio x5, gigabeat and archos recorders) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12094 a1c6a512-1295-4272-9138-f99709370657
2007-01-23Settings are now stored in /.rockbox/config.cfg instead of the hidden ↵Jonathan Gordon
sector. (FS #6557) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12093 a1c6a512-1295-4272-9138-f99709370657
2007-01-08Add a check to verify ATA driver has been initialised in ata_sleepnow().Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11949 a1c6a512-1295-4272-9138-f99709370657
2006-12-20renamed biglba to lba48, plus a slight optimizationJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11825 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Preparation for disks >137 GB, use BigLBA 48 bit addressing if necessary. ↵Jörg Hohensohn
Only activated with compile flag HAVE_BIGLBA. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11820 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Convert queues to use intptr_t for event data and return values as most of ↵Michael Sevakis
the time pointer are not passed and it should make some things a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Archos: Moved the ata_address_detect() code into ata_device_init(), removing ↵Jens Arnold
the associated #ifdef and some public #defines. Saves a tiny bit of code as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11812 a1c6a512-1295-4272-9138-f99709370657
2006-12-06Fix settings not saving to disk correctly, (fixes FS#6408)Jonathan Gordon
Stop playback.c requesting a rebuffer while not playing Shutting down from inside the menu will now save settings to disk, and entering the main menu will not force a setting save unless a setting actually changes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11674 a1c6a512-1295-4272-9138-f99709370657
2006-12-03Completed target tree move of the ata driver code. Some code cleanup.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11655 a1c6a512-1295-4272-9138-f99709370657
2006-11-29Prevent the click of death when connecting an ipod to usb.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11622 a1c6a512-1295-4272-9138-f99709370657
2006-11-26dont allow the ata callbacks to be run less than once every 30s unlessJonathan Gordon
explicitly forced to. The sleep_after param is only true in the Q_SLEEP event, so its uneeded, so removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11599 a1c6a512-1295-4272-9138-f99709370657
2006-11-12Get rid of ages-old interdependency between ata.c and mas.cJens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11519 a1c6a512-1295-4272-9138-f99709370657
2006-11-10Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
2006-11-09Bah, Linus was right, trying to call the ata_idle callbacks on usb andJonathan Gordon
shutdown doesnt work. Threads with callbacks must handle these 2 events instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11477 a1c6a512-1295-4272-9138-f99709370657