Index: apps/settings.c =================================================================== RCS file: /cvsroot/rockbox/apps/settings.c,v retrieving revision 1.439 diff -u -r1.439 settings.c --- apps/settings.c 6 Dec 2006 12:11:56 -0000 1.439 +++ apps/settings.c 8 Dec 2006 10:24:28 -0000 @@ -100,7 +100,7 @@ #include "eq_menu.h" #endif -#define CONFIG_BLOCK_VERSION 56 +#define CONFIG_BLOCK_VERSION 57 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 @@ -415,9 +415,6 @@ #endif /* disk */ #ifndef HAVE_MMC -#ifdef HAVE_ATA_POWER_OFF - {1, S_O(disk_poweroff), false, "disk poweroff", off_on }, -#endif {8, S_O(disk_spindown), 5, "disk spindown", NULL }, #endif /* HAVE_MMC */ @@ -1178,9 +1175,6 @@ dac_line_in(global_settings.line_in); #endif mpeg_id3_options(global_settings.id3_v1_first); -#ifdef HAVE_ATA_POWER_OFF - ata_poweroff(global_settings.disk_poweroff); -#endif set_poweroff_timeout(global_settings.poweroff); Index: apps/settings.h =================================================================== RCS file: /cvsroot/rockbox/apps/settings.h,v retrieving revision 1.255 diff -u -r1.255 settings.h --- apps/settings.h 24 Nov 2006 19:49:02 -0000 1.255 +++ apps/settings.h 8 Dec 2006 10:24:28 -0000 @@ -276,7 +276,6 @@ int ff_rewind_min_step; /* FF/Rewind minimum step size */ int ff_rewind_accel; /* FF/Rewind acceleration (in seconds per doubling) */ int disk_spindown; /* time until disk spindown, in seconds (0=off) */ - bool disk_poweroff; /* whether to cut disk power after spindown or not */ int buffer_margin; /* MP3 buffer watermark margin, in seconds */ int peak_meter_release; /* units per read out */ Index: apps/settings_menu.c =================================================================== RCS file: /cvsroot/rockbox/apps/settings_menu.c,v retrieving revision 1.282 diff -u -r1.282 settings_menu.c --- apps/settings_menu.c 13 Nov 2006 00:45:20 -0000 1.282 +++ apps/settings_menu.c 8 Dec 2006 10:24:28 -0000 @@ -1105,14 +1105,6 @@ ata_spindown, 1, 3, 254, NULL ); } -#ifdef HAVE_ATA_POWER_OFF -static bool poweroff(void) -{ - bool rc = set_bool(str(LANG_POWEROFF), &global_settings.disk_poweroff); - ata_poweroff(global_settings.disk_poweroff); - return rc; -} -#endif /* HAVE_ATA_POWEROFF */ #endif /* !HAVE_MMC */ #if CONFIG_CODEC == MAS3507D @@ -2115,9 +2107,6 @@ static const struct menu_item items[] = { { ID2P(LANG_SPINDOWN), spindown }, -#ifdef HAVE_ATA_POWER_OFF - { ID2P(LANG_POWEROFF), poweroff }, -#endif #ifdef HAVE_DIRCACHE { ID2P(LANG_DIRCACHE_ENABLE), dircache }, #endif Index: apps/lang/english.lang =================================================================== RCS file: /cvsroot/rockbox/apps/lang/english.lang,v retrieving revision 1.303 diff -u -r1.303 english.lang --- apps/lang/english.lang 30 Nov 2006 22:29:48 -0000 1.303 +++ apps/lang/english.lang 8 Dec 2006 10:24:30 -0000 @@ -3847,16 +3847,16 @@ id: LANG_POWEROFF - desc: disk poweroff flag + desc: DEPRECATED user: - *: "Disk Poweroff" + *: "" - *: "Disk Poweroff" + *: deprecated - *: "Disk Poweroff" + *: "" Index: firmware/powermgmt.c =================================================================== RCS file: /cvsroot/rockbox/firmware/powermgmt.c,v retrieving revision 1.138 diff -u -r1.138 powermgmt.c --- firmware/powermgmt.c 7 Dec 2006 19:46:36 -0000 1.138 +++ firmware/powermgmt.c 8 Dec 2006 10:24:30 -0000 @@ -30,7 +30,6 @@ #include "ata.h" #include "power.h" #include "button.h" -#include "ata.h" #include "audio.h" #include "mp3_playback.h" #include "usb.h" @@ -627,9 +626,6 @@ remote_backlight_set_timeout(2); #endif ata_spindown(3); -#ifdef HAVE_ATA_POWER_OFF - ata_poweroff(true); -#endif low_battery = true; } else if (low_battery && (battery_percent > 11)) { backlight_set_timeout(10); Index: firmware/drivers/ata.c =================================================================== RCS file: /cvsroot/rockbox/firmware/drivers/ata.c,v retrieving revision 1.193 diff -u -r1.193 ata.c --- firmware/drivers/ata.c 6 Dec 2006 12:11:57 -0000 1.193 +++ firmware/drivers/ata.c 8 Dec 2006 10:24:31 -0000 @@ -61,6 +61,10 @@ #define READ_TIMEOUT 5*HZ +#ifdef HAVE_ATA_POWER_OFF +#define ATA_POWER_OFF_TIMEOUT 2*HZ +#endif + static struct mutex ata_mtx; int ata_device; /* device 0 (master) or 1 (slave) */ @@ -73,9 +77,6 @@ static bool sleeping = true; static bool poweroff = false; static long sleep_timeout = 5*HZ; -#ifdef HAVE_ATA_POWER_OFF -static int poweroff_timeout = 2*HZ; -#endif static long ata_stack[DEFAULT_STACK_SIZE/sizeof(long)]; static const char ata_thread_name[] = "ata"; static struct event_queue ata_queue; @@ -527,16 +528,6 @@ sleep_timeout = seconds * HZ; } -#ifdef HAVE_ATA_POWER_OFF -void ata_poweroff(bool enable) -{ - if (enable) - poweroff_timeout = 2*HZ; - else - poweroff_timeout = 0; -} -#endif - bool ata_disk_is_active(void) { return !sleeping; @@ -620,8 +611,8 @@ } } #ifdef HAVE_ATA_POWER_OFF - if ( !spinup && sleeping && poweroff_timeout && !poweroff && - TIME_AFTER( current_tick, last_sleep + poweroff_timeout )) + if ( !spinup && sleeping && ATA_POWER_OFF_TIMEOUT && !poweroff && + TIME_AFTER( current_tick, last_sleep + ATA_POWER_OFF_TIMEOUT )) { mutex_lock(&ata_mtx); ide_power_enable(false); Index: firmware/export/ata.h =================================================================== RCS file: /cvsroot/rockbox/firmware/export/ata.h,v retrieving revision 1.9 diff -u -r1.9 ata.h --- firmware/export/ata.h 29 Nov 2006 12:17:26 -0000 1.9 +++ firmware/export/ata.h 8 Dec 2006 10:24:31 -0000 @@ -38,7 +38,6 @@ extern void ata_enable(bool on); extern void ata_spindown(int seconds); -extern void ata_poweroff(bool enable); extern void ata_sleep(void); extern void ata_sleepnow(void); extern bool ata_disk_is_active(void);