summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack/usb_storage.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2009-10-20 06:37:07 +0000
committerMichael Sparmann <theseven@rockbox.org>2009-10-20 06:37:07 +0000
commitd03fe64dcf80633c7ec78f122682e78fb59fe2d8 (patch)
treea404d7fccf244445572f92b796fb5433c3523d58 /firmware/usbstack/usb_storage.c
parent3ad3bec0ad6d8bada7e70d6f646b4b13a2fedbf4 (diff)
downloadrockbox-d03fe64dcf80633c7ec78f122682e78fb59fe2d8.tar.gz
rockbox-d03fe64dcf80633c7ec78f122682e78fb59fe2d8.tar.bz2
rockbox-d03fe64dcf80633c7ec78f122682e78fb59fe2d8.zip
iPod Nano 2G USB support based on the S3C6400X datasheet. Disabled by default for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23285 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack/usb_storage.c')
-rw-r--r--firmware/usbstack/usb_storage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index d16277a5f1..88a669b64a 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -44,7 +44,9 @@
#define RAMDISK_SIZE 2048
#endif
+#ifndef SECTOR_SIZE
#define SECTOR_SIZE 512
+#endif
/* the ARC driver currently supports up to 64k USB transfers. This is
* enough for efficient mass storage support, as commonly host OSes
@@ -454,7 +456,11 @@ void usb_storage_init_connection(void)
unsigned char * audio_buffer;
audio_buffer = audio_get_buffer(false,&bufsize);
+#ifdef UNCACHED_ADDR
cbw_buffer = (void *)UNCACHED_ADDR((unsigned int)(audio_buffer+31) & 0xffffffe0);
+#else
+ cbw_buffer = (void *)((unsigned int)(audio_buffer+31) & 0xffffffe0);
+#endif
tb.transfer_buffer = cbw_buffer + 1024;
cpucache_invalidate();
#ifdef USB_USE_RAMDISK