Staging: emxx_udc: Fix do not add new typedefs and remove volatile
[firefly-linux-kernel-4.4.55.git] / drivers / staging / emxx_udc / emxx_udc.h
index ee1b80d705faa8d9c3178d8c672b8aa6a37bfb3d..57727c6ed39dea7b69afadc2e32b100d9d047aaa 100644 (file)
 
 /*===========================================================================*/
 /* Struct */
-/*------- T_EP_REGS */
-typedef struct _T_EP_REGS {
+/*------- ep_regs */
+struct ep_regs {
        u32 EP_CONTROL;                 /* EP Control */
        u32 EP_STATUS;                  /* EP Status */
        u32 EP_INT_ENA;                 /* EP Interrupt Enable */
@@ -484,18 +484,18 @@ typedef struct _T_EP_REGS {
        u32 EP_LEN_DCNT;                /* EP Length & DMA count */
        u32 EP_READ;                    /* EP Read */
        u32 EP_WRITE;                   /* EP Write */
-} T_EP_REGS, *PT_EP_REGS;
+};
 
-/*------- T_EP_DCR */
-typedef struct _T_EP_DCR {
+/*------- ep_dcr */
+struct ep_dcr {
        u32 EP_DCR1;                    /* EP_DCR1 */
        u32 EP_DCR2;                    /* EP_DCR2 */
        u32 EP_TADR;                    /* EP_TADR */
        u32 Reserved;                   /* Reserved */
-} T_EP_DCR, *PT_EP_DCR;
+};
 
 /*------- Function Registers */
-typedef struct _T_FC_REGS {
+struct fc_regs {
        u32 USB_CONTROL;                /* (0x0000) USB Control */
        u32 USB_STATUS;                 /* (0x0004) USB Status */
        u32 USB_ADDRESS;                /* (0x0008) USB Address */
@@ -513,7 +513,7 @@ typedef struct _T_FC_REGS {
        u32 EP0_READ;                   /* (0x0038) EP0 Read */
        u32 EP0_WRITE;                  /* (0x003C) EP0 Write */
 
-       T_EP_REGS EP_REGS[REG_EP_NUM];  /* Endpoint Register */
+       struct ep_regs EP_REGS[REG_EP_NUM];     /* Endpoint Register */
 
        u8 Reserved220[0x1000-0x220];   /* (0x0220:0x0FFF) Reserved */
 
@@ -531,11 +531,10 @@ typedef struct _T_FC_REGS {
 
        u8 Reserved1028[0x110-0x28];    /* (0x1028:0x110F) Reserved */
 
-       T_EP_DCR EP_DCR[REG_EP_NUM];    /* */
+       struct ep_dcr EP_DCR[REG_EP_NUM];       /* */
 
        u8 Reserved1200[0x1000-0x200];  /* Reserved */
-
-} __attribute__ ((aligned(32))) T_FC_REGS, *PT_FC_REGS;
+} __aligned(32);
 
 
 
@@ -624,7 +623,6 @@ struct nbu2ss_udc {
        unsigned                linux_suspended:1;
        unsigned                linux_resume:1;
        unsigned                usb_suspended:1;
-       unsigned                self_powered:1;
        unsigned                remote_wakeup:1;
        unsigned                udc_enabled:1;
 
@@ -632,16 +630,16 @@ struct nbu2ss_udc {
 
        u32             curr_config;    /* Current Configuration Number */
 
-       PT_FC_REGS              p_regs;
+       struct fc_regs          *p_regs;
 };
 
 /* USB register access structure */
-typedef volatile union {
+union usb_reg_access {
        struct {
                unsigned char   DATA[4];
        } byte;
        unsigned int            dw;
-} USB_REG_ACCESS;
+};
 
 /*-------------------------------------------------------------------------*/
 #define ERR(stuff...)          printk(KERN_ERR "udc: " stuff)