usb: chipidea: move malloced regmap directly into struct hw_bank
Without this patch a seperate chunk of memory is allocated for the regmap array. As the regmap is always used it makes no sense to allocate a seperate memory block for it, this patch moves the regmap array directly into the struct hw_bank. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2627cb0812
commit
21395a1aac
@@ -25,6 +25,35 @@
|
||||
#define CI_HDRC_PAGE_SIZE 4096ul /* page size for TD's */
|
||||
#define ENDPT_MAX 32
|
||||
|
||||
/******************************************************************************
|
||||
* REGISTERS
|
||||
*****************************************************************************/
|
||||
/* register indices */
|
||||
enum ci_hw_regs {
|
||||
CAP_CAPLENGTH,
|
||||
CAP_HCCPARAMS,
|
||||
CAP_DCCPARAMS,
|
||||
CAP_TESTMODE,
|
||||
CAP_LAST = CAP_TESTMODE,
|
||||
OP_USBCMD,
|
||||
OP_USBSTS,
|
||||
OP_USBINTR,
|
||||
OP_DEVICEADDR,
|
||||
OP_ENDPTLISTADDR,
|
||||
OP_PORTSC,
|
||||
OP_DEVLC,
|
||||
OP_OTGSC,
|
||||
OP_USBMODE,
|
||||
OP_ENDPTSETUPSTAT,
|
||||
OP_ENDPTPRIME,
|
||||
OP_ENDPTFLUSH,
|
||||
OP_ENDPTSTAT,
|
||||
OP_ENDPTCOMPLETE,
|
||||
OP_ENDPTCTRL,
|
||||
/* endptctrl1..15 follow */
|
||||
OP_LAST = OP_ENDPTCTRL + ENDPT_MAX / 2,
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* STRUCTURES
|
||||
*****************************************************************************/
|
||||
@@ -98,7 +127,7 @@ struct hw_bank {
|
||||
void __iomem *cap;
|
||||
void __iomem *op;
|
||||
size_t size;
|
||||
void __iomem **regmap;
|
||||
void __iomem *regmap[OP_LAST + 1];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -209,38 +238,6 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
|
||||
ci->roles[role]->stop(ci);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* REGISTERS
|
||||
*****************************************************************************/
|
||||
/* register size */
|
||||
#define REG_BITS (32)
|
||||
|
||||
/* register indices */
|
||||
enum ci_hw_regs {
|
||||
CAP_CAPLENGTH,
|
||||
CAP_HCCPARAMS,
|
||||
CAP_DCCPARAMS,
|
||||
CAP_TESTMODE,
|
||||
CAP_LAST = CAP_TESTMODE,
|
||||
OP_USBCMD,
|
||||
OP_USBSTS,
|
||||
OP_USBINTR,
|
||||
OP_DEVICEADDR,
|
||||
OP_ENDPTLISTADDR,
|
||||
OP_PORTSC,
|
||||
OP_DEVLC,
|
||||
OP_OTGSC,
|
||||
OP_USBMODE,
|
||||
OP_ENDPTSETUPSTAT,
|
||||
OP_ENDPTPRIME,
|
||||
OP_ENDPTFLUSH,
|
||||
OP_ENDPTSTAT,
|
||||
OP_ENDPTCOMPLETE,
|
||||
OP_ENDPTCTRL,
|
||||
/* endptctrl1..15 follow */
|
||||
OP_LAST = OP_ENDPTCTRL + ENDPT_MAX / 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* hw_read: reads from a hw register
|
||||
* @reg: register index
|
||||
|
Reference in New Issue
Block a user