optimize Cypress chip power supply for iriver h100 series

Before, the Cypress chip power is always turn on either from internal battery
or from usb host. In this regard, the internal battery energy was spend on the
inactive chip. Now power of the Cypress chip is enabled only on the external usb host.

Change-Id: Iae7cddd1237ea9ed93fee5404575cc01543cb00c
Reviewed-on: http://gerrit.rockbox.org/433
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
This commit is contained in:
Dmitry Gamza 2013-04-05 13:33:51 +04:00 committed by Marcin Bukat
parent b4a09868e1
commit 020f16a1c7
2 changed files with 13 additions and 3 deletions

View file

@ -55,9 +55,15 @@ bool ata_is_coldstart(void)
void ata_device_init(void)
{
#ifdef HAVE_ATA_LED_CTRL
#if defined(IRIVER_H100_SERIES) /* For iriver H100 series only */
/* Enable disk LED */
and_l(~0x00000200, &GPIO_OUT);
or_l( 0x00000200, &GPIO_ENABLE);
#else
/* Enable disk LED & ISD chip power control */
and_l(~0x00000240, &GPIO_OUT);
or_l( 0x00000240, &GPIO_ENABLE);
#endif /* IRIVER_H100_SERIES */
or_l( 0x00000200, &GPIO_FUNCTION);
#endif