aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Kridner <jkridner@beagleboard.org>2011-08-11 11:22:45 +0000
committerJohn Rigby <john.rigby@linaro.org>2011-08-12 09:50:10 -0600
commitd37d4272fa30887989f8729a565d32a676f9509d (patch)
treee35e052d1c13d97c0ad400178291218668f93ff8
parentd7bc222c9a48233e15aa85b45b356d8198c38a13 (diff)
downloadu-boot-linaro-stable-d37d4272fa30887989f8729a565d32a676f9509d.tar.gz
USB: Add align(4) in __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor
Switched to align(4) to prevent byte access to soc registers in some gcc versions. Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for finding the problem. Signed-off-by: Jason Kridner <jkridner@beagleboard.org> Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Cc: Koen Kooi <k-kooi@ti.com> Cc: Alexander Holler <holler@ahsoftware.de> Cc: Sandeep Paulraj <s-paulraj@ti.com> Cc: Igor Grinberg <grinberg@compulab.co.il>
-rw-r--r--drivers/usb/host/ehci.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 945ab64f9..3d0ad0c85 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -55,7 +55,7 @@ struct ehci_hccr {
#define HCS_N_PORTS(p) (((p) >> 0) & 0xf)
uint32_t cr_hccparams;
uint8_t cr_hcsp_portrt[8];
-} __attribute__ ((packed));
+} __attribute__ ((packed, aligned(4)));
struct ehci_hcor {
uint32_t or_usbcmd;
@@ -85,7 +85,7 @@ struct ehci_hcor {
#define FLAG_CF (1 << 0) /* true: we'll support "high speed" */
uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS];
uint32_t or_systune;
-} __attribute__ ((packed));
+} __attribute__ ((packed, aligned(4)));
#define USBMODE 0x68 /* USB Device mode */
#define USBMODE_SDIS (1 << 3) /* Stream disable */