mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
YH92x: Implement ATA power off.
Change-Id: If1f48df42ea7a150365c4ddbd3f9f7a85ae4b7dc
This commit is contained in:
parent
81db2f5eb0
commit
6363294591
3 changed files with 19 additions and 3 deletions
|
|
@ -52,15 +52,31 @@ unsigned int power_input_status(void)
|
|||
|
||||
void ide_power_enable(bool on)
|
||||
{
|
||||
#if defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
|
||||
if (on)
|
||||
{
|
||||
GPIO_CLEAR_BITWISE(GPIOF_OUTPUT_VAL, 0x10);
|
||||
DEV_EN |= DEV_IDE0;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEV_EN &= ~DEV_IDE0;
|
||||
GPIO_SET_BITWISE(GPIOF_OUTPUT_VAL, 0x10);
|
||||
}
|
||||
#else
|
||||
(void)on;
|
||||
/* We do nothing */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool ide_powered(void)
|
||||
{
|
||||
#if defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
|
||||
return ((GPIOF_INPUT_VAL & 0x10) == 0);
|
||||
#else
|
||||
/* pretend we are always powered - we don't turn it off */
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void power_off(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue