Fix AMSv2 variant 1 detection if rockbox loaded from SD card

Change-Id: Ie7c9c06170601e109f8d3de9686773c38a6e224a
This commit is contained in:
Mihail Zenkov 2016-04-22 12:17:35 +00:00
parent 79ca6d4e3c
commit 7cb1e5ae8b
2 changed files with 14 additions and 0 deletions

View file

@ -160,6 +160,13 @@ void main(void)
#endif #endif
} }
#if defined(SANSA_FUZEV2) || defined(SANSA_CLIPPLUS) || defined(SANSA_CLIPZIP)
/* It is necessary for proper detection AMSv2 variant 1.
* We should restore initial state of GPIOB_PIN(5) as it used for
* variant detection, but can be changed if we switch SD card. */
if (amsv2_variant == 1)
GPIOB_PIN(5) = 1 << 5;
#endif
kernel_entry = (void*) loadbuffer; kernel_entry = (void*) loadbuffer;
commit_discard_idcache(); commit_discard_idcache();
printf("Executing"); printf("Executing");

View file

@ -275,6 +275,13 @@ int rolo_load(const char* filename)
/* Set CVDD1 power supply to default*/ /* Set CVDD1 power supply to default*/
ascodec_write_pmu(0x17, 1, 0); ascodec_write_pmu(0x17, 1, 0);
#endif #endif
#if defined(SANSA_FUZEV2) || defined(SANSA_CLIPPLUS) || defined(SANSA_CLIPZIP)
/* It is necessary for proper detection AMSv2 variant 1.
* We should restore initial state of GPIOB_PIN(5) as it used for
* variant detection, but can be changed if we switch SD card. */
if (amsv2_variant == 1)
GPIOB_PIN(5) = 1 << 5;
#endif
#if CONFIG_CPU != IMX31L /* We're not finished yet */ #if CONFIG_CPU != IMX31L /* We're not finished yet */
#ifdef CPU_ARM #ifdef CPU_ARM