diff options
author | Vencislav Atanasov <user890104@freemyipod.org> | 2024-11-22 00:01:48 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-11-22 16:45:29 -0500 |
commit | d7b57e33d921f6a486dafa0987df7dd485507071 (patch) | |
tree | 306a3c981257ee81ef1df01a729c217ffb6be140 | |
parent | 6691214e51b0768bc8d616faae83e0be527cbac0 (diff) | |
download | rockbox-d7b57e33d9.tar.gz rockbox-d7b57e33d9.zip |
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
-rw-r--r-- | apps/plugins/plugin.lds | 9 | ||||
-rw-r--r-- | bootloader/SOURCES | 2 | ||||
-rw-r--r-- | firmware/export/cpu.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/ipod/button-clickwheel.c | 18 | ||||
-rw-r--r-- | firmware/target/arm/system-arm.h | 2 |
5 files changed, 20 insertions, 13 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index fac47d8c45..b0fd8d6d28 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -76,7 +76,7 @@ OUTPUT_FORMAT(elf32-littlemips) #else #define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE - TTB_SIZE) #endif -#elif CONFIG_CPU==S5L8702 +#elif CONFIG_CPU==S5L8702 || CONFIG_CPU==S5L8720 #define ASM #include "cpu.h" #define DRAMSIZE (DRAM_SIZE - PLUGIN_BUFFER_SIZE - CODEC_SIZE - TTB_SIZE) @@ -173,6 +173,13 @@ OUTPUT_FORMAT(elf32-littlemips) #define IRAMORIG (0x00000000 + (48*1024)) #define IRAMSIZE (80*1024) +#elif CONFIG_CPU==S5L8720 +/* S5L8720 have 192KB of IRAM */ +/* TODO: check if IRAM1 is also slow as in S5L8702 above */ +#define DRAMORIG 0x08000000 +#define IRAMORIG (0x00000000 + (56*1024)) +#define IRAMSIZE (136*1024) + #elif CONFIG_CPU == JZ4732 || CONFIG_CPU == JZ4760B #undef STUBOFFSET #ifdef DEBUG diff --git a/bootloader/SOURCES b/bootloader/SOURCES index 0ae99effb5..e4e240713c 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES @@ -4,7 +4,7 @@ snprintf.c #if defined(IPOD_NANO2G) ipodnano2g.c -#elif defined(IPOD_6G) +#elif defined(IPOD_6G) || defined(IPOD_NANO3G) || defined(IPOD_NANO4G) ipod-s5l87xx.c #elif defined(IPOD_ARCH) ipod.c diff --git a/firmware/export/cpu.h b/firmware/export/cpu.h index 67509141aa..df18125c93 100644 --- a/firmware/export/cpu.h +++ b/firmware/export/cpu.h @@ -56,7 +56,7 @@ #if CONFIG_CPU == S5L8700 || CONFIG_CPU == S5L8701 #include "s5l8700.h" #endif -#if CONFIG_CPU == S5L8702 +#if CONFIG_CPU == S5L8702 || CONFIG_CPU == S5L8720 #include "s5l8702.h" #endif #if CONFIG_CPU == JZ4732 diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index 9308b7664e..508b03a9f0 100644 --- a/firmware/target/arm/ipod/button-clickwheel.c +++ b/firmware/target/arm/ipod/button-clickwheel.c @@ -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 } diff --git a/firmware/target/arm/system-arm.h b/firmware/target/arm/system-arm.h index af16346b51..985ab3fa62 100644 --- a/firmware/target/arm/system-arm.h +++ b/firmware/target/arm/system-arm.h @@ -385,7 +385,7 @@ static inline uint32_t swaw32_hw(uint32_t value) #if defined(CPU_TCC780X) /* Single core only for now */ \ || CONFIG_CPU == IMX31L || CONFIG_CPU == DM320 || CONFIG_CPU == AS3525 \ || CONFIG_CPU == S3C2440 || CONFIG_CPU == S5L8701 || CONFIG_CPU == AS3525v2 \ -|| CONFIG_CPU == S5L8702 +|| CONFIG_CPU == S5L8702 || CONFIG_CPU == S5L8720 /* Use the generic ARMv4/v5/v6 wait for IRQ */ static inline void core_sleep(void) { |