diff options
author | Mihail Zenkov <mihail.zenkov@gmail.com> | 2016-04-22 12:17:35 +0000 |
---|---|---|
committer | Mihail Zenkov <mihail.zenkov@gmail.com> | 2016-04-22 20:43:45 +0000 |
commit | 7cb1e5ae8b8014edca64f1fd187f4e1e6f3e99e3 (patch) | |
tree | 813600c507d997521fd54dd740921cbac4026b35 | |
parent | 79ca6d4e3cf6fcd2f05cca0a703200394920741f (diff) | |
download | rockbox-7cb1e5ae8b8014edca64f1fd187f4e1e6f3e99e3.tar.gz rockbox-7cb1e5ae8b8014edca64f1fd187f4e1e6f3e99e3.zip |
Fix AMSv2 variant 1 detection if rockbox loaded from SD card
Change-Id: Ie7c9c06170601e109f8d3de9686773c38a6e224a
-rw-r--r-- | bootloader/sansa_as3525.c | 7 | ||||
-rw-r--r-- | firmware/rolo.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c index fb3ba98346..3938f819b4 100644 --- a/bootloader/sansa_as3525.c +++ b/bootloader/sansa_as3525.c | |||
@@ -160,6 +160,13 @@ void main(void) | |||
160 | #endif | 160 | #endif |
161 | } | 161 | } |
162 | 162 | ||
163 | #if defined(SANSA_FUZEV2) || defined(SANSA_CLIPPLUS) || defined(SANSA_CLIPZIP) | ||
164 | /* It is necessary for proper detection AMSv2 variant 1. | ||
165 | * We should restore initial state of GPIOB_PIN(5) as it used for | ||
166 | * variant detection, but can be changed if we switch SD card. */ | ||
167 | if (amsv2_variant == 1) | ||
168 | GPIOB_PIN(5) = 1 << 5; | ||
169 | #endif | ||
163 | kernel_entry = (void*) loadbuffer; | 170 | kernel_entry = (void*) loadbuffer; |
164 | commit_discard_idcache(); | 171 | commit_discard_idcache(); |
165 | printf("Executing"); | 172 | printf("Executing"); |
diff --git a/firmware/rolo.c b/firmware/rolo.c index 266ba79e69..d432642d9d 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -275,6 +275,13 @@ int rolo_load(const char* filename) | |||
275 | /* Set CVDD1 power supply to default*/ | 275 | /* Set CVDD1 power supply to default*/ |
276 | ascodec_write_pmu(0x17, 1, 0); | 276 | ascodec_write_pmu(0x17, 1, 0); |
277 | #endif | 277 | #endif |
278 | #if defined(SANSA_FUZEV2) || defined(SANSA_CLIPPLUS) || defined(SANSA_CLIPZIP) | ||
279 | /* It is necessary for proper detection AMSv2 variant 1. | ||
280 | * We should restore initial state of GPIOB_PIN(5) as it used for | ||
281 | * variant detection, but can be changed if we switch SD card. */ | ||
282 | if (amsv2_variant == 1) | ||
283 | GPIOB_PIN(5) = 1 << 5; | ||
284 | #endif | ||
278 | 285 | ||
279 | #if CONFIG_CPU != IMX31L /* We're not finished yet */ | 286 | #if CONFIG_CPU != IMX31L /* We're not finished yet */ |
280 | #ifdef CPU_ARM | 287 | #ifdef CPU_ARM |