diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-02-01 17:51:01 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-02-01 17:51:01 +0100 |
commit | ac4d648958a2d26738f0ebf118c5b287020d4f73 (patch) | |
tree | 783a0eb972bfb92d45090c463749f467e27d4786 | |
parent | 0f02da208c519c1cd0d3028a61ae6df2d5e7346c (diff) | |
download | rockbox-ac4d648958a2d26738f0ebf118c5b287020d4f73.tar.gz rockbox-ac4d648958a2d26738f0ebf118c5b287020d4f73.zip |
fuze+: use the si4700 internal oscillator and set a pin on power down (seems important)
Change-Id: If737438ddb726e51e0a725e27bc93950eb3657bd
-rw-r--r-- | firmware/drivers/tuner/si4700.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/imx233/power-imx233.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c index 917f628490..6966891a38 100644 --- a/firmware/drivers/tuner/si4700.c +++ b/firmware/drivers/tuner/si4700.c | |||
@@ -30,7 +30,8 @@ | |||
30 | #include "fmradio_i2c.h" /* physical interface driver */ | 30 | #include "fmradio_i2c.h" /* physical interface driver */ |
31 | #include "rds.h" | 31 | #include "rds.h" |
32 | 32 | ||
33 | #if defined(SANSA_CLIP) || defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) | 33 | #if defined(SANSA_CLIP) || defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) \ |
34 | || defined(SANSA_FUZEPLUS) | ||
34 | /* some models use the internal 32 kHz oscillator which needs special attention | 35 | /* some models use the internal 32 kHz oscillator which needs special attention |
35 | during initialisation, power-up and power-down. */ | 36 | during initialisation, power-up and power-down. */ |
36 | #define SI4700_USE_INTERNAL_OSCILLATOR | 37 | #define SI4700_USE_INTERNAL_OSCILLATOR |
diff --git a/firmware/target/arm/imx233/power-imx233.c b/firmware/target/arm/imx233/power-imx233.c index 479cba4430..0b395b3246 100644 --- a/firmware/target/arm/imx233/power-imx233.c +++ b/firmware/target/arm/imx233/power-imx233.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "usb.h" | 26 | #include "usb.h" |
27 | #include "system-target.h" | 27 | #include "system-target.h" |
28 | #include "power-imx233.h" | 28 | #include "power-imx233.h" |
29 | #include "pinctrl-imx233.h" | ||
29 | 30 | ||
30 | struct current_step_bit_t | 31 | struct current_step_bit_t |
31 | { | 32 | { |
@@ -110,6 +111,12 @@ void power_off(void) | |||
110 | { | 111 | { |
111 | /* wait a bit, useful for the user to stop touching anything */ | 112 | /* wait a bit, useful for the user to stop touching anything */ |
112 | sleep(HZ / 2); | 113 | sleep(HZ / 2); |
114 | #ifdef SANSA_FUZEPLUS | ||
115 | /* This pin seems to be important to shutdown the hardware properly */ | ||
116 | imx233_set_pin_function(0, 9, PINCTRL_FUNCTION_GPIO); | ||
117 | imx233_enable_gpio_output(0, 9, true); | ||
118 | imx233_set_gpio_output(0, 9, true); | ||
119 | #endif | ||
113 | /* power down */ | 120 | /* power down */ |
114 | HW_POWER_RESET = HW_POWER_RESET__UNLOCK | HW_POWER_RESET__PWD; | 121 | HW_POWER_RESET = HW_POWER_RESET__UNLOCK | HW_POWER_RESET__PWD; |
115 | while(1); | 122 | while(1); |