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;
+}
+