mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
786d06742a
commit
04fe77a465
23 changed files with 4 additions and 776 deletions
|
|
@ -559,8 +559,6 @@ void system_init(void)
|
|||
/* to be done */
|
||||
#elif defined (MROBE_100)
|
||||
/* to be done */
|
||||
#elif defined (TATUNG_TPJ1022)
|
||||
/* to be done */
|
||||
#elif defined(PBELL_VIBE500)
|
||||
/* reset all allowed devices */
|
||||
DEV_RS = 0x3ffffef8;
|
||||
|
|
|
|||
|
|
@ -175,14 +175,6 @@ extern unsigned char probed_ramsize;
|
|||
int battery_default_capacity(void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
#if defined(TATUNG_TPJ1022)
|
||||
/* Some targets don't like yielding in the bootloader - force
|
||||
* yield() to return without a context switch. */
|
||||
#define YIELD_KERNEL_HOOK() true
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
void tick_stop(void);
|
||||
void system_prepare_fw_start(void);
|
||||
|
|
|
|||
|
|
@ -81,12 +81,6 @@
|
|||
#define USB_GPIO_MASK 0x10
|
||||
#define USB_GPIO_VAL 0x10
|
||||
|
||||
#elif defined(TATUNG_TPJ1022)
|
||||
/* GPIO ? bit ? is usb detect (dummy value)*/
|
||||
#define USB_GPIO GPIOD
|
||||
#define USB_GPIO_MASK 0x10
|
||||
#define USB_GPIO_VAL 0x10
|
||||
|
||||
#elif defined(PBELL_VIBE500)
|
||||
/* GPIO L bit 3 is usb detect */
|
||||
#define USB_GPIO GPIOL
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
#include "config.h"
|
||||
#include "../pp/app-pp.lds"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#include "config.h"
|
||||
#include "../pp/boot-pp.lds"
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef _ADC_TARGET_H_
|
||||
#define _ADC_TARGET_H_
|
||||
|
||||
#define NUM_ADC_CHANNELS 4
|
||||
|
||||
#define ADC_BATTERY 0
|
||||
#define ADC_UNKNOWN_1 1
|
||||
#define ADC_UNKNOWN_2 2
|
||||
#define ADC_SCROLLPAD 3
|
||||
#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
|
||||
|
||||
/* Force a scan now */
|
||||
unsigned short adc_scan(int channel);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Taken from the x5's implementation */
|
||||
|
||||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define backlight_hw_init() true
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The H10 display (and hence backlight) possibly identical to that of the X5,
|
||||
so that code was used here but left #if 0'ed out for the moment */
|
||||
|
||||
#include "config.h"
|
||||
#include "cpu.h"
|
||||
#include "system.h"
|
||||
#include "backlight.h"
|
||||
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#if 0
|
||||
int level = disable_irq_save();
|
||||
pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */
|
||||
restore_irq(level);
|
||||
#endif
|
||||
}
|
||||
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
#if 0
|
||||
int level = disable_irq_save();
|
||||
pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */
|
||||
restore_irq(level);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Robert Kukla
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _BUTTON_TARGET_H_
|
||||
#define _BUTTON_TARGET_H_
|
||||
|
||||
#define HAS_BUTTON_HOLD
|
||||
|
||||
/* Main unit's buttons */
|
||||
|
||||
#define BUTTON_VOL_DOWN 0x00000001
|
||||
|
||||
/* bit position in GPIOA */
|
||||
#define BUTTON_REW 0x00000002
|
||||
#define BUTTON_FF 0x00000004
|
||||
#define BUTTON_POWER 0x00000008
|
||||
#define BUTTON_UP 0x00000010
|
||||
#define BUTTON_DOWN 0x00000020
|
||||
#define BUTTON_AB 0x00000040
|
||||
#define BUTTON_RIGHT 0x00000080
|
||||
|
||||
/* still unknown */
|
||||
#define BUTTON_MENU 0x00000100
|
||||
#define BUTTON_REC 0x00000200
|
||||
#define BUTTON_VOL_UP 0x00000400
|
||||
#define BUTTON_LEFT 0x00000800
|
||||
|
||||
#define BUTTON_MAIN 0x00000FFF
|
||||
|
||||
#define POWEROFF_BUTTON BUTTON_POWER
|
||||
#define POWEROFF_COUNT 10
|
||||
|
||||
#endif /* _BUTTON_TARGET_H_ */
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Robert Kukla
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "system.h"
|
||||
#include "button.h"
|
||||
|
||||
bool button_hold(void)
|
||||
{
|
||||
return (GPIOK_INPUT_VAL & 0x40) ? true : false;
|
||||
}
|
||||
|
||||
int button_read_device(void)
|
||||
{
|
||||
int btn = BUTTON_NONE;
|
||||
|
||||
if (!button_hold())
|
||||
{
|
||||
btn = (GPIOA_INPUT_VAL & 0xfe) ^ 0xfe;
|
||||
|
||||
if ((GPIOK_INPUT_VAL & 0x20) == 0) btn |= BUTTON_VOL_DOWN;
|
||||
|
||||
/* to be found
|
||||
if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_MENU;
|
||||
if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_REC;
|
||||
if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_VOL_UP;
|
||||
if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_LEFT;
|
||||
*/
|
||||
}
|
||||
|
||||
return btn;
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "config.h"
|
||||
#include "cpu.h"
|
||||
#include "lcd.h"
|
||||
#include "kernel.h"
|
||||
#include "system.h"
|
||||
|
||||
/*** hardware configuration ***/
|
||||
|
||||
void lcd_set_contrast(int val)
|
||||
{
|
||||
/* TODO: Implement lcd_set_contrast() */
|
||||
(void)val;
|
||||
}
|
||||
|
||||
void lcd_set_invert_display(bool yesno)
|
||||
{
|
||||
/* TODO: Implement lcd_set_invert_display() */
|
||||
(void)yesno;
|
||||
}
|
||||
|
||||
/* turn the display upside down (call lcd_update() afterwards) */
|
||||
void lcd_set_flip(bool yesno)
|
||||
{
|
||||
/* TODO: Implement lcd_set_flip() */
|
||||
(void)yesno;
|
||||
}
|
||||
|
||||
/* LCD init */
|
||||
void lcd_init_device(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void)src;
|
||||
(void)src_x;
|
||||
(void)src_y;
|
||||
(void)stride;
|
||||
(void)x;
|
||||
(void)y;
|
||||
(void)width;
|
||||
(void)height;
|
||||
}
|
||||
|
||||
/* Update a fraction of the display. */
|
||||
void lcd_update_rect(int x0, int y0, int width, int height)
|
||||
{
|
||||
(void)x0;
|
||||
(void)y0;
|
||||
(void)width;
|
||||
(void)height;
|
||||
}
|
||||
|
||||
/* Update the display.
|
||||
This must be called after all other LCD functions that change the display. */
|
||||
void lcd_update(void)
|
||||
{
|
||||
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Created from power.c using some iPod code, and some custom stuff based on
|
||||
GPIO analysis
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "cpu.h"
|
||||
#include <stdbool.h>
|
||||
#include "kernel.h"
|
||||
#include "system.h"
|
||||
#include "power.h"
|
||||
#include "logf.h"
|
||||
#include "usb.h"
|
||||
|
||||
void power_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int power_input_status(void)
|
||||
{
|
||||
return POWER_INPUT_NONE;
|
||||
}
|
||||
|
||||
void ide_power_enable(bool on)
|
||||
{
|
||||
(void)on;
|
||||
/* We do nothing on the iPod */
|
||||
}
|
||||
|
||||
|
||||
bool ide_powered(void)
|
||||
{
|
||||
/* pretend we are always powered - we don't turn it off on the ipod */
|
||||
return true;
|
||||
}
|
||||
|
||||
void power_off(void)
|
||||
{
|
||||
/* Give things a second to settle before cutting power */
|
||||
sleep(HZ);
|
||||
|
||||
//GPIOF_OUTPUT_VAL &=~ 0x20;
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese
|
||||
* Revisions copyright (C) 2005 by Gerald Van Baren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include "adc.h"
|
||||
#include "powermgmt.h"
|
||||
|
||||
/* FIXME: All voltages copied from H10 according to the battery type given
|
||||
* in config-tpj1022.h at the time of splitting. This probably needs changing
|
||||
* if that port ever gets up to speed. */
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3760
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3650
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||
{
|
||||
{ 3760, 3800, 3850, 3870, 3900, 3950, 4020, 4070, 4110, 4180, 4240 }
|
||||
};
|
||||
|
||||
#if CONFIG_CHARGING
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
{
|
||||
3990, 4030, 4060, 4080, 4100, 4120, 4150, 4180, 4220, 4260, 4310
|
||||
};
|
||||
#endif /* CONFIG_CHARGING */
|
||||
|
||||
#define BATTERY_SCALE_FACTOR 6000
|
||||
/* full-scale ADC readout (2^10) in millivolt */
|
||||
|
||||
/* Returns battery voltage from ADC [millivolts] */
|
||||
int _battery_voltage(void)
|
||||
{
|
||||
return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue