summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 02:20:27 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 19:45:59 +0000
commit6a00113de8b9060a7227bcfa79b3786e3e592a33 (patch)
tree467f5653272ed2d16f6d8033ed8cd0e7391fb426 /payloads/libpayload/drivers/usb
parent9f244a5494192707bfbb72e60f17411e9a35434a (diff)
downloadcoreboot-6a00113de8b9060a7227bcfa79b3786e3e592a33.tar.xz
Rename __attribute__((packed)) --> __packed
Also unify __attribute__ ((..)) to __attribute__((..)) and handle ((__packed__)) like ((packed)) Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/15921 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb')
-rw-r--r--payloads/libpayload/drivers/usb/ehci_private.h8
-rw-r--r--payloads/libpayload/drivers/usb/ohci_private.h8
-rw-r--r--payloads/libpayload/drivers/usb/uhci_private.h4
-rw-r--r--payloads/libpayload/drivers/usb/usbmsc.c8
-rw-r--r--payloads/libpayload/drivers/usb/xhci_private.h32
5 files changed, 30 insertions, 30 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci_private.h b/payloads/libpayload/drivers/usb/ehci_private.h
index 46ad551289..ac845e6153 100644
--- a/payloads/libpayload/drivers/usb/ehci_private.h
+++ b/payloads/libpayload/drivers/usb/ehci_private.h
@@ -55,7 +55,7 @@ typedef volatile struct {
u32 hcsparams;
u32 hccparams;
u64 hcsp_portroute;
-} __attribute__ ((packed)) hc_cap_t;
+} __packed hc_cap_t;
typedef volatile struct {
u32 usbcmd;
@@ -83,7 +83,7 @@ typedef volatile struct {
u8 res2[0x40];
u32 hostpc;
/* hostpc register is used for CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT */
-} __attribute__ ((packed)) hc_op_t;
+} __packed hc_op_t;
typedef volatile struct {
#define QTD_TERMINATE 1
@@ -108,7 +108,7 @@ typedef volatile struct {
#define QTD_TOGGLE_DATA1 (1 << QTD_TOGGLE_SHIFT)
u32 bufptrs[5];
u32 bufptrs64[5];
-} __attribute__ ((packed)) qtd_t;
+} __packed qtd_t;
typedef volatile struct {
u32 horiz_link_ptr;
@@ -132,7 +132,7 @@ typedef volatile struct {
#define QH_PIPE_MULTIPLIER_SHIFT 30
volatile u32 current_td_ptr;
volatile qtd_t td;
-} __attribute__ ((packed)) ehci_qh_t;
+} __packed ehci_qh_t;
typedef struct ehci {
hc_cap_t *capabilities;
diff --git a/payloads/libpayload/drivers/usb/ohci_private.h b/payloads/libpayload/drivers/usb/ohci_private.h
index 58be5fa5bb..116a2b4ec6 100644
--- a/payloads/libpayload/drivers/usb/ohci_private.h
+++ b/payloads/libpayload/drivers/usb/ohci_private.h
@@ -186,7 +186,7 @@
_DO NOT_ use |= to set the bits,
this clears the entire state */
volatile u32 HcRhPortStatus[];
- } __attribute__ ((packed)) opreg_t;
+ } __packed opreg_t;
typedef struct { /* should be 256 bytes according to spec */
u32 HccaInterruptTable[32];
@@ -195,14 +195,14 @@
volatile u32 HccaDoneHead;
u8 reserved[116]; /* pad according to spec */
u8 what[4]; /* really pad to 256 as spec only covers 252 */
- } __attribute__ ((packed)) hcca_t;
+ } __packed hcca_t;
typedef volatile struct {
u32 config;
u32 tail_pointer;
u32 head_pointer;
u32 next_ed;
- } __attribute__ ((packed)) ed_t;
+ } __packed ed_t;
#define ED_HALTED 1
#define ED_TOGGLE 2
@@ -220,7 +220,7 @@
u32 current_buffer_pointer;
u32 next_td;
u32 buffer_end;
- } __attribute__ ((packed)) td_t;
+ } __packed td_t;
/*
* Bits 0 through 17 of .config won't be interpreted by the host controller
* (HC) and, after processing the TD, the HC has to ensure those bits have
diff --git a/payloads/libpayload/drivers/usb/uhci_private.h b/payloads/libpayload/drivers/usb/uhci_private.h
index 3d796cfe19..e5114ae046 100644
--- a/payloads/libpayload/drivers/usb/uhci_private.h
+++ b/payloads/libpayload/drivers/usb/uhci_private.h
@@ -67,13 +67,13 @@ typedef struct {
u32 bufptr;
-} __attribute__ ((packed))
+} __packed
td_t;
typedef struct {
flistp_t headlinkptr;
volatile flistp_t elementlinkptr;
- } __attribute__ ((packed))
+ } __packed
qh_t;
typedef enum { USBCMD = 0, USBSTS = 2, USBINTR = 4, FRNUM =
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c
index 17313cf88e..2c7cbe5ef2 100644
--- a/payloads/libpayload/drivers/usb/usbmsc.c
+++ b/payloads/libpayload/drivers/usb/usbmsc.c
@@ -112,14 +112,14 @@ typedef struct {
unsigned long bCBWCBLength:5;
unsigned long:3;
unsigned char CBWCB[31 - 15];
-} __attribute__ ((packed)) cbw_t;
+} __packed cbw_t;
typedef struct {
unsigned int dCSWSignature;
unsigned int dCSWTag;
unsigned int dCSWDataResidue;
unsigned char bCSWStatus;
-} __attribute__ ((packed)) csw_t;
+} __packed csw_t;
enum {
/*
@@ -297,7 +297,7 @@ typedef struct {
unsigned char res2; //6
unsigned short numblocks; //7-8
unsigned char control; //9 - the block is 10 bytes long
-} __attribute__ ((packed)) cmdblock_t;
+} __packed cmdblock_t;
typedef struct {
unsigned char command; //0
@@ -312,7 +312,7 @@ typedef struct {
unsigned char length; // for REQUEST SENSE
};
unsigned char control; //5
-} __attribute__ ((packed)) cmdblock6_t;
+} __packed cmdblock6_t;
/**
* Like readwrite_blocks, but for soft-sectors of 512b size. Converts the
diff --git a/payloads/libpayload/drivers/usb/xhci_private.h b/payloads/libpayload/drivers/usb/xhci_private.h
index a6dcc847b0..14d0e89c2e 100644
--- a/payloads/libpayload/drivers/usb/xhci_private.h
+++ b/payloads/libpayload/drivers/usb/xhci_private.h
@@ -165,7 +165,7 @@ typedef struct {
trb_t *ring;
trb_t *cur;
u8 pcs;
-} __attribute__ ((packed)) transfer_ring_t;
+} __packed transfer_ring_t;
#define COMMAND_RING_SIZE 4
typedef transfer_ring_t command_ring_t;
@@ -332,8 +332,8 @@ typedef struct xhci {
struct {
u8 hciver_lo;
u8 hciver_hi;
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ } __packed;
+ } __packed;
union {
u32 hcsparams1;
struct {
@@ -341,8 +341,8 @@ typedef struct xhci {
unsigned long MaxIntrs:11;
unsigned long:6;
unsigned long MaxPorts:8;
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ } __packed;
+ } __packed;
union {
u32 hcsparams2;
struct {
@@ -352,16 +352,16 @@ typedef struct xhci {
unsigned long Max_Scratchpad_Bufs_Hi:5;
unsigned long SPR:1;
unsigned long Max_Scratchpad_Bufs_Lo:5;
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ } __packed;
+ } __packed;
union {
u32 hcsparams3;
struct {
unsigned long u1latency:8;
unsigned long:8;
unsigned long u2latency:16;
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ } __packed;
+ } __packed;
union {
u32 hccparams;
struct {
@@ -376,11 +376,11 @@ typedef struct xhci {
unsigned long:4;
unsigned long MaxPSASize:4;
unsigned long xECP:16;
- } __attribute__ ((packed));
- } __attribute__ ((packed));
+ } __packed;
+ } __packed;
u32 dboff;
u32 rtsoff;
- } __attribute__ ((packed)) *capreg;
+ } __packed *capreg;
/* opreg is R/W is most places, so volatile access is necessary.
volatile means that the compiler seeks byte writes if possible,
@@ -446,8 +446,8 @@ typedef struct xhci {
u32 portpmsc;
u32 portli;
u32 res;
- } __attribute__ ((packed)) prs[];
- } __attribute__ ((packed)) *opreg;
+ } __packed prs[];
+ } __packed *opreg;
/* R/W, volatile, MMIO -> no bitfields */
volatile struct hcrreg {
@@ -462,8 +462,8 @@ typedef struct xhci {
u32 erstba_hi;
u32 erdp_lo;
u32 erdp_hi;
- } __attribute__ ((packed)) intrrs[]; // up to 1024, but maximum host specific, given in capreg->MaxIntrs
- } __attribute__ ((packed)) *hcrreg;
+ } __packed intrrs[]; // up to 1024, but maximum host specific, given in capreg->MaxIntrs
+ } __packed *hcrreg;
/* R/W, volatile, MMIO -> no bitfields */
volatile u32 *dbreg;