mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
ipod: Turn on SMART support for all PP502x-based iPods
Unless you've modded the device with modern CF or mSATA storage, it's not likely to achieve anything. the original hard drives (supposedly) lack SMART support, and none of the SD adapters bother to emulate it. Change-Id: Id3cbe717c64947faf4b23d8c84a04b822cfb35da
This commit is contained in:
parent
c307fd5525
commit
4960a3b753
7 changed files with 22 additions and 3 deletions
|
@ -742,9 +742,9 @@ static int ata_smart(uint16_t *buf, uint8_t cmd)
|
|||
return -1;
|
||||
}
|
||||
|
||||
ATA_OUT8(&ATA_PIO_FED, cmd);
|
||||
ATA_OUT8(&ATA_PIO_HCYL, 0xc2);
|
||||
ATA_OUT8(&ATA_PIO_LCYL, 0x4f);
|
||||
ATA_OUT8(ATA_FEATURE, cmd);
|
||||
ATA_OUT8(ATA_HCYL, 0xc2);
|
||||
ATA_OUT8(ATA_LCYL, 0x4f);
|
||||
ATA_OUT8(ATA_SELECT, SELECT_LBA | ata_device);
|
||||
ATA_OUT8(ATA_COMMAND, CMD_SMART);
|
||||
|
||||
|
@ -759,6 +759,7 @@ static int ata_smart(uint16_t *buf, uint8_t cmd)
|
|||
this info differently that normal sector data */
|
||||
buf[i] = ATA_SWAP_IDENTIFY(ATA_IN16(ATA_DATA));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int ata_read_smart(struct ata_smart_values* smart_data, uint8_t cmd)
|
||||
{
|
||||
|
|
|
@ -153,6 +153,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* Define this if you want to use the PP5002 i2c interface */
|
||||
#define CONFIG_I2C I2C_PP5002
|
||||
|
||||
|
|
|
@ -175,6 +175,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
//#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
|
||||
|
|
|
@ -162,6 +162,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
//#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
|
||||
|
|
|
@ -171,6 +171,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
//#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
|
||||
|
|
|
@ -172,6 +172,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
/*#define HAVE_POWEROFF_WHILE_CHARGING */
|
||||
|
||||
|
|
|
@ -182,6 +182,9 @@
|
|||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Turn on SMART support */
|
||||
#define HAVE_ATA_SMART
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
//#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue