diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-15 19:40:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch) | |
tree | 98ec96946eeb2ae709cb0528cc6998e21bb9b290 /firmware/target/sh/archos/ondio/power-ondio.c | |
parent | 17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff) | |
download | rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip |
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets
Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'firmware/target/sh/archos/ondio/power-ondio.c')
-rw-r--r-- | firmware/target/sh/archos/ondio/power-ondio.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/firmware/target/sh/archos/ondio/power-ondio.c b/firmware/target/sh/archos/ondio/power-ondio.c deleted file mode 100644 index d7bbc08f4f..0000000000 --- a/firmware/target/sh/archos/ondio/power-ondio.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Linus Nielsen Feltzing | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "cpu.h" | ||
23 | #include <stdbool.h> | ||
24 | #include "kernel.h" | ||
25 | #include "system.h" | ||
26 | #include "power.h" | ||
27 | #include "usb.h" | ||
28 | #include "backlight-target.h" | ||
29 | |||
30 | #if CONFIG_TUNER | ||
31 | |||
32 | static bool powered = false; | ||
33 | |||
34 | bool tuner_power(bool status) | ||
35 | { | ||
36 | bool old_status = powered; | ||
37 | |||
38 | powered = status; | ||
39 | if (status) | ||
40 | { | ||
41 | and_b(~0x04, &PADRL); /* drive PA2 low for tuner enable */ | ||
42 | sleep(1); /* let the voltage settle */ | ||
43 | } | ||
44 | else | ||
45 | or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ | ||
46 | return old_status; | ||
47 | } | ||
48 | |||
49 | #endif /* #if CONFIG_TUNER */ | ||
50 | |||
51 | void power_init(void) | ||
52 | { | ||
53 | PBCR2 &= ~0x0c00; /* GPIO for PB5 */ | ||
54 | or_b(0x20, &PBIORL); | ||
55 | or_b(0x20, &PBDRL); /* hold power */ | ||
56 | #ifndef HAVE_BACKLIGHT | ||
57 | /* Disable backlight on backlight-modded Ondios when running | ||
58 | * a standard build (always on otherwise). */ | ||
59 | PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ | ||
60 | and_b(~0x40, &PADRH); /* drive it low */ | ||
61 | or_b(0x40, &PAIORH); /* ..and output */ | ||
62 | #endif | ||
63 | PACR2 &= ~0x0030; /* GPIO for PA2 */ | ||
64 | or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ | ||
65 | or_b(0x04, &PAIORL); /* output for PA2 */ | ||
66 | } | ||
67 | |||
68 | void power_off(void) | ||
69 | { | ||
70 | disable_irq(); | ||
71 | #ifdef HAVE_BACKLIGHT | ||
72 | /* Switch off the light on backlight-modded Ondios */ | ||
73 | backlight_hw_off(); | ||
74 | #endif | ||
75 | and_b(~0x20, &PBDRL); | ||
76 | or_b(0x20, &PBIORL); | ||
77 | while(1); | ||
78 | } | ||