Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 80bd83d..d2dcf7e 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -834,8 +834,8 @@ Lyre prototype 1 */
 #elif CONFIG_USBOTG == USBOTG_AS3525
 #define USB_STATUS_BY_EVENT
 #define USB_DETECT_BY_REQUEST
-#elif CONFIG_USBOTG == USBOTG_S3C6400X /* FIXME */ && CONFIG_CPU == AS3525v2
-#define USB_STATUS_BY_EVENT
+#elif CONFIG_USBOTG == USBOTG_S3C6400X
+//#define USB_STATUS_BY_EVENT
 #define USB_DETECT_BY_REQUEST
 #elif CONFIG_USBOTG == USBOTG_RK27XX
 #define USB_STATUS_BY_EVENT
diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h
index 9b34e6a..5da3268 100644
--- a/firmware/export/config/ipodnano2g.h
+++ b/firmware/export/config/ipodnano2g.h
@@ -172,7 +172,7 @@
 /* I2C interface */
 #define CONFIG_I2C I2C_S5L8700
 
-#define HAVE_USB_CHARGING_ENABLE
+//#define HAVE_USB_CHARGING_ENABLE
 
 /* The size of the flash ROM */
 #define FLASH_SIZE 0x400000
@@ -228,7 +228,7 @@
 #define USB_VENDOR_ID 0x05AC
 #define USB_PRODUCT_ID 0x1260
 #define USB_NUM_ENDPOINTS 5
-#define USE_ROCKBOX_USB
+//#define USE_ROCKBOX_USB
 #define USB_DEVBSS_ATTR __attribute__((aligned(16)))
 
 /* Define this if you can switch on/off the accessory power supply */
diff --git a/firmware/target/arm/s5l8700/usb-nano2g-6g.c b/firmware/target/arm/s5l8700/usb-nano2g-6g.c
index b070f2b..51425a1 100644
--- a/firmware/target/arm/s5l8700/usb-nano2g-6g.c
+++ b/firmware/target/arm/s5l8700/usb-nano2g-6g.c
@@ -24,7 +24,7 @@
 #include "usb-s3c6400x.h"
 #include "cpu.h"
 
-#ifdef HAVE_USBSTACK
+#if defined(HAVE_USBSTACK) && defined(USE_ROCKBOX_USB)
 #include "usb_core.h"
 #include "usb_drv.h"
 #include "power.h"
@@ -35,13 +35,6 @@ void usb_enable(bool on)
     else usb_core_exit();
 }
 
-int usb_detect(void)
-{
-    if (charger_inserted())
-        return USB_INSERTED;
-    return USB_EXTRACTED;
-}
-
 void usb_init_device(void)
 {
     /* Power up the core clocks to allow writing
@@ -65,11 +58,6 @@ void usb_enable(bool on)
     (void)on;
 }
 
-int usb_detect(void)
-{
-    return USB_EXTRACTED;
-}
-
 void usb_init_device(void)
 {
     DCTL = DCTL_pwronprgdone | DCTL_sftdiscon;
@@ -85,4 +73,13 @@ void usb_init_device(void)
     PWRCON(0) |= 0x4;
     PWRCON(1) |= 0x8;
 #endif
+}
 #endif
+
+int usb_detect(void)
+{
+    if (charger_inserted())
+        return USB_INSERTED;
+    return USB_EXTRACTED;
+}
+