mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
usb: chipidea: mark register map as "const" and convert to u8
This patch makes the controller register map ci_regs_nolpm and ci_regs_lpm as "const". Further, as all offset fit into a single byte, the type is changed from uintptr_t to u8. 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:
parent
21395a1aac
commit
987e7bc348
@ -75,48 +75,48 @@
|
||||
#include "otg.h"
|
||||
|
||||
/* Controller register map */
|
||||
static uintptr_t ci_regs_nolpm[] = {
|
||||
[CAP_CAPLENGTH] = 0x000UL,
|
||||
[CAP_HCCPARAMS] = 0x008UL,
|
||||
[CAP_DCCPARAMS] = 0x024UL,
|
||||
[CAP_TESTMODE] = 0x038UL,
|
||||
[OP_USBCMD] = 0x000UL,
|
||||
[OP_USBSTS] = 0x004UL,
|
||||
[OP_USBINTR] = 0x008UL,
|
||||
[OP_DEVICEADDR] = 0x014UL,
|
||||
[OP_ENDPTLISTADDR] = 0x018UL,
|
||||
[OP_PORTSC] = 0x044UL,
|
||||
[OP_DEVLC] = 0x084UL,
|
||||
[OP_OTGSC] = 0x064UL,
|
||||
[OP_USBMODE] = 0x068UL,
|
||||
[OP_ENDPTSETUPSTAT] = 0x06CUL,
|
||||
[OP_ENDPTPRIME] = 0x070UL,
|
||||
[OP_ENDPTFLUSH] = 0x074UL,
|
||||
[OP_ENDPTSTAT] = 0x078UL,
|
||||
[OP_ENDPTCOMPLETE] = 0x07CUL,
|
||||
[OP_ENDPTCTRL] = 0x080UL,
|
||||
static const u8 ci_regs_nolpm[] = {
|
||||
[CAP_CAPLENGTH] = 0x00U,
|
||||
[CAP_HCCPARAMS] = 0x08U,
|
||||
[CAP_DCCPARAMS] = 0x24U,
|
||||
[CAP_TESTMODE] = 0x38U,
|
||||
[OP_USBCMD] = 0x00U,
|
||||
[OP_USBSTS] = 0x04U,
|
||||
[OP_USBINTR] = 0x08U,
|
||||
[OP_DEVICEADDR] = 0x14U,
|
||||
[OP_ENDPTLISTADDR] = 0x18U,
|
||||
[OP_PORTSC] = 0x44U,
|
||||
[OP_DEVLC] = 0x84U,
|
||||
[OP_OTGSC] = 0x64U,
|
||||
[OP_USBMODE] = 0x68U,
|
||||
[OP_ENDPTSETUPSTAT] = 0x6CU,
|
||||
[OP_ENDPTPRIME] = 0x70U,
|
||||
[OP_ENDPTFLUSH] = 0x74U,
|
||||
[OP_ENDPTSTAT] = 0x78U,
|
||||
[OP_ENDPTCOMPLETE] = 0x7CU,
|
||||
[OP_ENDPTCTRL] = 0x80U,
|
||||
};
|
||||
|
||||
static uintptr_t ci_regs_lpm[] = {
|
||||
[CAP_CAPLENGTH] = 0x000UL,
|
||||
[CAP_HCCPARAMS] = 0x008UL,
|
||||
[CAP_DCCPARAMS] = 0x024UL,
|
||||
[CAP_TESTMODE] = 0x0FCUL,
|
||||
[OP_USBCMD] = 0x000UL,
|
||||
[OP_USBSTS] = 0x004UL,
|
||||
[OP_USBINTR] = 0x008UL,
|
||||
[OP_DEVICEADDR] = 0x014UL,
|
||||
[OP_ENDPTLISTADDR] = 0x018UL,
|
||||
[OP_PORTSC] = 0x044UL,
|
||||
[OP_DEVLC] = 0x084UL,
|
||||
[OP_OTGSC] = 0x0C4UL,
|
||||
[OP_USBMODE] = 0x0C8UL,
|
||||
[OP_ENDPTSETUPSTAT] = 0x0D8UL,
|
||||
[OP_ENDPTPRIME] = 0x0DCUL,
|
||||
[OP_ENDPTFLUSH] = 0x0E0UL,
|
||||
[OP_ENDPTSTAT] = 0x0E4UL,
|
||||
[OP_ENDPTCOMPLETE] = 0x0E8UL,
|
||||
[OP_ENDPTCTRL] = 0x0ECUL,
|
||||
static const u8 ci_regs_lpm[] = {
|
||||
[CAP_CAPLENGTH] = 0x00U,
|
||||
[CAP_HCCPARAMS] = 0x08U,
|
||||
[CAP_DCCPARAMS] = 0x24U,
|
||||
[CAP_TESTMODE] = 0xFCU,
|
||||
[OP_USBCMD] = 0x00U,
|
||||
[OP_USBSTS] = 0x04U,
|
||||
[OP_USBINTR] = 0x08U,
|
||||
[OP_DEVICEADDR] = 0x14U,
|
||||
[OP_ENDPTLISTADDR] = 0x18U,
|
||||
[OP_PORTSC] = 0x44U,
|
||||
[OP_DEVLC] = 0x84U,
|
||||
[OP_OTGSC] = 0xC4U,
|
||||
[OP_USBMODE] = 0xC8U,
|
||||
[OP_ENDPTSETUPSTAT] = 0xD8U,
|
||||
[OP_ENDPTPRIME] = 0xDCU,
|
||||
[OP_ENDPTFLUSH] = 0xE0U,
|
||||
[OP_ENDPTSTAT] = 0xE4U,
|
||||
[OP_ENDPTCOMPLETE] = 0xE8U,
|
||||
[OP_ENDPTCTRL] = 0xECU,
|
||||
};
|
||||
|
||||
static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm)
|
||||
|
Loading…
Reference in New Issue
Block a user