Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: dwc3: dwc3-octeon: Use _ULL bitfields defines

While driver is intended to run on 64bit machines, it is compile time
tested for 32bit targets as well. Here shift count overflow is reported
for bits greater than 31, so use _ULL versions of BIT and GENMASK macros
to silence these warnings.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307260537.MROrhVNM-lkp@intel.com/
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ZMd/aa2ncz6tJGNU@lenoch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ladislav Michl and committed by
Greg Kroah-Hartman
41784066 976f82e8

+39 -39
+39 -39
drivers/usb/dwc3/dwc3-octeon.c
··· 24 24 /* BIST fast-clear mode select. A BIST run with this bit set 25 25 * clears all entries in USBH RAMs to 0x0. 26 26 */ 27 - # define USBDRD_UCTL_CTL_CLEAR_BIST BIT(63) 27 + # define USBDRD_UCTL_CTL_CLEAR_BIST BIT_ULL(63) 28 28 /* 1 = Start BIST and cleared by hardware */ 29 - # define USBDRD_UCTL_CTL_START_BIST BIT(62) 29 + # define USBDRD_UCTL_CTL_START_BIST BIT_ULL(62) 30 30 /* Reference clock select for SuperSpeed and HighSpeed PLLs: 31 31 * 0x0 = Both PLLs use DLMC_REF_CLK0 for reference clock 32 32 * 0x1 = Both PLLs use DLMC_REF_CLK1 for reference clock ··· 35 35 * 0x3 = SuperSpeed PLL uses DLMC_REF_CLK1 for reference clock & 36 36 * HighSpeed PLL uses PLL_REF_CLK for reference clck 37 37 */ 38 - # define USBDRD_UCTL_CTL_REF_CLK_SEL GENMASK(61, 60) 38 + # define USBDRD_UCTL_CTL_REF_CLK_SEL GENMASK_ULL(61, 60) 39 39 /* 1 = Spread-spectrum clock enable, 0 = SS clock disable */ 40 - # define USBDRD_UCTL_CTL_SSC_EN BIT(59) 40 + # define USBDRD_UCTL_CTL_SSC_EN BIT_ULL(59) 41 41 /* Spread-spectrum clock modulation range: 42 42 * 0x0 = -4980 ppm downspread 43 43 * 0x1 = -4492 ppm downspread 44 44 * 0x2 = -4003 ppm downspread 45 45 * 0x3 - 0x7 = Reserved 46 46 */ 47 - # define USBDRD_UCTL_CTL_SSC_RANGE GENMASK(58, 56) 47 + # define USBDRD_UCTL_CTL_SSC_RANGE GENMASK_ULL(58, 56) 48 48 /* Enable non-standard oscillator frequencies: 49 49 * [55:53] = modules -1 50 50 * [52:47] = 2's complement push amount, 0 = Feature disabled 51 51 */ 52 - # define USBDRD_UCTL_CTL_SSC_REF_CLK_SEL GENMASK(55, 47) 52 + # define USBDRD_UCTL_CTL_SSC_REF_CLK_SEL GENMASK_ULL(55, 47) 53 53 /* Reference clock multiplier for non-standard frequencies: 54 54 * 0x19 = 100MHz on DLMC_REF_CLK* if REF_CLK_SEL = 0x0 or 0x1 55 55 * 0x28 = 125MHz on DLMC_REF_CLK* if REF_CLK_SEL = 0x0 or 0x1 56 56 * 0x32 = 50MHz on DLMC_REF_CLK* if REF_CLK_SEL = 0x0 or 0x1 57 57 * Other Values = Reserved 58 58 */ 59 - # define USBDRD_UCTL_CTL_MPLL_MULTIPLIER GENMASK(46, 40) 59 + # define USBDRD_UCTL_CTL_MPLL_MULTIPLIER GENMASK_ULL(46, 40) 60 60 /* Enable reference clock to prescaler for SuperSpeed functionality. 61 61 * Should always be set to "1" 62 62 */ 63 - # define USBDRD_UCTL_CTL_REF_SSP_EN BIT(39) 63 + # define USBDRD_UCTL_CTL_REF_SSP_EN BIT_ULL(39) 64 64 /* Divide the reference clock by 2 before entering the 65 65 * REF_CLK_FSEL divider: 66 66 * If REF_CLK_SEL = 0x0 or 0x1, then only 0x0 is legal ··· 68 68 * 0x1 = DLMC_REF_CLK* is 125MHz 69 69 * 0x0 = DLMC_REF_CLK* is another supported frequency 70 70 */ 71 - # define USBDRD_UCTL_CTL_REF_CLK_DIV2 BIT(38) 71 + # define USBDRD_UCTL_CTL_REF_CLK_DIV2 BIT_ULL(38) 72 72 /* Select reference clock freqnuency for both PLL blocks: 73 73 * 0x27 = REF_CLK_SEL is 0x0 or 0x1 74 74 * 0x07 = REF_CLK_SEL is 0x2 or 0x3 75 75 */ 76 - # define USBDRD_UCTL_CTL_REF_CLK_FSEL GENMASK(37, 32) 76 + # define USBDRD_UCTL_CTL_REF_CLK_FSEL GENMASK_ULL(37, 32) 77 77 /* Controller clock enable. */ 78 - # define USBDRD_UCTL_CTL_H_CLK_EN BIT(30) 78 + # define USBDRD_UCTL_CTL_H_CLK_EN BIT_ULL(30) 79 79 /* Select bypass input to controller clock divider: 80 80 * 0x0 = Use divided coprocessor clock from H_CLKDIV 81 81 * 0x1 = Use clock from GPIO pins 82 82 */ 83 - # define USBDRD_UCTL_CTL_H_CLK_BYP_SEL BIT(29) 83 + # define USBDRD_UCTL_CTL_H_CLK_BYP_SEL BIT_ULL(29) 84 84 /* Reset controller clock divider. */ 85 - # define USBDRD_UCTL_CTL_H_CLKDIV_RST BIT(28) 85 + # define USBDRD_UCTL_CTL_H_CLKDIV_RST BIT_ULL(28) 86 86 /* Clock divider select: 87 87 * 0x0 = divide by 1 88 88 * 0x1 = divide by 2 ··· 93 93 * 0x6 = divide by 24 94 94 * 0x7 = divide by 32 95 95 */ 96 - # define USBDRD_UCTL_CTL_H_CLKDIV_SEL GENMASK(26, 24) 96 + # define USBDRD_UCTL_CTL_H_CLKDIV_SEL GENMASK_ULL(26, 24) 97 97 /* USB3 port permanently attached: 0x0 = No, 0x1 = Yes */ 98 - # define USBDRD_UCTL_CTL_USB3_PORT_PERM_ATTACH BIT(21) 98 + # define USBDRD_UCTL_CTL_USB3_PORT_PERM_ATTACH BIT_ULL(21) 99 99 /* USB2 port permanently attached: 0x0 = No, 0x1 = Yes */ 100 - # define USBDRD_UCTL_CTL_USB2_PORT_PERM_ATTACH BIT(20) 100 + # define USBDRD_UCTL_CTL_USB2_PORT_PERM_ATTACH BIT_ULL(20) 101 101 /* Disable SuperSpeed PHY: 0x0 = No, 0x1 = Yes */ 102 - # define USBDRD_UCTL_CTL_USB3_PORT_DISABLE BIT(18) 102 + # define USBDRD_UCTL_CTL_USB3_PORT_DISABLE BIT_ULL(18) 103 103 /* Disable HighSpeed PHY: 0x0 = No, 0x1 = Yes */ 104 - # define USBDRD_UCTL_CTL_USB2_PORT_DISABLE BIT(16) 104 + # define USBDRD_UCTL_CTL_USB2_PORT_DISABLE BIT_ULL(16) 105 105 /* Enable PHY SuperSpeed block power: 0x0 = No, 0x1 = Yes */ 106 - # define USBDRD_UCTL_CTL_SS_POWER_EN BIT(14) 106 + # define USBDRD_UCTL_CTL_SS_POWER_EN BIT_ULL(14) 107 107 /* Enable PHY HighSpeed block power: 0x0 = No, 0x1 = Yes */ 108 - # define USBDRD_UCTL_CTL_HS_POWER_EN BIT(12) 108 + # define USBDRD_UCTL_CTL_HS_POWER_EN BIT_ULL(12) 109 109 /* Enable USB UCTL interface clock: 0xx = No, 0x1 = Yes */ 110 - # define USBDRD_UCTL_CTL_CSCLK_EN BIT(4) 110 + # define USBDRD_UCTL_CTL_CSCLK_EN BIT_ULL(4) 111 111 /* Controller mode: 0x0 = Host, 0x1 = Device */ 112 - # define USBDRD_UCTL_CTL_DRD_MODE BIT(3) 112 + # define USBDRD_UCTL_CTL_DRD_MODE BIT_ULL(3) 113 113 /* PHY reset */ 114 - # define USBDRD_UCTL_CTL_UPHY_RST BIT(2) 114 + # define USBDRD_UCTL_CTL_UPHY_RST BIT_ULL(2) 115 115 /* Software reset UAHC */ 116 - # define USBDRD_UCTL_CTL_UAHC_RST BIT(1) 116 + # define USBDRD_UCTL_CTL_UAHC_RST BIT_ULL(1) 117 117 /* Software resets UCTL */ 118 - # define USBDRD_UCTL_CTL_UCTL_RST BIT(0) 118 + # define USBDRD_UCTL_CTL_UCTL_RST BIT_ULL(0) 119 119 120 120 #define USBDRD_UCTL_BIST_STATUS 0x08 121 121 #define USBDRD_UCTL_SPARE0 0x10 ··· 130 130 */ 131 131 #define USBDRD_UCTL_HOST_CFG 0xe0 132 132 /* Indicates minimum value of all received BELT values */ 133 - # define USBDRD_UCTL_HOST_CFG_HOST_CURRENT_BELT GENMASK(59, 48) 133 + # define USBDRD_UCTL_HOST_CFG_HOST_CURRENT_BELT GENMASK_ULL(59, 48) 134 134 /* HS jitter adjustment */ 135 - # define USBDRD_UCTL_HOST_CFG_FLA GENMASK(37, 32) 135 + # define USBDRD_UCTL_HOST_CFG_FLA GENMASK_ULL(37, 32) 136 136 /* Bus-master enable: 0x0 = Disabled (stall DMAs), 0x1 = enabled */ 137 - # define USBDRD_UCTL_HOST_CFG_BME BIT(28) 137 + # define USBDRD_UCTL_HOST_CFG_BME BIT_ULL(28) 138 138 /* Overcurrent protection enable: 0x0 = unavailable, 0x1 = available */ 139 - # define USBDRD_UCTL_HOST_OCI_EN BIT(27) 139 + # define USBDRD_UCTL_HOST_OCI_EN BIT_ULL(27) 140 140 /* Overcurrent sene selection: 141 141 * 0x0 = Overcurrent indication from off-chip is active-low 142 142 * 0x1 = Overcurrent indication from off-chip is active-high 143 143 */ 144 - # define USBDRD_UCTL_HOST_OCI_ACTIVE_HIGH_EN BIT(26) 144 + # define USBDRD_UCTL_HOST_OCI_ACTIVE_HIGH_EN BIT_ULL(26) 145 145 /* Port power control enable: 0x0 = unavailable, 0x1 = available */ 146 - # define USBDRD_UCTL_HOST_PPC_EN BIT(25) 146 + # define USBDRD_UCTL_HOST_PPC_EN BIT_ULL(25) 147 147 /* Port power control sense selection: 148 148 * 0x0 = Port power to off-chip is active-low 149 149 * 0x1 = Port power to off-chip is active-high 150 150 */ 151 - # define USBDRD_UCTL_HOST_PPC_ACTIVE_HIGH_EN BIT(24) 151 + # define USBDRD_UCTL_HOST_PPC_ACTIVE_HIGH_EN BIT_ULL(24) 152 152 153 153 /* 154 154 * UCTL Shim Features Register 155 155 */ 156 156 #define USBDRD_UCTL_SHIM_CFG 0xe8 157 157 /* Out-of-bound UAHC register access: 0 = read, 1 = write */ 158 - # define USBDRD_UCTL_SHIM_CFG_XS_NCB_OOB_WRN BIT(63) 158 + # define USBDRD_UCTL_SHIM_CFG_XS_NCB_OOB_WRN BIT_ULL(63) 159 159 /* SRCID error log for out-of-bound UAHC register access: 160 160 * [59:58] = chipID 161 161 * [57] = Request source: 0 = core, 1 = NCB-device 162 162 * [56:51] = Core/NCB-device number, [56] always 0 for NCB devices 163 163 * [50:48] = SubID 164 164 */ 165 - # define USBDRD_UCTL_SHIM_CFG_XS_NCB_OOB_OSRC GENMASK(59, 48) 165 + # define USBDRD_UCTL_SHIM_CFG_XS_NCB_OOB_OSRC GENMASK_ULL(59, 48) 166 166 /* Error log for bad UAHC DMA access: 0 = Read log, 1 = Write log */ 167 - # define USBDRD_UCTL_SHIM_CFG_XM_BAD_DMA_WRN BIT(47) 167 + # define USBDRD_UCTL_SHIM_CFG_XM_BAD_DMA_WRN BIT_ULL(47) 168 168 /* Encoded error type for bad UAHC DMA */ 169 - # define USBDRD_UCTL_SHIM_CFG_XM_BAD_DMA_TYPE GENMASK(43, 40) 169 + # define USBDRD_UCTL_SHIM_CFG_XM_BAD_DMA_TYPE GENMASK_ULL(43, 40) 170 170 /* Select the IOI read command used by DMA accesses */ 171 - # define USBDRD_UCTL_SHIM_CFG_DMA_READ_CMD BIT(12) 171 + # define USBDRD_UCTL_SHIM_CFG_DMA_READ_CMD BIT_ULL(12) 172 172 /* Select endian format for DMA accesses to the L2C: 173 173 * 0x0 = Little endian 174 174 * 0x1 = Big endian 175 175 * 0x2 = Reserved 176 176 * 0x3 = Reserved 177 177 */ 178 - # define USBDRD_UCTL_SHIM_CFG_DMA_ENDIAN_MODE GENMASK(9, 8) 178 + # define USBDRD_UCTL_SHIM_CFG_DMA_ENDIAN_MODE GENMASK_ULL(9, 8) 179 179 /* Select endian format for IOI CSR access to UAHC: 180 180 * 0x0 = Little endian 181 181 * 0x1 = Big endian 182 182 * 0x2 = Reserved 183 183 * 0x3 = Reserved 184 184 */ 185 - # define USBDRD_UCTL_SHIM_CFG_CSR_ENDIAN_MODE GENMASK(1, 0) 185 + # define USBDRD_UCTL_SHIM_CFG_CSR_ENDIAN_MODE GENMASK_ULL(1, 0) 186 186 187 187 #define USBDRD_UCTL_ECC 0xf0 188 188 #define USBDRD_UCTL_SPARE1 0xf8