diff options
Diffstat (limited to 'rbutil/mkimxboot/dualboot/dualboot.c')
-rw-r--r-- | rbutil/mkimxboot/dualboot/dualboot.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rbutil/mkimxboot/dualboot/dualboot.c b/rbutil/mkimxboot/dualboot/dualboot.c index 3cca59bb8a..e841b12d74 100644 --- a/rbutil/mkimxboot/dualboot/dualboot.c +++ b/rbutil/mkimxboot/dualboot/dualboot.c | |||
@@ -184,6 +184,20 @@ static int boot_decision(int context) | |||
184 | } | 184 | } |
185 | return decision; | 185 | return decision; |
186 | } | 186 | } |
187 | #elif defined(CREATIVE_ZENXFISTYLE) | ||
188 | static int boot_decision(int context) | ||
189 | { | ||
190 | setup_lradc(2); // setup LRADC channel 2 to read keys | ||
191 | /* make a decision */ | ||
192 | int val = read_lradc(2); | ||
193 | /* boot to OF if left is hold | ||
194 | * NOTE: VDDIO is set to 3.1V initially and the resistor ladder is wired to | ||
195 | * VDDIO so these values are not the same as in the main binary which is | ||
196 | * calibrated for VDDIO=3.3V */ | ||
197 | if(val >= 815 && val < 915) | ||
198 | return BOOT_OF; | ||
199 | return BOOT_ROCK; | ||
200 | } | ||
187 | #else | 201 | #else |
188 | #warning You should define a target specific boot decision function | 202 | #warning You should define a target specific boot decision function |
189 | static int boot_decision(int context) | 203 | static int boot_decision(int context) |