summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-04-20 16:51:09 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-04-20 16:51:09 +0000
commit02bfba6c616a4e4aedf0e36d742598c36334e228 (patch)
tree361db89d5d6f65ae8d180d1c078c587dc58f0a46 /firmware
parentbcf0b6cfb7c0eb7954ee1344abb28efad4afb4cd (diff)
downloadrockbox-02bfba6c616a4e4aedf0e36d742598c36334e228.tar.gz
rockbox-02bfba6c616a4e4aedf0e36d742598c36334e228.tar.bz2
rockbox-02bfba6c616a4e4aedf0e36d742598c36334e228.zip
Put USB controller structures in IRAM. This seems to make the connection much more stable on PP502x
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17191 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/usb_core.h2
-rw-r--r--firmware/usbstack/usb_serial.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h
index bf6f2becb2..fc1c742286 100644
--- a/firmware/export/usb_core.h
+++ b/firmware/export/usb_core.h
@@ -37,7 +37,7 @@
#define NUM_ENDPOINTS 8
#define USBDEVBSS_ATTR DEVBSS_ATTR
#else
-#define USBDEVBSS_ATTR NOCACHEBSS_ATTR
+#define USBDEVBSS_ATTR IBSS_ATTR
#define NUM_ENDPOINTS 3
#endif
diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c
index f39035462f..08eb1213ea 100644
--- a/firmware/usbstack/usb_serial.c
+++ b/firmware/usbstack/usb_serial.c
@@ -53,10 +53,16 @@ struct usb_endpoint_descriptor __attribute__((aligned(2))) endpoint_descriptor =
};
#define BUFFER_SIZE 512 /* Max 16k because of controller limitations */
+#if CONFIG_CPU == IMX31L
static unsigned char send_buffer[BUFFER_SIZE]
USBDEVBSS_ATTR __attribute__((aligned(32)));
-static unsigned char receive_buffer[512]
+static unsigned char receive_buffer[32]
USBDEVBSS_ATTR __attribute__((aligned(32)));
+#else
+static unsigned char send_buffer[BUFFER_SIZE] __attribute__((aligned(32)));
+static unsigned char receive_buffer[32] __attribute__((aligned(32)));
+#endif
+
static bool busy_sending = false;
static int buffer_start;
static int buffer_length;