Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 1 | /* |
Mike Frysinger | 1a5c226 | 2010-10-26 23:46:22 -0400 | [diff] [blame] | 2 | * Copyright 2007-2010 Analog Devices Inc. |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 3 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 4 | * Licensed under the GPL-2 or later. |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _CDEF_BF542_H |
| 8 | #define _CDEF_BF542_H |
| 9 | |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 10 | /* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */ |
| 11 | #include "cdefBF54x_base.h" |
| 12 | |
| 13 | /* The following are the #defines needed by ADSP-BF542 that are not in the common header */ |
| 14 | |
| 15 | /* ATAPI Registers */ |
| 16 | |
| 17 | #define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL) |
| 18 | #define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val) |
| 19 | #define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS) |
| 20 | #define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val) |
| 21 | #define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR) |
| 22 | #define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val) |
| 23 | #define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF) |
| 24 | #define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val) |
| 25 | #define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF) |
| 26 | #define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val) |
| 27 | #define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK) |
| 28 | #define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val) |
| 29 | #define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS) |
| 30 | #define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val) |
| 31 | #define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN) |
| 32 | #define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val) |
| 33 | #define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS) |
| 34 | #define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val) |
| 35 | #define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE) |
| 36 | #define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val) |
| 37 | #define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE) |
| 38 | #define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val) |
| 39 | #define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT) |
| 40 | #define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val) |
| 41 | #define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT) |
| 42 | #define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val) |
| 43 | #define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT) |
| 44 | #define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val) |
| 45 | #define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT) |
| 46 | #define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val) |
| 47 | #define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0) |
| 48 | #define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val) |
| 49 | #define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0) |
| 50 | #define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val) |
| 51 | #define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1) |
| 52 | #define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val) |
| 53 | #define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0) |
| 54 | #define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val) |
| 55 | #define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1) |
| 56 | #define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val) |
| 57 | #define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2) |
| 58 | #define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val) |
| 59 | #define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0) |
| 60 | #define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val) |
| 61 | #define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1) |
| 62 | #define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val) |
| 63 | #define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2) |
| 64 | #define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val) |
| 65 | #define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3) |
| 66 | #define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val) |
| 67 | |
| 68 | /* SDH Registers */ |
| 69 | |
| 70 | #define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL) |
| 71 | #define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val) |
| 72 | #define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL) |
| 73 | #define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val) |
| 74 | #define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT) |
| 75 | #define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val) |
| 76 | #define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND) |
| 77 | #define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val) |
| 78 | #define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD) |
| 79 | #define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val) |
| 80 | #define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0) |
| 81 | #define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val) |
| 82 | #define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1) |
| 83 | #define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val) |
| 84 | #define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2) |
| 85 | #define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val) |
| 86 | #define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3) |
| 87 | #define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val) |
| 88 | #define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER) |
| 89 | #define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val) |
| 90 | #define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH) |
| 91 | #define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val) |
| 92 | #define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL) |
| 93 | #define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val) |
Mike Frysinger | 25bb23b | 2008-04-23 08:27:06 +0800 | [diff] [blame] | 94 | #define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT) |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 95 | #define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val) |
| 96 | #define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS) |
| 97 | #define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val) |
Mike Frysinger | 25bb23b | 2008-04-23 08:27:06 +0800 | [diff] [blame] | 98 | #define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR) |
| 99 | #define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val) |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 100 | #define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0) |
| 101 | #define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val) |
| 102 | #define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1) |
| 103 | #define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val) |
| 104 | #define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT) |
| 105 | #define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val) |
| 106 | #define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO) |
| 107 | #define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val) |
| 108 | #define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS) |
| 109 | #define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val) |
| 110 | #define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK) |
| 111 | #define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val) |
| 112 | #define bfin_read_SDH_CFG() bfin_read16(SDH_CFG) |
| 113 | #define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val) |
| 114 | #define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN) |
| 115 | #define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val) |
| 116 | #define bfin_read_SDH_PID0() bfin_read16(SDH_PID0) |
| 117 | #define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val) |
| 118 | #define bfin_read_SDH_PID1() bfin_read16(SDH_PID1) |
| 119 | #define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val) |
| 120 | #define bfin_read_SDH_PID2() bfin_read16(SDH_PID2) |
| 121 | #define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val) |
| 122 | #define bfin_read_SDH_PID3() bfin_read16(SDH_PID3) |
| 123 | #define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val) |
| 124 | #define bfin_read_SDH_PID4() bfin_read16(SDH_PID4) |
| 125 | #define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val) |
| 126 | #define bfin_read_SDH_PID5() bfin_read16(SDH_PID5) |
| 127 | #define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val) |
| 128 | #define bfin_read_SDH_PID6() bfin_read16(SDH_PID6) |
| 129 | #define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val) |
| 130 | #define bfin_read_SDH_PID7() bfin_read16(SDH_PID7) |
| 131 | #define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val) |
| 132 | |
| 133 | /* USB Control Registers */ |
| 134 | |
| 135 | #define bfin_read_USB_FADDR() bfin_read16(USB_FADDR) |
| 136 | #define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val) |
| 137 | #define bfin_read_USB_POWER() bfin_read16(USB_POWER) |
| 138 | #define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val) |
| 139 | #define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX) |
| 140 | #define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val) |
| 141 | #define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX) |
| 142 | #define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val) |
| 143 | #define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE) |
| 144 | #define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val) |
| 145 | #define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE) |
| 146 | #define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val) |
| 147 | #define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB) |
| 148 | #define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val) |
| 149 | #define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE) |
| 150 | #define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val) |
| 151 | #define bfin_read_USB_FRAME() bfin_read16(USB_FRAME) |
| 152 | #define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val) |
| 153 | #define bfin_read_USB_INDEX() bfin_read16(USB_INDEX) |
| 154 | #define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val) |
Mike Frysinger | 25bb23b | 2008-04-23 08:27:06 +0800 | [diff] [blame] | 155 | #define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE) |
| 156 | #define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val) |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 157 | #define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR) |
| 158 | #define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val) |
| 159 | #define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL) |
| 160 | #define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val) |
| 161 | |
| 162 | /* USB Packet Control Registers */ |
| 163 | |
| 164 | #define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET) |
| 165 | #define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val) |
| 166 | #define bfin_read_USB_CSR0() bfin_read16(USB_CSR0) |
| 167 | #define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val) |
| 168 | #define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR) |
| 169 | #define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val) |
| 170 | #define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET) |
| 171 | #define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val) |
| 172 | #define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR) |
| 173 | #define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val) |
| 174 | #define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0) |
| 175 | #define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val) |
| 176 | #define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT) |
| 177 | #define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val) |
| 178 | #define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE) |
| 179 | #define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val) |
| 180 | #define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0) |
| 181 | #define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val) |
| 182 | #define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL) |
| 183 | #define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val) |
| 184 | #define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE) |
| 185 | #define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val) |
| 186 | #define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL) |
| 187 | #define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val) |
| 188 | #define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT) |
| 189 | #define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val) |
| 190 | |
| 191 | /* USB Endbfin_read_()oint FIFO Registers */ |
| 192 | |
| 193 | #define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO) |
| 194 | #define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val) |
| 195 | #define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO) |
| 196 | #define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val) |
| 197 | #define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO) |
| 198 | #define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val) |
| 199 | #define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO) |
| 200 | #define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val) |
| 201 | #define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO) |
| 202 | #define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val) |
| 203 | #define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO) |
| 204 | #define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val) |
| 205 | #define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO) |
| 206 | #define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val) |
| 207 | #define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO) |
| 208 | #define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val) |
| 209 | |
| 210 | /* USB OTG Control Registers */ |
| 211 | |
| 212 | #define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL) |
| 213 | #define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val) |
| 214 | #define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ) |
Mike Frysinger | 25bb23b | 2008-04-23 08:27:06 +0800 | [diff] [blame] | 215 | #define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val) |
Bryan Wu | 19381f0 | 2007-05-21 18:09:31 +0800 | [diff] [blame] | 216 | #define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK) |
| 217 | #define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val) |
| 218 | |
| 219 | /* USB Phy Control Registers */ |
| 220 | |
| 221 | #define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO) |
| 222 | #define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val) |
| 223 | #define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN) |
| 224 | #define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val) |
| 225 | #define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1) |
| 226 | #define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val) |
| 227 | #define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1) |
| 228 | #define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val) |
| 229 | #define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1) |
| 230 | #define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val) |
| 231 | |
| 232 | /* (APHY_CNTRL is for ADI usage only) */ |
| 233 | |
| 234 | #define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL) |
| 235 | #define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val) |
| 236 | |
| 237 | /* (APHY_CALIB is for ADI usage only) */ |
| 238 | |
| 239 | #define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB) |
| 240 | #define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val) |
| 241 | #define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2) |
| 242 | #define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val) |
| 243 | |
| 244 | /* (PHY_TEST is for ADI usage only) */ |
| 245 | |
| 246 | #define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST) |
| 247 | #define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val) |
| 248 | #define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL) |
| 249 | #define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val) |
| 250 | #define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV) |
| 251 | #define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val) |
| 252 | |
| 253 | /* USB Endbfin_read_()oint 0 Control Registers */ |
| 254 | |
| 255 | #define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP) |
| 256 | #define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val) |
| 257 | #define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR) |
| 258 | #define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val) |
| 259 | #define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP) |
| 260 | #define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val) |
| 261 | #define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR) |
| 262 | #define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val) |
| 263 | #define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT) |
| 264 | #define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val) |
| 265 | #define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE) |
| 266 | #define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val) |
| 267 | #define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL) |
| 268 | #define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val) |
| 269 | #define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE) |
| 270 | #define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val) |
| 271 | #define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL) |
| 272 | #define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val) |
| 273 | |
| 274 | /* USB Endbfin_read_()oint 1 Control Registers */ |
| 275 | |
| 276 | #define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT) |
| 277 | #define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val) |
| 278 | #define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP) |
| 279 | #define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val) |
| 280 | #define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR) |
| 281 | #define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val) |
| 282 | #define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP) |
| 283 | #define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val) |
| 284 | #define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR) |
| 285 | #define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val) |
| 286 | #define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT) |
| 287 | #define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val) |
| 288 | #define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE) |
| 289 | #define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val) |
| 290 | #define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL) |
| 291 | #define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val) |
| 292 | #define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE) |
| 293 | #define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val) |
| 294 | #define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL) |
| 295 | #define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val) |
| 296 | |
| 297 | /* USB Endbfin_read_()oint 2 Control Registers */ |
| 298 | |
| 299 | #define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT) |
| 300 | #define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val) |
| 301 | #define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP) |
| 302 | #define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val) |
| 303 | #define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR) |
| 304 | #define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val) |
| 305 | #define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP) |
| 306 | #define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val) |
| 307 | #define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR) |
| 308 | #define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val) |
| 309 | #define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT) |
| 310 | #define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val) |
| 311 | #define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE) |
| 312 | #define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val) |
| 313 | #define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL) |
| 314 | #define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val) |
| 315 | #define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE) |
| 316 | #define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val) |
| 317 | #define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL) |
| 318 | #define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val) |
| 319 | |
| 320 | /* USB Endbfin_read_()oint 3 Control Registers */ |
| 321 | |
| 322 | #define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT) |
| 323 | #define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val) |
| 324 | #define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP) |
| 325 | #define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val) |
| 326 | #define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR) |
| 327 | #define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val) |
| 328 | #define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP) |
| 329 | #define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val) |
| 330 | #define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR) |
| 331 | #define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val) |
| 332 | #define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT) |
| 333 | #define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val) |
| 334 | #define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE) |
| 335 | #define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val) |
| 336 | #define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL) |
| 337 | #define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val) |
| 338 | #define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE) |
| 339 | #define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val) |
| 340 | #define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL) |
| 341 | #define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val) |
| 342 | |
| 343 | /* USB Endbfin_read_()oint 4 Control Registers */ |
| 344 | |
| 345 | #define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT) |
| 346 | #define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val) |
| 347 | #define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP) |
| 348 | #define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val) |
| 349 | #define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR) |
| 350 | #define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val) |
| 351 | #define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP) |
| 352 | #define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val) |
| 353 | #define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR) |
| 354 | #define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val) |
| 355 | #define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT) |
| 356 | #define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val) |
| 357 | #define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE) |
| 358 | #define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val) |
| 359 | #define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL) |
| 360 | #define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val) |
| 361 | #define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE) |
| 362 | #define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val) |
| 363 | #define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL) |
| 364 | #define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val) |
| 365 | |
| 366 | /* USB Endbfin_read_()oint 5 Control Registers */ |
| 367 | |
| 368 | #define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT) |
| 369 | #define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val) |
| 370 | #define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP) |
| 371 | #define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val) |
| 372 | #define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR) |
| 373 | #define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val) |
| 374 | #define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP) |
| 375 | #define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val) |
| 376 | #define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR) |
| 377 | #define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val) |
| 378 | #define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT) |
| 379 | #define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val) |
| 380 | #define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE) |
| 381 | #define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val) |
| 382 | #define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL) |
| 383 | #define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val) |
| 384 | #define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE) |
| 385 | #define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val) |
| 386 | #define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL) |
| 387 | #define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val) |
| 388 | |
| 389 | /* USB Endbfin_read_()oint 6 Control Registers */ |
| 390 | |
| 391 | #define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT) |
| 392 | #define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val) |
| 393 | #define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP) |
| 394 | #define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val) |
| 395 | #define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR) |
| 396 | #define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val) |
| 397 | #define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP) |
| 398 | #define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val) |
| 399 | #define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR) |
| 400 | #define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val) |
| 401 | #define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT) |
| 402 | #define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val) |
| 403 | #define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE) |
| 404 | #define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val) |
| 405 | #define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL) |
| 406 | #define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val) |
| 407 | #define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE) |
| 408 | #define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val) |
| 409 | #define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL) |
| 410 | #define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val) |
| 411 | |
| 412 | /* USB Endbfin_read_()oint 7 Control Registers */ |
| 413 | |
| 414 | #define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT) |
| 415 | #define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val) |
| 416 | #define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP) |
| 417 | #define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val) |
| 418 | #define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR) |
| 419 | #define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val) |
| 420 | #define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP) |
| 421 | #define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val) |
| 422 | #define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR) |
| 423 | #define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val) |
| 424 | #define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT) |
| 425 | #define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val) |
| 426 | #define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE) |
| 427 | #define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val) |
| 428 | #define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL) |
| 429 | #define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val) |
| 430 | #define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE) |
| 431 | #define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val) |
| 432 | #define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL) |
| 433 | #define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val) |
| 434 | #define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT) |
| 435 | #define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val) |
| 436 | #define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT) |
| 437 | #define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val) |
| 438 | |
| 439 | /* USB Channel 0 Config Registers */ |
| 440 | |
| 441 | #define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL) |
| 442 | #define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val) |
| 443 | #define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW) |
| 444 | #define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val) |
| 445 | #define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH) |
| 446 | #define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val) |
| 447 | #define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW) |
| 448 | #define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val) |
| 449 | #define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH) |
| 450 | #define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val) |
| 451 | |
| 452 | /* USB Channel 1 Config Registers */ |
| 453 | |
| 454 | #define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL) |
| 455 | #define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val) |
| 456 | #define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW) |
| 457 | #define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val) |
| 458 | #define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH) |
| 459 | #define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val) |
| 460 | #define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW) |
| 461 | #define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val) |
| 462 | #define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH) |
| 463 | #define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val) |
| 464 | |
| 465 | /* USB Channel 2 Config Registers */ |
| 466 | |
| 467 | #define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL) |
| 468 | #define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val) |
| 469 | #define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW) |
| 470 | #define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val) |
| 471 | #define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH) |
| 472 | #define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val) |
| 473 | #define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW) |
| 474 | #define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val) |
| 475 | #define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH) |
| 476 | #define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val) |
| 477 | |
| 478 | /* USB Channel 3 Config Registers */ |
| 479 | |
| 480 | #define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL) |
| 481 | #define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val) |
| 482 | #define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW) |
| 483 | #define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val) |
| 484 | #define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH) |
| 485 | #define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val) |
| 486 | #define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW) |
| 487 | #define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val) |
| 488 | #define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH) |
| 489 | #define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val) |
| 490 | |
| 491 | /* USB Channel 4 Config Registers */ |
| 492 | |
| 493 | #define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL) |
| 494 | #define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val) |
| 495 | #define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW) |
| 496 | #define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val) |
| 497 | #define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH) |
| 498 | #define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val) |
| 499 | #define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW) |
| 500 | #define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val) |
| 501 | #define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH) |
| 502 | #define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val) |
| 503 | |
| 504 | /* USB Channel 5 Config Registers */ |
| 505 | |
| 506 | #define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL) |
| 507 | #define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val) |
| 508 | #define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW) |
| 509 | #define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val) |
| 510 | #define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH) |
| 511 | #define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val) |
| 512 | #define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW) |
| 513 | #define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val) |
| 514 | #define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH) |
| 515 | #define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val) |
| 516 | |
| 517 | /* USB Channel 6 Config Registers */ |
| 518 | |
| 519 | #define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL) |
| 520 | #define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val) |
| 521 | #define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW) |
| 522 | #define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val) |
| 523 | #define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH) |
| 524 | #define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val) |
| 525 | #define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW) |
| 526 | #define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val) |
| 527 | #define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH) |
| 528 | #define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val) |
| 529 | |
| 530 | /* USB Channel 7 Config Registers */ |
| 531 | |
| 532 | #define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL) |
| 533 | #define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val) |
| 534 | #define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW) |
| 535 | #define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val) |
| 536 | #define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH) |
| 537 | #define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val) |
| 538 | #define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW) |
| 539 | #define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val) |
| 540 | #define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH) |
| 541 | #define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val) |
| 542 | |
| 543 | /* Keybfin_read_()ad Registers */ |
| 544 | |
| 545 | #define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL) |
| 546 | #define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val) |
| 547 | #define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE) |
| 548 | #define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val) |
| 549 | #define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL) |
| 550 | #define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val) |
| 551 | #define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL) |
| 552 | #define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val) |
| 553 | #define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT) |
| 554 | #define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val) |
| 555 | #define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL) |
| 556 | #define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val) |
| 557 | |
| 558 | #endif /* _CDEF_BF542_H */ |