mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
Add support for S5L8720 in various places
Due to its similarity with S5L8702, clickwheel support and sleep can be used as-is on S5L8720. DRAM and IRAM are also configured. Change-Id: I52f8a3417e6a25c7360b1cae2fb5eed621e2e0db
This commit is contained in:
parent
6691214e51
commit
d7b57e33d9
5 changed files with 20 additions and 13 deletions
|
|
@ -42,7 +42,7 @@
|
|||
#ifdef IPOD_NANO2G
|
||||
#include "pmu-target.h"
|
||||
#endif
|
||||
#ifdef IPOD_6G
|
||||
#if defined(IPOD_6G) || defined(IPOD_NANO3G) || defined(IPOD_NANO4G)
|
||||
#include "pmu-target.h"
|
||||
#include "clocking-s5l8702.h"
|
||||
#endif
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
#ifdef CPU_PP
|
||||
#define CLICKWHEEL_DATA (*(volatile unsigned long*)(0x7000c140))
|
||||
#elif CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
#define CLICKWHEEL_DATA WHEELRX
|
||||
#else
|
||||
#error CPU architecture not supported!
|
||||
|
|
@ -87,7 +87,7 @@ static int int_btn = BUTTON_NONE;
|
|||
static bool send_events = true;
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702
|
||||
#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
static struct semaphore button_init_wakeup;
|
||||
#endif
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ static inline int ipod_4g_button_read(void)
|
|||
outl(inl(0x7000c104) | 0x04000000, 0x7000c104);
|
||||
outl(inl(0x7000c100) | 0x60000000, 0x7000c100);
|
||||
}
|
||||
#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702
|
||||
#if CONFIG_CPU==S5L8701 || CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
else if ((status & 0x8000FFFF) == 0x8000023A)
|
||||
{
|
||||
if (status & 0x00010000)
|
||||
|
|
@ -379,7 +379,7 @@ static void s5l_clickwheel_init(void)
|
|||
WHEELTX = 0x8000023A;
|
||||
WHEEL04 |= 1;
|
||||
PDAT10 &= ~2;
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
clockgate_enable(CLOCKGATE_CWHEEL, true);
|
||||
PCONE = (PCONE & ~0x00ffff00) | 0x00222200;
|
||||
WHEEL00 = 0; /* stop s5l8702 controller */
|
||||
|
|
@ -410,7 +410,7 @@ bool button_hold(void)
|
|||
PCON15 = PCON15 & ~0xffff0000;
|
||||
else PCON15 = (PCON15 & ~0xffff0000) | 0x22220000;
|
||||
return value;
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
return pmu_holdswitch_locked();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ bool headphones_inserted(void)
|
|||
{
|
||||
#if CONFIG_CPU==S5L8701
|
||||
return ((PDAT14 & (1 << 5)) != 0);
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
return ((PDATA & (1 << 6)) != 0);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -453,7 +453,7 @@ int button_read_device(void)
|
|||
WHEEL00 = 0;
|
||||
WHEEL10 = 0;
|
||||
PWRCONEXT |= 1;
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
WHEEL00 = 0;
|
||||
PCONE = (PCONE & ~0x00ffff00) | 0x000e0e00;
|
||||
clockgate_enable(CLOCKGATE_CWHEEL, false);
|
||||
|
|
@ -468,7 +468,7 @@ int button_read_device(void)
|
|||
#elif CONFIG_CPU==S5L8701
|
||||
/*pmu_ldo_power_on(1);*/ /* enable clickwheel power supply */
|
||||
s5l_clickwheel_init();
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720
|
||||
s5l_clickwheel_init();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue