[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] Remove __attribute__ ((packed) from EHCI structs
Alan, one more. Thanks.
Commit message:
Remove __attribute__ ((packed) from ehci_hcor and ehci_hccr structs to
avoid slow generated code by gcc when compiled with -m68000 as pointed
by Vincent. Both structs don't change size when (packed) is removed.
Index: sys/usb/src.km/ucd/ehci/ehci.h
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/ucd/ehci/ehci.h,v
retrieving revision 1.2
diff -u -8 -r1.2 ehci.h
--- sys/usb/src.km/ucd/ehci/ehci.h 2 May 2014 09:48:36 -0000 1.2
+++ sys/usb/src.km/ucd/ehci/ehci.h 2 May 2014 10:47:44 -0000
@@ -50,17 +50,17 @@
#define HC_LENGTH(p) (((p) >> 0) & 0x00ff)
#define HC_VERSION(p) (((p) >> 16) & 0xffff)
unsigned long cr_hcsparams;
#define HCS_PPC(p) ((p) & (1 << 4))
#define HCS_INDICATOR(p) ((p) & (1UL << 16)) /* Port indicators */
#define HCS_N_PORTS(p) (((p) >> 0) & 0xf)
unsigned long cr_hccparams;
unsigned char cr_hcsp_portrt[8];
-} __attribute__ ((packed));
+};
struct ehci_hcor {
unsigned long or_usbcmd;
#define CMD_PARK (1UL << 11) /* enable "park" */
#define CMD_PARK_CNT(c) (((c) >> 8) & 3UL) /* how many transfers to park */
#define CMD_ASE (1UL << 5) /* async schedule enable */
#define CMD_LRESET (1UL << 7) /* partial reset */
#define CMD_IAAD (1UL << 5) /* "doorbell" interrupt */
@@ -89,17 +89,17 @@
unsigned long or_ctrldssegment;
unsigned long or_periodiclistbase;
unsigned long or_asynclistaddr;
unsigned long _reserved_[9];
unsigned long or_configflag;
#define FLAG_CF (1UL << 0) /* true: we'll support "high speed" */
unsigned long or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS];
unsigned long or_systune;
-} __attribute__ ((packed));
+};
#define USBMODE 0x68 /* USB Device mode */
#define USBMODE_SDIS (1 << 3) /* Stream disable */
#define USBMODE_BE (1 << 2) /* BE/LE endiannes select */
#define USBMODE_CM_HC (3 << 0) /* host controller mode */
#define USBMODE_CM_IDLE (0 << 0) /* idle state */
#if defined CONFIG_EHCI_DESC_BIG_ENDIAN