diff options
author | Roman Byshko <rbyshko@gmail.com> | 2014-11-10 15:53:32 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-18 10:35:12 -0500 |
commit | c2365ce5d5a0531f24ee488bf846acda4ecbe2aa (patch) | |
tree | bddbe5ce5eb3c50794ebae1b43e6bc749121f2f2 | |
parent | a1fc1920aaaaeadc7cf9d80fc16e6b8eca722b44 (diff) |
usb: musb: replace hard coded registers with defines
musb registers can be dumped using the file regdump
which is created in debugfs. Up to now hard coded
register addresses are used for that. Different glue
layers however have different register addresses. The
patch addresses this issue by substituting bare register
addresses with defines.
Signed-off-by: Roman Byshko <rbyshko@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_debugfs.c | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c index 4c216790e86b..ad3701a97389 100644 --- a/drivers/usb/musb/musb_debugfs.c +++ b/drivers/usb/musb/musb_debugfs.c | |||
@@ -49,33 +49,36 @@ struct musb_register_map { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | static const struct musb_register_map musb_regmap[] = { | 51 | static const struct musb_register_map musb_regmap[] = { |
52 | { "FAddr", 0x00, 8 }, | 52 | { "FAddr", MUSB_FADDR, 8 }, |
53 | { "Power", 0x01, 8 }, | 53 | { "Power", MUSB_POWER, 8 }, |
54 | { "Frame", 0x0c, 16 }, | 54 | { "Frame", MUSB_FRAME, 16 }, |
55 | { "Index", 0x0e, 8 }, | 55 | { "Index", MUSB_INDEX, 8 }, |
56 | { "Testmode", 0x0f, 8 }, | 56 | { "Testmode", MUSB_TESTMODE, 8 }, |
57 | { "TxMaxPp", 0x10, 16 }, | 57 | { "TxMaxPp", MUSB_TXMAXP, 16 }, |
58 | { "TxCSRp", 0x12, 16 }, | 58 | { "TxCSRp", MUSB_TXCSR, 16 }, |
59 | { "RxMaxPp", 0x14, 16 }, | 59 | { "RxMaxPp", MUSB_RXMAXP, 16 }, |
60 | { "RxCSR", 0x16, 16 }, | 60 | { "RxCSR", MUSB_RXCSR, 16 }, |
61 | { "RxCount", 0x18, 16 }, | 61 | { "RxCount", MUSB_RXCOUNT, 16 }, |
62 | { "ConfigData", 0x1f, 8 }, | 62 | { "ConfigData", MUSB_CONFIGDATA,8 }, |
63 | { "DevCtl", 0x60, 8 }, | 63 | { "IntrRxE", MUSB_INTRRXE, 16 }, |
64 | { "MISC", 0x61, 8 }, | 64 | { "IntrTxE", MUSB_INTRTXE, 16 }, |
65 | { "TxFIFOsz", 0x62, 8 }, | 65 | { "IntrUsbE", MUSB_INTRUSBE, 8 }, |
66 | { "RxFIFOsz", 0x63, 8 }, | 66 | { "DevCtl", MUSB_DEVCTL, 8 }, |
67 | { "TxFIFOadd", 0x64, 16 }, | 67 | { "BabbleCtl", MUSB_BABBLE_CTL,8 }, |
68 | { "RxFIFOadd", 0x66, 16 }, | 68 | { "TxFIFOsz", MUSB_TXFIFOSZ, 8 }, |
69 | { "VControl", 0x68, 32 }, | 69 | { "RxFIFOsz", MUSB_RXFIFOSZ, 8 }, |
70 | { "HWVers", 0x6C, 16 }, | 70 | { "TxFIFOadd", MUSB_TXFIFOADD, 16 }, |
71 | { "EPInfo", 0x78, 8 }, | 71 | { "RxFIFOadd", MUSB_RXFIFOADD, 16 }, |
72 | { "RAMInfo", 0x79, 8 }, | 72 | { "VControl", 0x68, 32 }, |
73 | { "LinkInfo", 0x7A, 8 }, | 73 | { "HWVers", 0x69, 16 }, |
74 | { "VPLen", 0x7B, 8 }, | 74 | { "EPInfo", MUSB_EPINFO, 8 }, |
75 | { "HS_EOF1", 0x7C, 8 }, | 75 | { "RAMInfo", MUSB_RAMINFO, 8 }, |
76 | { "FS_EOF1", 0x7D, 8 }, | 76 | { "LinkInfo", MUSB_LINKINFO, 8 }, |
77 | { "LS_EOF1", 0x7E, 8 }, | 77 | { "VPLen", MUSB_VPLEN, 8 }, |
78 | { "SOFT_RST", 0x7F, 8 }, | 78 | { "HS_EOF1", MUSB_HS_EOF1, 8 }, |
79 | { "FS_EOF1", MUSB_FS_EOF1, 8 }, | ||
80 | { "LS_EOF1", MUSB_LS_EOF1, 8 }, | ||
81 | { "SOFT_RST", 0x7F, 8 }, | ||
79 | { "DMA_CNTLch0", 0x204, 16 }, | 82 | { "DMA_CNTLch0", 0x204, 16 }, |
80 | { "DMA_ADDRch0", 0x208, 32 }, | 83 | { "DMA_ADDRch0", 0x208, 32 }, |
81 | { "DMA_COUNTch0", 0x20C, 32 }, | 84 | { "DMA_COUNTch0", 0x20C, 32 }, |