Commit graph

293 commits

Author SHA1 Message Date
Jonathan Gordon
3e24665c41 Fix settings not saving to disk correctly, (fixes FS#6408)
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-06 12:11:57 +00:00
Jens Arnold
31ffd7b154 Completed target tree move of the ata driver code. Some code cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11655 a1c6a512-1295-4272-9138-f99709370657
2006-12-03 22:13:44 +00:00
Miika Pekkarinen
077ed4925e Prevent the click of death when connecting an ipod to usb.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11622 a1c6a512-1295-4272-9138-f99709370657
2006-11-29 12:17:26 +00:00
Jonathan Gordon
4049d44b03 dont allow the ata callbacks to be run less than once every 30s unless
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-26 09:53:42 +00:00
Jens Arnold
8c3f0681b2 Get rid of ages-old interdependency between ata.c and mas.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11519 a1c6a512-1295-4272-9138-f99709370657
2006-11-12 14:17:49 +00:00
Jens Arnold
780f79e7a4 Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
2006-11-10 20:26:01 +00:00
Jonathan Gordon
fd0e640edd Bah, Linus was right, trying to call the ata_idle callbacks on usb and
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
2006-11-09 07:02:18 +00:00
Jonathan Gordon
d9f7ac24f4 fix booboo in ata.c (SYS_POWEROFF falling into SYS_USB_CONNECTED)
enable ata_idle callbacks in ata_mmc.c (calls the callbacks after 10s of
real inactivity)
fix builds


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11462 a1c6a512-1295-4272-9138-f99709370657
2006-11-08 02:23:01 +00:00
Jonathan Gordon
f184152c05 * changes to ata.c - idle callbacks are called after 2 sec of real idle,
and shutdown and usb (it makes sense here). ata_sleep doesnt get broken
by callbacks.
* allow ata_sleep() at the end of buffering again
* config block uses ata_idle instead of delayed sector when saving
* remove delayed sector code from ata_mmc.c (idle callbacks are not yet
implemented for ata_mmc.c tho)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
2006-11-08 01:55:26 +00:00
Jonathan Gordon
398c802710 dont spin up the disk to call the callbacks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11458 a1c6a512-1295-4272-9138-f99709370657
2006-11-07 13:14:52 +00:00
Jonathan Gordon
0b22795e26 adds ata_idle_notify system which allows callbacks in apps/ to be called
when the hard disk is idle but spinning, and just before shutting down.
on SWCODEC targets with > 8MB RAM the playback engine will try to
refill the buffer if it is less than 75% full while the disk is spinning
(temporarily disabled on the nano)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11451 a1c6a512-1295-4272-9138-f99709370657
2006-11-06 14:24:18 +00:00
Marcoen Hirschberg
ede3d646b9 move coldfire ata defines to a shared ata-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11395 a1c6a512-1295-4272-9138-f99709370657
2006-10-30 09:38:34 +00:00
Jonathan Gordon
139f9f28e9 move the iriver h1x0/h3x0 targets to the target tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11392 a1c6a512-1295-4272-9138-f99709370657
2006-10-30 08:56:06 +00:00
Marcoen Hirschberg
6c3c5fb188 cleanup ata.c a bit by moving portalplayer defines to target_tree and removing unused portalplayer and gigabeat code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11365 a1c6a512-1295-4272-9138-f99709370657
2006-10-27 11:56:17 +00:00
Thom Johansen
017b0d7b71 A better workaround due to ATA sleep bugs in the Ipod Nano. battery_bench and plugins like it should now work also on Nano.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11344 a1c6a512-1295-4272-9138-f99709370657
2006-10-25 17:31:29 +00:00
Miika Pekkarinen
a85044bf9e New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked
lists to eliminate unnecessary task switching to improve performance.
Audio should no longer skip on swcodec targets caused by too CPU
hungry UI thread or background threads.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-09-16 16:18:11 +00:00
Marcoen Hirschberg
dd754886f5 update the gigabeat code and move to target_tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10535 a1c6a512-1295-4272-9138-f99709370657
2006-08-12 08:01:54 +00:00
Jens Arnold
a8b0a6de2f ATA driver: * Don't lie to gcc about which parameters the assembler optimised loops touch. Fixes problems with higher optimisation levels. Some slight tweaks for SH1. * Prevent the assembler loops from being inlined as this is less efficient than having them in IRAM (only relevant at higher optimisation levels).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9828 a1c6a512-1295-4272-9138-f99709370657
2006-04-29 08:33:10 +00:00
Jens Arnold
4ac150e8d3 Get rid of the redundant APPLE_* macros. * Fix wrong comments in lcd-ipod.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9561 a1c6a512-1295-4272-9138-f99709370657
2006-04-08 09:08:38 +00:00
Jens Arnold
bf3dba8628 Coldfire: Assembler optimised disk writing, speed increase ~36% on average.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9117 a1c6a512-1295-4272-9138-f99709370657
2006-03-19 12:37:23 +00:00
Jens Arnold
14229df245 Fix s-t-u-p-i-d bug in the asm ata read routine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9098 a1c6a512-1295-4272-9138-f99709370657
2006-03-18 20:03:36 +00:00
Jens Arnold
5a121270aa Coldfire: Assembler optimised disk reading, speed increase ~40% on average.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9092 a1c6a512-1295-4272-9138-f99709370657
2006-03-18 10:12:50 +00:00
Linus Nielsen Feltzing
838a7020c7 ATA driver: Fixed a flaw in check_registers(), and added support for iAudio X5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8948 a1c6a512-1295-4272-9138-f99709370657
2006-03-07 13:25:19 +00:00
Marcoen Hirschberg
8d0a32eb4b gigabeat related changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8885 a1c6a512-1295-4272-9138-f99709370657
2006-03-02 13:28:24 +00:00
Marcoen Hirschberg
338e2bbb0c first gigabeat commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8831 a1c6a512-1295-4272-9138-f99709370657
2006-02-24 15:42:52 +00:00
Thom Johansen
4b98554083 Fix slow shutdown on ipod nano.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8741 a1c6a512-1295-4272-9138-f99709370657
2006-02-19 21:22:24 +00:00
Dave Chapman
465596b163 More iPod 3G code from Seven Le Mesle
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8582 a1c6a512-1295-4272-9138-f99709370657
2006-02-05 17:16:34 +00:00
Linus Nielsen Feltzing
9b0822d76a Make it compile on iAudio X5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8543 a1c6a512-1295-4272-9138-f99709370657
2006-02-02 23:07:11 +00:00
Dave Chapman
cf0e3d355c iPod: Fix endian bug with disk reads and writes to a non-aligned memory buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8369 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 14:04:30 +00:00
Thom Johansen
d47bb3c05e Temp fix for iPod Nano. Disable ATA sleep, as this will hang disk accesses.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8357 a1c6a512-1295-4272-9138-f99709370657
2006-01-16 23:23:39 +00:00
Jens Arnold
8790056691 Fixed yellow iPod builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8062 a1c6a512-1295-4272-9138-f99709370657
2005-11-24 00:51:57 +00:00
Jens Arnold
548755adf1 Fixed disk icon display in remote status bar on iriver. * Rolled back led.c changes, introducing a changed #if condition only. Reduces code size on targets with real controllable LED.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8059 a1c6a512-1295-4272-9138-f99709370657
2005-11-24 00:10:14 +00:00
Linus Nielsen Feltzing
f4c2b96daa H300 has no ATA LED
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7961 a1c6a512-1295-4272-9138-f99709370657
2005-11-18 14:06:50 +00:00
Linus Nielsen Feltzing
73a35a1aa4 Reverted erroneous commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7918 a1c6a512-1295-4272-9138-f99709370657
2005-11-16 23:42:19 +00:00
Linus Nielsen Feltzing
df0e5effc5 Cleaned up bootloader linker control file and added the H300 target
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7916 a1c6a512-1295-4272-9138-f99709370657
2005-11-16 23:15:59 +00:00
Dave Chapman
622f9334db Use ICODE_ATTR instead of __attribute__ ((section(".icode")))
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7820 a1c6a512-1295-4272-9138-f99709370657
2005-11-12 14:48:52 +00:00
Dave Chapman
d31a32c501 iPod: Code cleanup - the bootloader now compiles with zero warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7812 a1c6a512-1295-4272-9138-f99709370657
2005-11-11 17:51:35 +00:00
Dave Chapman
64c4f19811 Remove #warning left over from debugging. Sorry about that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7790 a1c6a512-1295-4272-9138-f99709370657
2005-11-08 12:10:37 +00:00
Miika Pekkarinen
f6c8058695 Fixed the bug in ata.c preventing files from being read correctly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7789 a1c6a512-1295-4272-9138-f99709370657
2005-11-08 11:41:56 +00:00
Jens Arnold
a8c1c20305 Removed unused ata_standby(), changed return type of ata_sleep() to void, removed misleading comment from ata.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7782 a1c6a512-1295-4272-9138-f99709370657
2005-11-07 23:19:06 +00:00
Dave Chapman
77372d1218 Initial commit of work-in-progress iPod port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7781 a1c6a512-1295-4272-9138-f99709370657
2005-11-07 23:07:19 +00:00
Dave Chapman
9e19c95d8e Replace SWAB16 and SWAB32 with a comprehensive set of byte-swap macros - letoh16, letoh32, htole16, htole32, betoh16, betoh32, htobe16 and htobe32
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7584 a1c6a512-1295-4272-9138-f99709370657
2005-10-06 19:27:43 +00:00
Linus Nielsen Feltzing
192a604cd4 Atomic GPIO access
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7114 a1c6a512-1295-4272-9138-f99709370657
2005-07-12 07:25:01 +00:00
Jens Arnold
5690f78fb2 Multiple choice LED configuration instead of HAVE_LED. Removes erroneous MMC icon display on iriver, and saves some code on Ondio. Removed invert_led() as it is no longer used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6568 a1c6a512-1295-4272-9138-f99709370657
2005-06-04 23:15:52 +00:00
Jens Arnold
97599d3e47 This should (hopefully) fix the long-standing RLD problem once and for all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6452 a1c6a512-1295-4272-9138-f99709370657
2005-05-10 22:39:53 +00:00
Linus Nielsen Feltzing
f64b52ae38 Oops
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6402 a1c6a512-1295-4272-9138-f99709370657
2005-05-04 05:37:12 +00:00
Linus Nielsen Feltzing
68482bbed2 Patch #868645 by Philipp Pertermann, volume triggered recording for the Archos recording devices
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6243 a1c6a512-1295-4272-9138-f99709370657
2005-04-04 09:12:12 +00:00
Linus Nielsen Feltzing
a79cb485b6 iRiver: ATA timing is now setup by set_cpu_frequency()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6207 a1c6a512-1295-4272-9138-f99709370657
2005-03-18 11:37:33 +00:00
Linus Nielsen Feltzing
8444632da4 iRiver: more relaxed default timing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6090 a1c6a512-1295-4272-9138-f99709370657
2005-03-01 14:31:37 +00:00
Jean-Philippe Bernardy
fc19445ba0 more long policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6065 a1c6a512-1295-4272-9138-f99709370657
2005-02-25 18:50:16 +00:00
Jean-Philippe Bernardy
376057d2b6 Gmini SMSC chip improvements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6030 a1c6a512-1295-4272-9138-f99709370657
2005-02-22 09:55:40 +00:00
Jean-Philippe Bernardy
a3ed6e9c7a Gmini
* advances in the handling of the smsc chip
 * moved stuff to where it belongs


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6023 a1c6a512-1295-4272-9138-f99709370657
2005-02-19 21:34:03 +00:00
Linus Nielsen Feltzing
d4313ce88b iRiver: Correct cold start detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5824 a1c6a512-1295-4272-9138-f99709370657
2005-02-07 01:47:22 +00:00
Linus Nielsen Feltzing
3d9be05fba Use proper CPU defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5811 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 04:04:24 +00:00
Linus Nielsen Feltzing
2c6f08ddfc Added ISD chip power control setup and used proper define for the MCF5249
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5808 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 03:11:03 +00:00
Linus Nielsen Feltzing
3a777cd79c iriver: ATA controller register setup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5807 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 03:00:30 +00:00
Linus Nielsen Feltzing
e085a51b07 iriver: fixed ATA enable setup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5806 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 02:58:43 +00:00
Linus Nielsen Feltzing
085032bf02 Aligned thread stack, correct CONTROL register for iRiver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5802 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 02:32:53 +00:00
Jean-Philippe Bernardy
99d2a4b436 fixes for gmini
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5664 a1c6a512-1295-4272-9138-f99709370657
2005-01-26 14:42:48 +00:00
Linus Nielsen Feltzing
4058b79c70 Ported ATA driver to iRiver, minor code policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5663 a1c6a512-1295-4272-9138-f99709370657
2005-01-26 12:53:48 +00:00
Jean-Philippe Bernardy
34d2a71fdd More int -> long
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5654 a1c6a512-1295-4272-9138-f99709370657
2005-01-24 14:26:24 +00:00
Jean-Philippe Bernardy
a6467334b0 Factored out some macros
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5623 a1c6a512-1295-4272-9138-f99709370657
2005-01-20 23:29:48 +00:00
Jean-Philippe Bernardy
99e72c8758 Support for gmini ATA interface
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5622 a1c6a512-1295-4272-9138-f99709370657
2005-01-20 23:00:11 +00:00
Jörg Hohensohn
575c9049f6 behave for multi-volume
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5520 a1c6a512-1295-4272-9138-f99709370657
2004-12-29 22:37:31 +00:00
Jörg Hohensohn
da84857631 prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657
2004-12-28 22:16:07 +00:00
Jens Arnold
f05dec5702 Retry initializing the harddisk with hard reset in case the first try fails. Fixes panic when starting flashed rockbox by leaving the archos charging screen with On.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5461 a1c6a512-1295-4272-9138-f99709370657
2004-11-23 22:00:41 +00:00
Jens Arnold
7ebb5d915e Moved player ATA power handling to the correct functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5449 a1c6a512-1295-4272-9138-f99709370657
2004-11-20 14:17:43 +00:00
Jens Arnold
2a89e7d122 New players: switch on the HD in ata_init()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5443 a1c6a512-1295-4272-9138-f99709370657
2004-11-20 00:15:12 +00:00
Jens Arnold
8eedc94018 Fixed warning when compiling with PREFER_C_WRITING
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5229 a1c6a512-1295-4272-9138-f99709370657
2004-10-08 19:20:20 +00:00
Linus Nielsen Feltzing
d681087ad0 Correct CPU type handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5202 a1c6a512-1295-4272-9138-f99709370657
2004-10-07 07:09:49 +00:00
Björn Stenberg
b60b29f442 Compile ata_mmc.c for targets with mmc, ata.c for all others.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5174 a1c6a512-1295-4272-9138-f99709370657
2004-10-05 08:11:11 +00:00
Jörg Hohensohn
593cc00447 a hell of a commit: changed several HAVE_xx configuration flags into multiple choice values (keypad, tuner, CPU, h/w codec)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5126 a1c6a512-1295-4272-9138-f99709370657
2004-09-28 22:13:26 +00:00
Björn Stenberg
65bf851ece Added preliminary support for Iriver H100
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5089 a1c6a512-1295-4272-9138-f99709370657
2004-09-17 11:28:07 +00:00
Jörg Hohensohn
00be7469d6 prepared Ondio USB passthrough (but doesn't work yet)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5066 a1c6a512-1295-4272-9138-f99709370657
2004-09-11 09:06:58 +00:00
Jörg Hohensohn
57ea92cae1 prepared an empty MMC driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5065 a1c6a512-1295-4272-9138-f99709370657
2004-09-11 03:48:05 +00:00
Jens Arnold
0ceaa5e365 Const policed pointer arguments to functions, part 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
2004-08-17 01:45:48 +00:00
Jens Arnold
2b0694c694 More const policeing step 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4982 a1c6a512-1295-4272-9138-f99709370657
2004-08-03 05:58:46 +00:00
Jens Arnold
b40591947d Enabled assembler optimized disk reading and writing (approx. 2 times as fast)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4825 a1c6a512-1295-4272-9138-f99709370657
2004-07-05 13:44:53 +00:00
Jens Arnold
44e76cfa86 Disabled automatic disk spindown (by the drive). Updated comments regarding timing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4733 a1c6a512-1295-4272-9138-f99709370657
2004-06-11 06:56:51 +00:00
Jörg Hohensohn
9c52b24b00 patch #922836 by Jens: way faster disk writing, in assembler. The code is in, but yet disabled by #define PREFER_C_WRITING unless it's proven safe for all disks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4460 a1c6a512-1295-4272-9138-f99709370657
2004-04-01 05:46:31 +00:00
Linus Nielsen Feltzing
8bda0e1097 A hip shot trying to make the Red LED Death situation a little better
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4409 a1c6a512-1295-4272-9138-f99709370657
2004-03-19 13:26:43 +00:00
Jörg Hohensohn
5fb1e1024f - no second ata_hard_reset() call, saves ~2.5 seconds flash boot time (please test)
- Jens' new assembler code in copy_read_sectors(), but still disabled


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4358 a1c6a512-1295-4272-9138-f99709370657
2004-03-10 14:15:14 +00:00
Linus Nielsen Feltzing
3a6e2f497b Reverted the STANDBY fix from 2004-02-15, rev 1.106
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4352 a1c6a512-1295-4272-9138-f99709370657
2004-03-09 08:52:14 +00:00
Linus Nielsen Feltzing
68331ffb08 Now sets the highest possible PIO mode in set_features()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4328 a1c6a512-1295-4272-9138-f99709370657
2004-03-02 09:55:23 +00:00
Linus Nielsen Feltzing
97955a714b fixed compiling errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4310 a1c6a512-1295-4272-9138-f99709370657
2004-02-17 01:31:50 +00:00
Linus Nielsen Feltzing
867415b3f8 set_features() is now called from ata_power_on()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4309 a1c6a512-1295-4272-9138-f99709370657
2004-02-17 01:30:25 +00:00
Linus Nielsen Feltzing
7bd92239ca Silly me, I forgot to remove my debugging code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4308 a1c6a512-1295-4272-9138-f99709370657
2004-02-16 23:27:02 +00:00
Linus Nielsen Feltzing
c3b9720ab4 Bug 1: The STANDBY mode is now explicitly disabled, since it could be set to 30s at powerup. Bug 2: set_features() wasn't called in ata_power_on().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4307 a1c6a512-1295-4272-9138-f99709370657
2004-02-16 23:25:01 +00:00
Jörg Hohensohn
dee17f7102 Assembly code for copy_read_sectors() disabled: Tests with Trent showed that this is to blame for file system corruptions, even waitstates didn't fix it. No idea why, sorry...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4304 a1c6a512-1295-4272-9138-f99709370657
2004-02-15 08:44:02 +00:00
Jörg Hohensohn
b646d4f278 Assembly code for copy_read_sectors() reworked: I've spread the ATA reads apart by filling independent instructions inbetween, this is also slightly faster because of no pipeline stall. Hopefully this fixes the problem Kargatron had with it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4302 a1c6a512-1295-4272-9138-f99709370657
2004-02-09 08:24:25 +00:00
Jörg Hohensohn
bf4460e477 no code change, I just forgot to take my template disassembly out (a big comment block)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4282 a1c6a512-1295-4272-9138-f99709370657
2004-01-27 09:38:59 +00:00
Jörg Hohensohn
cb570b9263 Assembler optimized copy_read_sectors() gives another speedup of factor 1.4 for aligned and 1.2 for misaligned. Including my previous change the file reading is now nearly twice as fast compared to when I started this. -> Less disk uptime, longer battery life.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4281 a1c6a512-1295-4272-9138-f99709370657
2004-01-27 09:12:51 +00:00
Jörg Hohensohn
862d2b5e3a warning + obsolete variable removed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4248 a1c6a512-1295-4272-9138-f99709370657
2004-01-16 09:28:39 +00:00
Jörg Hohensohn
88faf38ef7 Optimized the sector read loop as much as C allows. I measured an overall speed improvement for file reading of 12.5% for 16-bit aligned and 35% for misaligned. I took the rest of ata_read_sectors() out of IRAM, it's sufficient if only the copy loop stays there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4247 a1c6a512-1295-4272-9138-f99709370657
2004-01-16 09:02:21 +00:00
Björn Stenberg
a53afc0330 Added acoustic management, power management and read look-ahead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4230 a1c6a512-1295-4272-9138-f99709370657
2004-01-14 13:15:19 +00:00
Björn Stenberg
1fe97ec54e Improved timing in soft_reset. This hopefully cures spontaneous Red Led freezes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4161 a1c6a512-1295-4272-9138-f99709370657
2003-12-17 20:15:12 +00:00
Daniel Stenberg
006b2c1c25 adjustments for Neo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4130 a1c6a512-1295-4272-9138-f99709370657
2003-12-12 13:23:33 +00:00
Jörg Hohensohn
44298163ba No more spinning disk while charging flashed FM+V2 (you need the new bootloader to utilize it). ToDo: remove now false voltage reading from charging screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4095 a1c6a512-1295-4272-9138-f99709370657
2003-12-03 01:03:54 +00:00
Linus Nielsen Feltzing
bef7ab0c26 The code police strikes back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4024 a1c6a512-1295-4272-9138-f99709370657
2003-11-07 12:15:24 +00:00
Jörg Hohensohn
75bab49a54 set/clear port bits with atomic instructions instead of read-modify-write, saves time+space, allows port usage in ISR
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4022 a1c6a512-1295-4272-9138-f99709370657
2003-11-06 01:34:50 +00:00
Jörg Hohensohn
118d45eb92 ATA io_address_detect() now doesn't probe any more, but uses the h/w mask. Probing failed for some flash users. I hope this works for everybody, we have to try to find out.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3946 a1c6a512-1295-4272-9138-f99709370657
2003-09-01 05:48:42 +00:00
Jörg Hohensohn
f4b677eb3c report sleeping disk while not initialized, needed for changing before ata_init()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3844 a1c6a512-1295-4272-9138-f99709370657
2003-07-18 21:55:06 +00:00
Björn Stenberg
9cb5e0e9f9 Initalize last_disk_activity
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3830 a1c6a512-1295-4272-9138-f99709370657
2003-07-11 19:11:06 +00:00
Björn Stenberg
c695f26c9f Fixed spindown bug: last_disk_activity was set 10 seconds into the future, which resulted in too long spindown delays.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3826 a1c6a512-1295-4272-9138-f99709370657
2003-07-10 13:32:15 +00:00
Björn Stenberg
9f372f1f59 Cold start fixes: master_slave_select() now checks for BSY as well as RDY (since disks are BSY during powerup). Also, wait_for_bsy() looks at ATA_STATUS instead of ATA_ALT_STATUS, since the address of ATA_ALT_STATUS is not determined until later.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3822 a1c6a512-1295-4272-9138-f99709370657
2003-07-09 22:04:31 +00:00
Björn Stenberg
efd2f356c7 Removed warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3821 a1c6a512-1295-4272-9138-f99709370657
2003-07-09 16:46:46 +00:00
Jörg Hohensohn
bbfaf26e11 again different coldstart, ata_init() now has non-ambiguous return codes for better diagnostics
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3820 a1c6a512-1295-4272-9138-f99709370657
2003-07-09 07:18:47 +00:00
Jörg Hohensohn
adef8fb17e better place and method for the spinup wait code, still I'd welcome comments on this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3815 a1c6a512-1295-4272-9138-f99709370657
2003-07-08 06:33:30 +00:00
Jörg Hohensohn
d1a3a3e148 When starting from flash, we have to wait for the disk to get ready. (Quite a new situation ;-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3803 a1c6a512-1295-4272-9138-f99709370657
2003-07-03 00:02:15 +00:00
Jörg Hohensohn
545efb6c28 port inits for cold start ability
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3764 a1c6a512-1295-4272-9138-f99709370657
2003-06-26 21:29:13 +00:00
Linus Nielsen Feltzing
159d04d3f9 Experiment: enable ATA STANDBY when switching to USB mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3668 a1c6a512-1295-4272-9138-f99709370657
2003-05-10 01:55:23 +00:00
Björn Stenberg
674b632df8 Corrected wrong write return code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3623 a1c6a512-1295-4272-9138-f99709370657
2003-04-28 12:02:14 +00:00
Linus Nielsen Feltzing
b5401749cb ata_write_sectors() didn't handle odd buffer addresses
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3544 a1c6a512-1295-4272-9138-f99709370657
2003-04-12 23:02:58 +00:00
Björn Stenberg
cf92db153f Don't enter cpu sleep during disk operations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3530 a1c6a512-1295-4272-9138-f99709370657
2003-04-11 07:43:04 +00:00
Linus Nielsen Feltzing
4502e982af The newest ATA driver fixes broke the ata_spinup_time information
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3515 a1c6a512-1295-4272-9138-f99709370657
2003-04-05 22:25:21 +00:00
Björn Stenberg
fd9ce90a4c Better led control. Added status read delay. Fixed potential last_disk_activity race.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3501 a1c6a512-1295-4272-9138-f99709370657
2003-03-31 14:14:07 +00:00
Björn Stenberg
aa78324fde Another attempt to stop the red led dead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3498 a1c6a512-1295-4272-9138-f99709370657
2003-03-24 16:19:54 +00:00
Björn Stenberg
7682d46713 Don't spin down disk while retrying
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3457 a1c6a512-1295-4272-9138-f99709370657
2003-03-17 13:42:30 +00:00
Björn Stenberg
bb6e51aa0d Moved read code around a bit to more strictly obey the ATA specification.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3444 a1c6a512-1295-4272-9138-f99709370657
2003-03-14 16:06:09 +00:00
Björn Stenberg
b12401b4d4 Initialize return code at start of loop, not at the end.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3440 a1c6a512-1295-4272-9138-f99709370657
2003-03-13 15:45:38 +00:00
Björn Stenberg
6a58106e97 An attempt to get rid of the "red freeze" problem: Perform a soft reset on read error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3351 a1c6a512-1295-4272-9138-f99709370657
2003-02-27 13:26:09 +00:00
Björn Stenberg
c4d8d970f6 The power-saving SLEEP patch by Simon Elén.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3259 a1c6a512-1295-4272-9138-f99709370657
2003-02-14 09:44:34 +00:00
Björn Stenberg
efd90770a0 Bug fix: Don't cut the power during spinup...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2959 a1c6a512-1295-4272-9138-f99709370657
2002-12-06 15:17:30 +00:00
Björn Stenberg
bd0da0e822 Fixed a race condition between sleep thread and spinup code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2958 a1c6a512-1295-4272-9138-f99709370657
2002-12-06 13:08:42 +00:00
Björn Stenberg
ba0438e78d Fixed spinup clocking. Also updating last_disk_activity more frequently, to avoid shutdown race condition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2935 a1c6a512-1295-4272-9138-f99709370657
2002-12-05 09:35:01 +00:00
Björn Stenberg
b070dd55be Added disk spinup clocking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2927 a1c6a512-1295-4272-9138-f99709370657
2002-12-04 14:58:48 +00:00
Björn Stenberg
c032e65034 Bug fix: Master/slave was not always properly selected after powerdown.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2910 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 13:29:35 +00:00
Björn Stenberg
45d32cec5b Added 'Disk info' to debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2908 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 13:12:55 +00:00
Daniel Stenberg
2094d45af0 use the proper #ifdef for a feature
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2903 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 12:02:26 +00:00
Björn Stenberg
1ea00d1a03 Added a >2ms delay in ata_hard_reset() before reading status, as per ATA specificatione (pedantic mode entered)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2902 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 11:26:39 +00:00
Björn Stenberg
c2cb6a67c4 Bug fix: A failed read could return OK.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2899 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 08:53:06 +00:00
Björn Stenberg
7249c8807c Updated power-on procedure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2896 a1c6a512-1295-4272-9138-f99709370657
2002-12-02 10:30:40 +00:00
Daniel Stenberg
cf1368145a HAVE_ATA_POWER_OFF is now defined and used if the platform has support for
that control


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2889 a1c6a512-1295-4272-9138-f99709370657
2002-11-29 07:05:27 +00:00
Björn Stenberg
2b77b4fdd5 Added option to enable/disable disk poweroff (for diagnostic purposes)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2888 a1c6a512-1295-4272-9138-f99709370657
2002-11-28 22:46:19 +00:00
Björn Stenberg
494d261de3 Added disk poweroff 2s after spindown. (Only for recorders yet.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2887 a1c6a512-1295-4272-9138-f99709370657
2002-11-27 15:55:47 +00:00
Björn Stenberg
f11e3c0bba Erroneous commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2877 a1c6a512-1295-4272-9138-f99709370657
2002-11-22 23:56:07 +00:00
Björn Stenberg
ac88b9e5ff Fixed warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2876 a1c6a512-1295-4272-9138-f99709370657
2002-11-22 23:55:08 +00:00
Björn Stenberg
099a6b58d1 Added extra safety checks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2839 a1c6a512-1295-4272-9138-f99709370657
2002-11-12 20:02:23 +00:00
Björn Stenberg
f9fed8152a Changed return code of ata_write_sectors() to be the same as for ata_read_sectors(). (0 == Success)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2811 a1c6a512-1295-4272-9138-f99709370657
2002-11-07 22:40:24 +00:00
Björn Stenberg
7526cf70c3 Improved retry handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2415 a1c6a512-1295-4272-9138-f99709370657
2002-09-25 14:10:50 +00:00
Björn Stenberg
c909b4b42e Check status register for error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2400 a1c6a512-1295-4272-9138-f99709370657
2002-09-24 17:10:03 +00:00
Björn Stenberg
70747f9bf3 Added read retry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2397 a1c6a512-1295-4272-9138-f99709370657
2002-09-24 14:23:18 +00:00
Linus Nielsen Feltzing
040e80c3ad Now exports last_disk_activity, for auto-poweroff
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2373 a1c6a512-1295-4272-9138-f99709370657
2002-09-23 11:39:21 +00:00
Björn Stenberg
5c530c5227 Bug fix: The LED was not on during writes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2368 a1c6a512-1295-4272-9138-f99709370657
2002-09-23 06:45:46 +00:00
Björn Stenberg
8e96c47ff0 Made the sleep code a little bit less aggressive.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2220 a1c6a512-1295-4272-9138-f99709370657
2002-09-06 23:55:52 +00:00
Björn Stenberg
34fa70e321 Now runs SET_MULTIPLE_MODE after usb disconnect, since the windows driver sets it to a non-default value.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2214 a1c6a512-1295-4272-9138-f99709370657
2002-09-06 17:20:44 +00:00
Linus Nielsen Feltzing
e82f701fa4 Optimized ata_read_sectors() a little
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2213 a1c6a512-1295-4272-9138-f99709370657
2002-09-06 16:02:19 +00:00
Björn Stenberg
8ccbc766a4 Now uses READ MULTIPLE command. Also corrected some return values.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2186 a1c6a512-1295-4272-9138-f99709370657
2002-09-05 15:25:08 +00:00
Björn Stenberg
e65b65eeb0 Increased BSY & RDY timeouts to 10 seconds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2174 a1c6a512-1295-4272-9138-f99709370657
2002-09-04 20:15:45 +00:00
Linus Nielsen Feltzing
00c1e0533b Ooops! perform_soft_reset() unlocked the mutex...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2132 a1c6a512-1295-4272-9138-f99709370657
2002-09-02 12:48:08 +00:00