summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/cbmem_console.c2
-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
-rw-r--r--payloads/libpayload/drivers/video/bitmap.h6
7 files changed, 34 insertions, 34 deletions
diff --git a/payloads/libpayload/drivers/cbmem_console.c b/payloads/libpayload/drivers/cbmem_console.c
index 76c2abb74d..9435e1ca9f 100644
--- a/payloads/libpayload/drivers/cbmem_console.c
+++ b/payloads/libpayload/drivers/cbmem_console.c
@@ -34,7 +34,7 @@ struct cbmem_console {
uint32_t size;
uint32_t cursor;
uint8_t body[0];
-} __attribute__ ((__packed__));
+} __packed;
#define CURSOR_MASK ((1 << 28) - 1)
#define OVERFLOW (1 << 31)
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;
diff --git a/payloads/libpayload/drivers/video/bitmap.h b/payloads/libpayload/drivers/video/bitmap.h
index 7670097411..a41a2c8233 100644
--- a/payloads/libpayload/drivers/video/bitmap.h
+++ b/payloads/libpayload/drivers/video/bitmap.h
@@ -37,7 +37,7 @@ struct bitmap_file_header {
uint32_t file_size;
uint16_t reserved[2];
uint32_t bitmap_offset;
-} __attribute__ ((__packed__));
+} __packed;
/* Bitmap version 3 */
@@ -53,13 +53,13 @@ struct bitmap_header_v3 {
int32_t v_res;
uint32_t colors_used;
uint32_t colors_important;
-} __attribute__ ((__packed__));
+} __packed;
struct bitmap_palette_element_v3 {
uint8_t blue;
uint8_t green;
uint8_t red;
uint8_t reserved;
-} __attribute__ ((__packed__));
+} __packed;
#endif /* __BITMAP_H__ */