From 9003c116ca06e7a11f444dfe026075dd2a2ff8d9 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Tue, 7 Oct 2008 20:23:56 +0000 Subject: Fix TABs and get rid of HAVE_BUTTON_HOLD git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18737 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-creativezv.h | 1 - firmware/export/config-creativezvm.h | 1 - firmware/export/config-creativezvm60gb.h | 1 - firmware/export/config-ondavx747.h | 1 - firmware/export/config-ondavx767.h | 1 - firmware/export/jz4740.h | 25 +++++++++++++------------ firmware/thread.c | 11 ++--------- 7 files changed, 15 insertions(+), 26 deletions(-) diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h index 0cb487ad6d..2225e8c45e 100644 --- a/firmware/export/config-creativezv.h +++ b/firmware/export/config-creativezv.h @@ -73,7 +73,6 @@ #define HAVE_LCD_ENABLE #define CONFIG_KEYPAD CREATIVEZV_PAD -#define HAVE_BUTTON_HOLD #define HAVE_HEADPHONE_DETECTION //#define HAVE_TOUCHPAD diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h index e4ccfc775f..02ec490284 100644 --- a/firmware/export/config-creativezvm.h +++ b/firmware/export/config-creativezvm.h @@ -73,7 +73,6 @@ #define HAVE_LCD_ENABLE #define CONFIG_KEYPAD CREATIVEZVM_PAD -#define HAVE_BUTTON_HOLD #define HAVE_HEADPHONE_DETECTION //#define HAVE_TOUCHPAD diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h index bcf361690d..f319dead47 100644 --- a/firmware/export/config-creativezvm60gb.h +++ b/firmware/export/config-creativezvm60gb.h @@ -73,7 +73,6 @@ #define HAVE_LCD_ENABLE #define CONFIG_KEYPAD CREATIVEZVM_PAD -#define HAVE_BUTTON_HOLD #define HAVE_HEADPHONE_DETECTION //#define HAVE_TOUCHPAD diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h index 5144631416..49047d6a3c 100644 --- a/firmware/export/config-ondavx747.h +++ b/firmware/export/config-ondavx747.h @@ -67,7 +67,6 @@ #define HAVE_LCD_ENABLE #define CONFIG_KEYPAD ONDAVX747_PAD -#define HAVE_BUTTON_HOLD #define HAVE_TOUCHSCREEN #define HAVE_BUTTON_DATA diff --git a/firmware/export/config-ondavx767.h b/firmware/export/config-ondavx767.h index 9d3ed9d7ec..55a6791cbc 100644 --- a/firmware/export/config-ondavx767.h +++ b/firmware/export/config-ondavx767.h @@ -67,7 +67,6 @@ //#define HAVE_LCD_ENABLE #define CONFIG_KEYPAD ONDAVX767_PAD -#define HAVE_BUTTON_HOLD /* Define this if you do software codec */ #define CONFIG_CODEC SWCODEC diff --git a/firmware/export/jz4740.h b/firmware/export/jz4740.h index a025b94116..3688819b19 100644 --- a/firmware/export/jz4740.h +++ b/firmware/export/jz4740.h @@ -2354,31 +2354,32 @@ /* Power register bit masks */ -#define USB_POWER_SUSPENDM 0x01 +#define USB_POWER_SUSPENDM 0x01 #define USB_POWER_RESUME 0x04 #define USB_POWER_HSMODE 0x10 #define USB_POWER_HSENAB 0x20 -#define USB_POWER_SOFTCONN 0x40 +#define USB_POWER_SOFTCONN 0x40 /* Interrupt register bit masks */ #define USB_INTR_SUSPEND 0x01 -#define USB_INTR_RESUME 0x02 -#define USB_INTR_RESET 0x04 +#define USB_INTR_RESUME 0x02 +#define USB_INTR_RESET 0x04 #define USB_INTR_EP0 0x0001 -#define USB_INTR_INEP1 0x0002 -#define USB_INTR_INEP2 0x0004 -#define USB_INTR_OUTEP1 0x0002 +#define USB_INTR_INEP1 0x0002 +#define USB_INTR_INEP2 0x0004 +#define USB_INTR_OUTEP1 0x0002 +#define USB_INTR_OUTEP2 0x0004 /* CSR0 bit masks */ #define USB_CSR0_OUTPKTRDY 0x01 -#define USB_CSR0_INPKTRDY 0x02 +#define USB_CSR0_INPKTRDY 0x02 #define USB_CSR0_SENTSTALL 0x04 -#define USB_CSR0_DATAEND 0x08 -#define USB_CSR0_SETUPEND 0x10 +#define USB_CSR0_DATAEND 0x08 +#define USB_CSR0_SETUPEND 0x10 #define USB_CSR0_SENDSTALL 0x20 -#define USB_CSR0_SVDOUTPKTRDY 0x40 -#define USB_CSR0_SVDSETUPEND 0x80 +#define USB_CSR0_SVDOUTPKTRDY 0x40 +#define USB_CSR0_SVDSETUPEND 0x80 /* Endpoint CSR register bits */ #define USB_INCSRH_AUTOSET 0x80 diff --git a/firmware/thread.c b/firmware/thread.c index 4e22c51689..399f6ef02b 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -989,7 +989,6 @@ static inline void core_sleep(void) void start_thread(void); /* Provide C access to ASM label */ static void __attribute__((used)) _start_thread(void) { - /* $t1 = context */ asm volatile ( "start_thread: \n" @@ -1004,7 +1003,6 @@ static void __attribute__((used)) _start_thread(void) ".set reorder \n" ); thread_exit(); - } /* Place context pointer in $s0 slot, function pointer in $s1 slot, and @@ -1084,10 +1082,9 @@ static inline void load_context(const void* addr) static inline void core_sleep(void) { #if CONFIG_CPU == JZ4732 - REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; - REG_CPM_LCR |= CPM_LCR_LPM_SLEEP; + __cpm_idle_mode(); #endif - asm volatile(".set mips32r2 \n" + asm volatile(".set mips32r2 \n" "mfc0 $8, $12 \n" /* mfc $t0, $12 */ "move $9, $8 \n" /* move $t1, $t0 */ "la $10, 0x8000000 \n" /* la $t2, 0x8000000 */ @@ -1098,10 +1095,6 @@ static inline void core_sleep(void) ".set mips0 \n" ::: "t0", "t1", "t2" ); -#if CONFIG_CPU == JZ4732 - REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; - REG_CPM_LCR |= CPM_LCR_LPM_IDLE; -#endif } -- cgit v1.2.3