diff options
-rw-r--r-- | firmware/export/config-creativezv.h | 1 | ||||
-rw-r--r-- | firmware/export/config-creativezvm.h | 1 | ||||
-rw-r--r-- | firmware/export/config-creativezvm60gb.h | 1 | ||||
-rw-r--r-- | firmware/export/config-ondavx747.h | 1 | ||||
-rw-r--r-- | firmware/export/config-ondavx767.h | 1 | ||||
-rw-r--r-- | firmware/export/jz4740.h | 25 | ||||
-rw-r--r-- | 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 @@ | |||
73 | #define HAVE_LCD_ENABLE | 73 | #define HAVE_LCD_ENABLE |
74 | 74 | ||
75 | #define CONFIG_KEYPAD CREATIVEZV_PAD | 75 | #define CONFIG_KEYPAD CREATIVEZV_PAD |
76 | #define HAVE_BUTTON_HOLD | ||
77 | #define HAVE_HEADPHONE_DETECTION | 76 | #define HAVE_HEADPHONE_DETECTION |
78 | //#define HAVE_TOUCHPAD | 77 | //#define HAVE_TOUCHPAD |
79 | 78 | ||
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 @@ | |||
73 | #define HAVE_LCD_ENABLE | 73 | #define HAVE_LCD_ENABLE |
74 | 74 | ||
75 | #define CONFIG_KEYPAD CREATIVEZVM_PAD | 75 | #define CONFIG_KEYPAD CREATIVEZVM_PAD |
76 | #define HAVE_BUTTON_HOLD | ||
77 | #define HAVE_HEADPHONE_DETECTION | 76 | #define HAVE_HEADPHONE_DETECTION |
78 | //#define HAVE_TOUCHPAD | 77 | //#define HAVE_TOUCHPAD |
79 | 78 | ||
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 @@ | |||
73 | #define HAVE_LCD_ENABLE | 73 | #define HAVE_LCD_ENABLE |
74 | 74 | ||
75 | #define CONFIG_KEYPAD CREATIVEZVM_PAD | 75 | #define CONFIG_KEYPAD CREATIVEZVM_PAD |
76 | #define HAVE_BUTTON_HOLD | ||
77 | #define HAVE_HEADPHONE_DETECTION | 76 | #define HAVE_HEADPHONE_DETECTION |
78 | //#define HAVE_TOUCHPAD | 77 | //#define HAVE_TOUCHPAD |
79 | 78 | ||
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 @@ | |||
67 | #define HAVE_LCD_ENABLE | 67 | #define HAVE_LCD_ENABLE |
68 | 68 | ||
69 | #define CONFIG_KEYPAD ONDAVX747_PAD | 69 | #define CONFIG_KEYPAD ONDAVX747_PAD |
70 | #define HAVE_BUTTON_HOLD | ||
71 | #define HAVE_TOUCHSCREEN | 70 | #define HAVE_TOUCHSCREEN |
72 | #define HAVE_BUTTON_DATA | 71 | #define HAVE_BUTTON_DATA |
73 | 72 | ||
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 @@ | |||
67 | //#define HAVE_LCD_ENABLE | 67 | //#define HAVE_LCD_ENABLE |
68 | 68 | ||
69 | #define CONFIG_KEYPAD ONDAVX767_PAD | 69 | #define CONFIG_KEYPAD ONDAVX767_PAD |
70 | #define HAVE_BUTTON_HOLD | ||
71 | 70 | ||
72 | /* Define this if you do software codec */ | 71 | /* Define this if you do software codec */ |
73 | #define CONFIG_CODEC SWCODEC | 72 | #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 @@ | |||
2354 | 2354 | ||
2355 | 2355 | ||
2356 | /* Power register bit masks */ | 2356 | /* Power register bit masks */ |
2357 | #define USB_POWER_SUSPENDM 0x01 | 2357 | #define USB_POWER_SUSPENDM 0x01 |
2358 | #define USB_POWER_RESUME 0x04 | 2358 | #define USB_POWER_RESUME 0x04 |
2359 | #define USB_POWER_HSMODE 0x10 | 2359 | #define USB_POWER_HSMODE 0x10 |
2360 | #define USB_POWER_HSENAB 0x20 | 2360 | #define USB_POWER_HSENAB 0x20 |
2361 | #define USB_POWER_SOFTCONN 0x40 | 2361 | #define USB_POWER_SOFTCONN 0x40 |
2362 | 2362 | ||
2363 | /* Interrupt register bit masks */ | 2363 | /* Interrupt register bit masks */ |
2364 | #define USB_INTR_SUSPEND 0x01 | 2364 | #define USB_INTR_SUSPEND 0x01 |
2365 | #define USB_INTR_RESUME 0x02 | 2365 | #define USB_INTR_RESUME 0x02 |
2366 | #define USB_INTR_RESET 0x04 | 2366 | #define USB_INTR_RESET 0x04 |
2367 | 2367 | ||
2368 | #define USB_INTR_EP0 0x0001 | 2368 | #define USB_INTR_EP0 0x0001 |
2369 | #define USB_INTR_INEP1 0x0002 | 2369 | #define USB_INTR_INEP1 0x0002 |
2370 | #define USB_INTR_INEP2 0x0004 | 2370 | #define USB_INTR_INEP2 0x0004 |
2371 | #define USB_INTR_OUTEP1 0x0002 | 2371 | #define USB_INTR_OUTEP1 0x0002 |
2372 | #define USB_INTR_OUTEP2 0x0004 | ||
2372 | 2373 | ||
2373 | /* CSR0 bit masks */ | 2374 | /* CSR0 bit masks */ |
2374 | #define USB_CSR0_OUTPKTRDY 0x01 | 2375 | #define USB_CSR0_OUTPKTRDY 0x01 |
2375 | #define USB_CSR0_INPKTRDY 0x02 | 2376 | #define USB_CSR0_INPKTRDY 0x02 |
2376 | #define USB_CSR0_SENTSTALL 0x04 | 2377 | #define USB_CSR0_SENTSTALL 0x04 |
2377 | #define USB_CSR0_DATAEND 0x08 | 2378 | #define USB_CSR0_DATAEND 0x08 |
2378 | #define USB_CSR0_SETUPEND 0x10 | 2379 | #define USB_CSR0_SETUPEND 0x10 |
2379 | #define USB_CSR0_SENDSTALL 0x20 | 2380 | #define USB_CSR0_SENDSTALL 0x20 |
2380 | #define USB_CSR0_SVDOUTPKTRDY 0x40 | 2381 | #define USB_CSR0_SVDOUTPKTRDY 0x40 |
2381 | #define USB_CSR0_SVDSETUPEND 0x80 | 2382 | #define USB_CSR0_SVDSETUPEND 0x80 |
2382 | 2383 | ||
2383 | /* Endpoint CSR register bits */ | 2384 | /* Endpoint CSR register bits */ |
2384 | #define USB_INCSRH_AUTOSET 0x80 | 2385 | #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) | |||
989 | void start_thread(void); /* Provide C access to ASM label */ | 989 | void start_thread(void); /* Provide C access to ASM label */ |
990 | static void __attribute__((used)) _start_thread(void) | 990 | static void __attribute__((used)) _start_thread(void) |
991 | { | 991 | { |
992 | |||
993 | /* $t1 = context */ | 992 | /* $t1 = context */ |
994 | asm volatile ( | 993 | asm volatile ( |
995 | "start_thread: \n" | 994 | "start_thread: \n" |
@@ -1004,7 +1003,6 @@ static void __attribute__((used)) _start_thread(void) | |||
1004 | ".set reorder \n" | 1003 | ".set reorder \n" |
1005 | ); | 1004 | ); |
1006 | thread_exit(); | 1005 | thread_exit(); |
1007 | |||
1008 | } | 1006 | } |
1009 | 1007 | ||
1010 | /* Place context pointer in $s0 slot, function pointer in $s1 slot, and | 1008 | /* Place context pointer in $s0 slot, function pointer in $s1 slot, and |
@@ -1084,10 +1082,9 @@ static inline void load_context(const void* addr) | |||
1084 | static inline void core_sleep(void) | 1082 | static inline void core_sleep(void) |
1085 | { | 1083 | { |
1086 | #if CONFIG_CPU == JZ4732 | 1084 | #if CONFIG_CPU == JZ4732 |
1087 | REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; | 1085 | __cpm_idle_mode(); |
1088 | REG_CPM_LCR |= CPM_LCR_LPM_SLEEP; | ||
1089 | #endif | 1086 | #endif |
1090 | asm volatile(".set mips32r2 \n" | 1087 | asm volatile(".set mips32r2 \n" |
1091 | "mfc0 $8, $12 \n" /* mfc $t0, $12 */ | 1088 | "mfc0 $8, $12 \n" /* mfc $t0, $12 */ |
1092 | "move $9, $8 \n" /* move $t1, $t0 */ | 1089 | "move $9, $8 \n" /* move $t1, $t0 */ |
1093 | "la $10, 0x8000000 \n" /* la $t2, 0x8000000 */ | 1090 | "la $10, 0x8000000 \n" /* la $t2, 0x8000000 */ |
@@ -1098,10 +1095,6 @@ static inline void core_sleep(void) | |||
1098 | ".set mips0 \n" | 1095 | ".set mips0 \n" |
1099 | ::: "t0", "t1", "t2" | 1096 | ::: "t0", "t1", "t2" |
1100 | ); | 1097 | ); |
1101 | #if CONFIG_CPU == JZ4732 | ||
1102 | REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; | ||
1103 | REG_CPM_LCR |= CPM_LCR_LPM_IDLE; | ||
1104 | #endif | ||
1105 | } | 1098 | } |
1106 | 1099 | ||
1107 | 1100 | ||