diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-08-14 16:28:30 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-08-14 16:29:39 -0400 |
commit | 04fe77a4654d43bf4fe07831d25c8ab92f054b65 (patch) | |
tree | 85e5868961b42acf72d496af63c2bf8947a46ac3 /firmware/target/arm | |
parent | 786d06742a379df667b0fd14df0b2dbc045f312c (diff) | |
download | rockbox-04fe77a4654d43bf4fe07831d25c8ab92f054b65.tar.gz rockbox-04fe77a4654d43bf4fe07831d25c8ab92f054b65.zip |
Remove the (very) incomplete port for the Tatung TPJ-1102
It was barely even a stub, and hasn't seen any development since 2009
Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/pp/system-pp502x.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/pp/system-target.h | 8 | ||||
-rw-r--r-- | firmware/target/arm/pp/usb-fw-pp502x.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/tatung/app.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/tatung/boot.lds | 2 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/adc-target.h | 35 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/backlight-target.h | 31 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c | 46 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/button-target.h | 51 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/button-tpj1022.c | 49 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c | 85 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/power-tpj1022.c | 63 | ||||
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c | 62 |
13 files changed, 0 insertions, 442 deletions
diff --git a/firmware/target/arm/pp/system-pp502x.c b/firmware/target/arm/pp/system-pp502x.c index d6dfad1b24..fb6fe28d91 100644 --- a/firmware/target/arm/pp/system-pp502x.c +++ b/firmware/target/arm/pp/system-pp502x.c | |||
@@ -559,8 +559,6 @@ void system_init(void) | |||
559 | /* to be done */ | 559 | /* to be done */ |
560 | #elif defined (MROBE_100) | 560 | #elif defined (MROBE_100) |
561 | /* to be done */ | 561 | /* to be done */ |
562 | #elif defined (TATUNG_TPJ1022) | ||
563 | /* to be done */ | ||
564 | #elif defined(PBELL_VIBE500) | 562 | #elif defined(PBELL_VIBE500) |
565 | /* reset all allowed devices */ | 563 | /* reset all allowed devices */ |
566 | DEV_RS = 0x3ffffef8; | 564 | DEV_RS = 0x3ffffef8; |
diff --git a/firmware/target/arm/pp/system-target.h b/firmware/target/arm/pp/system-target.h index 1e947195bd..b00374e40e 100644 --- a/firmware/target/arm/pp/system-target.h +++ b/firmware/target/arm/pp/system-target.h | |||
@@ -175,14 +175,6 @@ extern unsigned char probed_ramsize; | |||
175 | int battery_default_capacity(void); | 175 | int battery_default_capacity(void); |
176 | #endif | 176 | #endif |
177 | 177 | ||
178 | |||
179 | #ifdef BOOTLOADER | ||
180 | #if defined(TATUNG_TPJ1022) | ||
181 | /* Some targets don't like yielding in the bootloader - force | ||
182 | * yield() to return without a context switch. */ | ||
183 | #define YIELD_KERNEL_HOOK() true | ||
184 | #endif | ||
185 | |||
186 | #ifdef HAVE_BOOTLOADER_USB_MODE | 178 | #ifdef HAVE_BOOTLOADER_USB_MODE |
187 | void tick_stop(void); | 179 | void tick_stop(void); |
188 | void system_prepare_fw_start(void); | 180 | void system_prepare_fw_start(void); |
diff --git a/firmware/target/arm/pp/usb-fw-pp502x.c b/firmware/target/arm/pp/usb-fw-pp502x.c index b0fcfb83a4..a4d8e28a06 100644 --- a/firmware/target/arm/pp/usb-fw-pp502x.c +++ b/firmware/target/arm/pp/usb-fw-pp502x.c | |||
@@ -81,12 +81,6 @@ | |||
81 | #define USB_GPIO_MASK 0x10 | 81 | #define USB_GPIO_MASK 0x10 |
82 | #define USB_GPIO_VAL 0x10 | 82 | #define USB_GPIO_VAL 0x10 |
83 | 83 | ||
84 | #elif defined(TATUNG_TPJ1022) | ||
85 | /* GPIO ? bit ? is usb detect (dummy value)*/ | ||
86 | #define USB_GPIO GPIOD | ||
87 | #define USB_GPIO_MASK 0x10 | ||
88 | #define USB_GPIO_VAL 0x10 | ||
89 | |||
90 | #elif defined(PBELL_VIBE500) | 84 | #elif defined(PBELL_VIBE500) |
91 | /* GPIO L bit 3 is usb detect */ | 85 | /* GPIO L bit 3 is usb detect */ |
92 | #define USB_GPIO GPIOL | 86 | #define USB_GPIO GPIOL |
diff --git a/firmware/target/arm/tatung/app.lds b/firmware/target/arm/tatung/app.lds deleted file mode 100644 index 856cc52bb0..0000000000 --- a/firmware/target/arm/tatung/app.lds +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #include "config.h" | ||
2 | #include "../pp/app-pp.lds" | ||
diff --git a/firmware/target/arm/tatung/boot.lds b/firmware/target/arm/tatung/boot.lds deleted file mode 100644 index 33b826bec8..0000000000 --- a/firmware/target/arm/tatung/boot.lds +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #include "config.h" | ||
2 | #include "../pp/boot-pp.lds" | ||
diff --git a/firmware/target/arm/tatung/tpj1022/adc-target.h b/firmware/target/arm/tatung/tpj1022/adc-target.h deleted file mode 100644 index 026bb58089..0000000000 --- a/firmware/target/arm/tatung/tpj1022/adc-target.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 | #ifndef _ADC_TARGET_H_ | ||
22 | #define _ADC_TARGET_H_ | ||
23 | |||
24 | #define NUM_ADC_CHANNELS 4 | ||
25 | |||
26 | #define ADC_BATTERY 0 | ||
27 | #define ADC_UNKNOWN_1 1 | ||
28 | #define ADC_UNKNOWN_2 2 | ||
29 | #define ADC_SCROLLPAD 3 | ||
30 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | ||
31 | |||
32 | /* Force a scan now */ | ||
33 | unsigned short adc_scan(int channel); | ||
34 | |||
35 | #endif | ||
diff --git a/firmware/target/arm/tatung/tpj1022/backlight-target.h b/firmware/target/arm/tatung/tpj1022/backlight-target.h deleted file mode 100644 index 4a5e677599..0000000000 --- a/firmware/target/arm/tatung/tpj1022/backlight-target.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 | |||
22 | /* Taken from the x5's implementation */ | ||
23 | |||
24 | #ifndef BACKLIGHT_TARGET_H | ||
25 | #define BACKLIGHT_TARGET_H | ||
26 | |||
27 | #define backlight_hw_init() true | ||
28 | void backlight_hw_on(void); | ||
29 | void backlight_hw_off(void); | ||
30 | |||
31 | #endif | ||
diff --git a/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c b/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c deleted file mode 100644 index d63387728b..0000000000 --- a/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 | |||
22 | /* The H10 display (and hence backlight) possibly identical to that of the X5, | ||
23 | so that code was used here but left #if 0'ed out for the moment */ | ||
24 | |||
25 | #include "config.h" | ||
26 | #include "cpu.h" | ||
27 | #include "system.h" | ||
28 | #include "backlight.h" | ||
29 | |||
30 | void backlight_hw_on(void) | ||
31 | { | ||
32 | #if 0 | ||
33 | int level = disable_irq_save(); | ||
34 | pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */ | ||
35 | restore_irq(level); | ||
36 | #endif | ||
37 | } | ||
38 | |||
39 | void backlight_hw_off(void) | ||
40 | { | ||
41 | #if 0 | ||
42 | int level = disable_irq_save(); | ||
43 | pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */ | ||
44 | restore_irq(level); | ||
45 | #endif | ||
46 | } | ||
diff --git a/firmware/target/arm/tatung/tpj1022/button-target.h b/firmware/target/arm/tatung/tpj1022/button-target.h deleted file mode 100644 index 1143c1b1da..0000000000 --- a/firmware/target/arm/tatung/tpj1022/button-target.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Robert Kukla | ||
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 | |||
22 | #ifndef _BUTTON_TARGET_H_ | ||
23 | #define _BUTTON_TARGET_H_ | ||
24 | |||
25 | #define HAS_BUTTON_HOLD | ||
26 | |||
27 | /* Main unit's buttons */ | ||
28 | |||
29 | #define BUTTON_VOL_DOWN 0x00000001 | ||
30 | |||
31 | /* bit position in GPIOA */ | ||
32 | #define BUTTON_REW 0x00000002 | ||
33 | #define BUTTON_FF 0x00000004 | ||
34 | #define BUTTON_POWER 0x00000008 | ||
35 | #define BUTTON_UP 0x00000010 | ||
36 | #define BUTTON_DOWN 0x00000020 | ||
37 | #define BUTTON_AB 0x00000040 | ||
38 | #define BUTTON_RIGHT 0x00000080 | ||
39 | |||
40 | /* still unknown */ | ||
41 | #define BUTTON_MENU 0x00000100 | ||
42 | #define BUTTON_REC 0x00000200 | ||
43 | #define BUTTON_VOL_UP 0x00000400 | ||
44 | #define BUTTON_LEFT 0x00000800 | ||
45 | |||
46 | #define BUTTON_MAIN 0x00000FFF | ||
47 | |||
48 | #define POWEROFF_BUTTON BUTTON_POWER | ||
49 | #define POWEROFF_COUNT 10 | ||
50 | |||
51 | #endif /* _BUTTON_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/tatung/tpj1022/button-tpj1022.c b/firmware/target/arm/tatung/tpj1022/button-tpj1022.c deleted file mode 100644 index ce9d7ab24d..0000000000 --- a/firmware/target/arm/tatung/tpj1022/button-tpj1022.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Robert Kukla | ||
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 | |||
22 | #include "system.h" | ||
23 | #include "button.h" | ||
24 | |||
25 | bool button_hold(void) | ||
26 | { | ||
27 | return (GPIOK_INPUT_VAL & 0x40) ? true : false; | ||
28 | } | ||
29 | |||
30 | int button_read_device(void) | ||
31 | { | ||
32 | int btn = BUTTON_NONE; | ||
33 | |||
34 | if (!button_hold()) | ||
35 | { | ||
36 | btn = (GPIOA_INPUT_VAL & 0xfe) ^ 0xfe; | ||
37 | |||
38 | if ((GPIOK_INPUT_VAL & 0x20) == 0) btn |= BUTTON_VOL_DOWN; | ||
39 | |||
40 | /* to be found | ||
41 | if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_MENU; | ||
42 | if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_REC; | ||
43 | if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_VOL_UP; | ||
44 | if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_LEFT; | ||
45 | */ | ||
46 | } | ||
47 | |||
48 | return btn; | ||
49 | } | ||
diff --git a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c deleted file mode 100644 index bf29ba092e..0000000000 --- a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 "lcd.h" | ||
24 | #include "kernel.h" | ||
25 | #include "system.h" | ||
26 | |||
27 | /*** hardware configuration ***/ | ||
28 | |||
29 | void lcd_set_contrast(int val) | ||
30 | { | ||
31 | /* TODO: Implement lcd_set_contrast() */ | ||
32 | (void)val; | ||
33 | } | ||
34 | |||
35 | void lcd_set_invert_display(bool yesno) | ||
36 | { | ||
37 | /* TODO: Implement lcd_set_invert_display() */ | ||
38 | (void)yesno; | ||
39 | } | ||
40 | |||
41 | /* turn the display upside down (call lcd_update() afterwards) */ | ||
42 | void lcd_set_flip(bool yesno) | ||
43 | { | ||
44 | /* TODO: Implement lcd_set_flip() */ | ||
45 | (void)yesno; | ||
46 | } | ||
47 | |||
48 | /* LCD init */ | ||
49 | void lcd_init_device(void) | ||
50 | { | ||
51 | |||
52 | } | ||
53 | |||
54 | /*** update functions ***/ | ||
55 | |||
56 | /* Performance function to blit a YUV bitmap directly to the LCD */ | ||
57 | void lcd_blit_yuv(unsigned char * const src[3], | ||
58 | int src_x, int src_y, int stride, | ||
59 | int x, int y, int width, int height) | ||
60 | { | ||
61 | (void)src; | ||
62 | (void)src_x; | ||
63 | (void)src_y; | ||
64 | (void)stride; | ||
65 | (void)x; | ||
66 | (void)y; | ||
67 | (void)width; | ||
68 | (void)height; | ||
69 | } | ||
70 | |||
71 | /* Update a fraction of the display. */ | ||
72 | void lcd_update_rect(int x0, int y0, int width, int height) | ||
73 | { | ||
74 | (void)x0; | ||
75 | (void)y0; | ||
76 | (void)width; | ||
77 | (void)height; | ||
78 | } | ||
79 | |||
80 | /* Update the display. | ||
81 | This must be called after all other LCD functions that change the display. */ | ||
82 | void lcd_update(void) | ||
83 | { | ||
84 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | ||
85 | } | ||
diff --git a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c deleted file mode 100644 index fa46f34daa..0000000000 --- a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
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 | |||
22 | /* Created from power.c using some iPod code, and some custom stuff based on | ||
23 | GPIO analysis | ||
24 | */ | ||
25 | |||
26 | #include "config.h" | ||
27 | #include "cpu.h" | ||
28 | #include <stdbool.h> | ||
29 | #include "kernel.h" | ||
30 | #include "system.h" | ||
31 | #include "power.h" | ||
32 | #include "logf.h" | ||
33 | #include "usb.h" | ||
34 | |||
35 | void power_init(void) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | unsigned int power_input_status(void) | ||
40 | { | ||
41 | return POWER_INPUT_NONE; | ||
42 | } | ||
43 | |||
44 | void ide_power_enable(bool on) | ||
45 | { | ||
46 | (void)on; | ||
47 | /* We do nothing on the iPod */ | ||
48 | } | ||
49 | |||
50 | |||
51 | bool ide_powered(void) | ||
52 | { | ||
53 | /* pretend we are always powered - we don't turn it off on the ipod */ | ||
54 | return true; | ||
55 | } | ||
56 | |||
57 | void power_off(void) | ||
58 | { | ||
59 | /* Give things a second to settle before cutting power */ | ||
60 | sleep(HZ); | ||
61 | |||
62 | //GPIOF_OUTPUT_VAL &=~ 0x20; | ||
63 | } | ||
diff --git a/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c b/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c deleted file mode 100644 index cc91012fcd..0000000000 --- a/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese | ||
11 | * Revisions copyright (C) 2005 by Gerald Van Baren | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | |||
23 | #include "config.h" | ||
24 | #include "adc.h" | ||
25 | #include "powermgmt.h" | ||
26 | |||
27 | /* FIXME: All voltages copied from H10 according to the battery type given | ||
28 | * in config-tpj1022.h at the time of splitting. This probably needs changing | ||
29 | * if that port ever gets up to speed. */ | ||
30 | |||
31 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | ||
32 | { | ||
33 | 3760 | ||
34 | }; | ||
35 | |||
36 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | ||
37 | { | ||
38 | 3650 | ||
39 | }; | ||
40 | |||
41 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | ||
42 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | ||
43 | { | ||
44 | { 3760, 3800, 3850, 3870, 3900, 3950, 4020, 4070, 4110, 4180, 4240 } | ||
45 | }; | ||
46 | |||
47 | #if CONFIG_CHARGING | ||
48 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | ||
49 | const unsigned short percent_to_volt_charge[11] = | ||
50 | { | ||
51 | 3990, 4030, 4060, 4080, 4100, 4120, 4150, 4180, 4220, 4260, 4310 | ||
52 | }; | ||
53 | #endif /* CONFIG_CHARGING */ | ||
54 | |||
55 | #define BATTERY_SCALE_FACTOR 6000 | ||
56 | /* full-scale ADC readout (2^10) in millivolt */ | ||
57 | |||
58 | /* Returns battery voltage from ADC [millivolts] */ | ||
59 | int _battery_voltage(void) | ||
60 | { | ||
61 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; | ||
62 | } | ||