提交 69716c19 编写于 作者: J Jason Kridner 提交者: Albert ARIBAUD

USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor

Remove __attribute__ ((packed)) to prevent byte access to soc
registers in some gcc versions.

Having patches to enable ehci for the BeagleBoard lying around for
several months, this one was the show-stopper.

Switched to align(4), rather than remove the attribute, per suggestion
from Alexander.

Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for
finding the problem.
Signed-off-by: NJason Kridner <jkridner@beagleboard.org>
Signed-off-by: NJoel A Fernandes <agnel.joel@gmail.com>
Cc: Alexander Holler <holler@ahsoftware.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: NSandeep Paulraj <s-paulraj@ti.com>
上级 1ffcb346
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册