summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-04-16 15:48:54 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-04-16 15:48:54 +0000
commit5ff61eee6a3980c887b2e371acc44fda5d9380b6 (patch)
tree8b0a6cf3bf344f563ab63d9c9f31dd8d7c47064d /firmware/usbstack
parent735790fde00c2cb47f060982b649c0a395c10fd9 (diff)
downloadrockbox-5ff61eee6a3980c887b2e371acc44fda5d9380b6.zip
rockbox-5ff61eee6a3980c887b2e371acc44fda5d9380b6.tar.gz
rockbox-5ff61eee6a3980c887b2e371acc44fda5d9380b6.tar.bz2
rockbox-5ff61eee6a3980c887b2e371acc44fda5d9380b6.tar.xz
Simpilify the uncached buffer allocation for the USB stack using NOCACHEBSS_ATTR. This will probably get abstracted since the appropriate way to handle it will be somewhat target-specific.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17140 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_core.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index ae5606f..ea00948 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -121,7 +121,7 @@ static const struct usb_qualifier_descriptor __attribute__((aligned(2)))
.bNumConfigurations = 1
};
-static struct usb_string_descriptor __attribute__((aligned(2)))
+static const struct usb_string_descriptor __attribute__((aligned(2)))
usb_string_iManufacturer =
{
24,
@@ -129,7 +129,7 @@ static struct usb_string_descriptor __attribute__((aligned(2)))
{'R','o','c','k','b','o','x','.','o','r','g'}
};
-static struct usb_string_descriptor __attribute__((aligned(2)))
+static const struct usb_string_descriptor __attribute__((aligned(2)))
usb_string_iProduct =
{
42,
@@ -152,7 +152,7 @@ static struct usb_string_descriptor __attribute__((aligned(2)))
/* Generic for all targets */
/* this is stringid #0: languages supported */
-static struct usb_string_descriptor __attribute__((aligned(2)))
+static const struct usb_string_descriptor __attribute__((aligned(2)))
lang_descriptor =
{
4,
@@ -160,7 +160,7 @@ static struct usb_string_descriptor __attribute__((aligned(2)))
{0x0409} /* LANGID US English */
};
-static struct usb_string_descriptor __attribute__((aligned(2)))
+static const struct usb_string_descriptor __attribute__((aligned(2)))
usb_string_charging_only =
{
28,
@@ -168,7 +168,7 @@ static struct usb_string_descriptor __attribute__((aligned(2)))
{'C','h','a','r','g','i','n','g',' ','o','n','l','y'}
};
-static struct usb_string_descriptor* usb_strings[] =
+static struct usb_string_descriptor* const usb_strings[] =
{
&lang_descriptor,
&usb_string_iManufacturer,
@@ -244,8 +244,7 @@ static struct usb_class_driver drivers[USB_NUM_DRIVERS] =
static void usb_core_control_request_handler(struct usb_ctrlrequest* req);
static int ack_control(struct usb_ctrlrequest* req);
-static unsigned char *response_data;
-static unsigned char __response_data[CACHEALIGN_UP(256)] CACHEALIGN_ATTR;
+static unsigned char response_data[256] NOCACHEBSS_ATTR;
static struct usb_transfer_completion_event_data events[NUM_ENDPOINTS];
@@ -317,8 +316,6 @@ void usb_core_init(void)
if (initialized)
return;
- response_data = (void*)UNCACHED_ADDR(&__response_data);
-
usb_drv_init();
/* class driver init functions should be safe to call even if the driver