| /rk3399_rockchip-uboot/drivers/phy/marvell/ |
| H A D | comphy_cp110.c | 72 u32 mask, unsigned long usec_timout) in polling_with_timeout() argument 78 data = readl(addr) & mask; in polling_with_timeout() 91 u32 mask, data, ret = 1; in comphy_pcie_power_up() local 138 mask = COMMON_PHY_CFG1_PWR_UP_MASK; in comphy_pcie_power_up() 140 mask |= COMMON_PHY_CFG1_PIPE_SELECT_MASK; in comphy_pcie_power_up() 142 mask |= COMMON_PHY_CFG1_PWR_ON_RESET_MASK; in comphy_pcie_power_up() 144 mask |= COMMON_PHY_CFG1_CORE_RSTN_MASK; in comphy_pcie_power_up() 146 mask |= COMMON_PHY_PHY_MODE_MASK; in comphy_pcie_power_up() 148 reg_set(comphy_addr + COMMON_PHY_CFG1_REG, data, mask); in comphy_pcie_power_up() 151 mask = COMMON_PHY_CFG1_PWR_ON_RESET_MASK; in comphy_pcie_power_up() [all …]
|
| /rk3399_rockchip-uboot/arch/microblaze/include/asm/ |
| H A D | bitops.h | 39 int mask; in set_bit() local 43 mask = 1 << (nr & 0x1f); in set_bit() 45 *a |= mask; in set_bit() 52 int mask; in __set_bit() local 55 mask = 1 << (nr & 0x1f); in __set_bit() 56 *a |= mask; in __set_bit() 69 int mask; in clear_bit() local 73 mask = 1 << (nr & 0x1f); in clear_bit() 75 *a &= ~mask; in clear_bit() 84 int mask; in change_bit() local [all …]
|
| /rk3399_rockchip-uboot/drivers/gpio/ |
| H A D | at91_gpio.c | 49 u32 mask; in at91_set_port_pullup() local 51 mask = 1 << offset; in at91_set_port_pullup() 53 writel(mask, &at91_port->puer); in at91_set_port_pullup() 55 writel(mask, &at91_port->pudr); in at91_set_port_pullup() 56 writel(mask, &at91_port->per); in at91_set_port_pullup() 75 u32 mask; in at91_set_pio_periph() local 78 mask = 1 << pin; in at91_set_pio_periph() 79 writel(mask, &at91_port->idr); in at91_set_pio_periph() 81 writel(mask, &at91_port->per); in at91_set_pio_periph() 93 u32 mask; in at91_set_a_periph() local [all …]
|
| H A D | lpc32xx_gpio.c | 70 int port, mask; in lpc32xx_gpio_direction_input() local 75 mask = GPIO_TO_MASK(offset); in lpc32xx_gpio_direction_input() 79 writel(mask, ®s->p0_dir_clr); in lpc32xx_gpio_direction_input() 82 writel(mask, ®s->p1_dir_clr); in lpc32xx_gpio_direction_input() 86 writel(mask, ®s->p2_p3_dir_clr); in lpc32xx_gpio_direction_input() 90 if ((mask >= 25) && (mask <= 30)) in lpc32xx_gpio_direction_input() 91 writel(mask, ®s->p2_p3_dir_clr); in lpc32xx_gpio_direction_input() 112 int port, rank, mask, value; in lpc32xx_gpio_get_value() local 141 mask = GPIO_TO_MASK(offset); in lpc32xx_gpio_get_value() 143 return (value & mask) >> rank; in lpc32xx_gpio_get_value() [all …]
|
| H A D | atmel_pio4.c | 50 u32 reg, mask; in atmel_pio4_config_io_func() local 59 mask = 1 << pin; in atmel_pio4_config_io_func() 63 writel(mask, &port_base->mskr); in atmel_pio4_config_io_func() 128 u32 reg, mask; in atmel_pio4_set_pio_output() local 137 mask = 0x01 << pin; in atmel_pio4_set_pio_output() 140 writel(mask, &port_base->mskr); in atmel_pio4_set_pio_output() 144 writel(mask, &port_base->sodr); in atmel_pio4_set_pio_output() 146 writel(mask, &port_base->codr); in atmel_pio4_set_pio_output() 154 u32 reg, mask; in atmel_pio4_get_pio_input() local 163 mask = 0x01 << pin; in atmel_pio4_get_pio_input() [all …]
|
| /rk3399_rockchip-uboot/drivers/pinctrl/ |
| H A D | pinctrl-at91.c | 82 void (*mux_A_periph)(struct at91_port *pio, u32 mask); 83 void (*mux_B_periph)(struct at91_port *pio, u32 mask); 84 void (*mux_C_periph)(struct at91_port *pio, u32 mask); 85 void (*mux_D_periph)(struct at91_port *pio, u32 mask); 86 void (*set_deglitch)(struct at91_port *pio, u32 mask, bool is_on); 87 void (*set_debounce)(struct at91_port *pio, u32 mask, bool is_on, 89 void (*set_pulldown)(struct at91_port *pio, u32 mask, bool is_on); 90 void (*disable_schmitt_trig)(struct at91_port *pio, u32 mask); 103 static void at91_mux_disable_interrupt(struct at91_port *pio, u32 mask) in at91_mux_disable_interrupt() argument 105 writel(mask, &pio->idr); in at91_mux_disable_interrupt() [all …]
|
| /rk3399_rockchip-uboot/arch/sh/include/asm/ |
| H A D | bitops.h | 16 int mask; in set_bit() local 21 mask = 1 << (nr & 0x1f); in set_bit() 23 *a |= mask; in set_bit() 34 int mask; in clear_bit() local 39 mask = 1 << (nr & 0x1f); in clear_bit() 41 *a &= ~mask; in clear_bit() 47 int mask; in change_bit() local 52 mask = 1 << (nr & 0x1f); in change_bit() 54 *a ^= mask; in change_bit() 60 int mask, retval; in test_and_set_bit() local [all …]
|
| /rk3399_rockchip-uboot/arch/mips/include/asm/ |
| H A D | bitops.h | 202 int mask, retval; in __test_and_set_bit() local 206 mask = 1 << (nr & 0x1f); in __test_and_set_bit() 207 retval = (mask & *a) != 0; in __test_and_set_bit() 208 *a |= mask; in __test_and_set_bit() 254 int mask, retval; in __test_and_clear_bit() local 258 mask = 1 << (nr & 0x1f); in __test_and_clear_bit() 259 retval = (mask & *a) != 0; in __test_and_clear_bit() 260 *a &= ~mask; in __test_and_clear_bit() 305 int mask, retval; in __test_and_change_bit() local 309 mask = 1 << (nr & 0x1f); in __test_and_change_bit() [all …]
|
| /rk3399_rockchip-uboot/arch/nios2/include/asm/bitops/ |
| H A D | non-atomic.h | 17 unsigned long mask = BIT_MASK(nr); in __set_bit() local 20 *p |= mask; in __set_bit() 25 unsigned long mask = BIT_MASK(nr); in __clear_bit() local 28 *p &= ~mask; in __clear_bit() 42 unsigned long mask = BIT_MASK(nr); in __change_bit() local 45 *p ^= mask; in __change_bit() 59 unsigned long mask = BIT_MASK(nr); in __test_and_set_bit() local 63 *p = old | mask; in __test_and_set_bit() 64 return (old & mask) != 0; in __test_and_set_bit() 78 unsigned long mask = BIT_MASK(nr); in __test_and_clear_bit() local [all …]
|
| H A D | atomic.h | 67 unsigned long mask = BIT_MASK(nr); in set_bit() local 72 *p |= mask; in set_bit() 88 unsigned long mask = BIT_MASK(nr); in clear_bit() local 93 *p &= ~mask; in clear_bit() 109 unsigned long mask = BIT_MASK(nr); in change_bit() local 114 *p ^= mask; in change_bit() 129 unsigned long mask = BIT_MASK(nr); in test_and_set_bit() local 136 *p = old | mask; in test_and_set_bit() 139 return (old & mask) != 0; in test_and_set_bit() 153 unsigned long mask = BIT_MASK(nr); in test_and_clear_bit() local [all …]
|
| /rk3399_rockchip-uboot/arch/nds32/include/asm/ |
| H A D | bitops.h | 40 int mask; in __set_bit() local 43 mask = 1 << (nr & 0x1f); in __set_bit() 44 *a |= mask; in __set_bit() 52 int mask; in __clear_bit() local 56 mask = 1 << (nr & 0x1f); in __clear_bit() 58 *a &= ~mask; in __clear_bit() 66 int mask; in __change_bit() local 70 mask = 1 << (nr & 31); in __change_bit() 71 *ADDR ^= mask; in __change_bit() 78 int mask, retval; in __test_and_set_bit() local [all …]
|
| /rk3399_rockchip-uboot/include/ |
| H A D | bitfield.h | 61 uint mask = bitfield_mask(shift, width); in bitfield_replace() local 63 return (reg_val & ~mask) | ((bitfield_val << shift) & mask); in bitfield_replace() 67 static inline uint bitfield_shift(uint mask) in bitfield_shift() argument 69 return mask ? ffs(mask) - 1 : 0; in bitfield_shift() 73 static inline uint bitfield_extract_by_mask(uint reg_val, uint mask) in bitfield_extract_by_mask() argument 75 uint shift = bitfield_shift(mask); in bitfield_extract_by_mask() 77 return (reg_val & mask) >> shift; in bitfield_extract_by_mask() 84 static inline uint bitfield_replace_by_mask(uint reg_val, uint mask, in bitfield_replace_by_mask() argument 87 uint shift = bitfield_shift(mask); in bitfield_replace_by_mask() 89 return (reg_val & ~mask) | ((bitfield_val << shift) & mask); in bitfield_replace_by_mask()
|
| /rk3399_rockchip-uboot/drivers/misc/ |
| H A D | gpio_led.c | 18 static int gpio_led_gpio_value(led_id_t mask, int state) in gpio_led_gpio_value() argument 23 if (gpio_led_inv[i] == mask) in gpio_led_gpio_value() 30 void __led_init(led_id_t mask, int state) in __led_init() argument 34 if (gpio_request(mask, "gpio_led") != 0) { in __led_init() 35 printf("%s: failed requesting GPIO%lu!\n", __func__, mask); in __led_init() 39 gpio_value = gpio_led_gpio_value(mask, state); in __led_init() 40 gpio_direction_output(mask, gpio_value); in __led_init() 43 void __led_set(led_id_t mask, int state) in __led_set() argument 45 int gpio_value = gpio_led_gpio_value(mask, state); in __led_set() 47 gpio_set_value(mask, gpio_value); in __led_set() [all …]
|
| H A D | pca9551_led.c | 67 u8 shift, buf, mask; in pca9551_led_set_state() local 79 mask = 0x03 << shift; in pca9551_led_set_state() 85 buf = (buf & ~mask) | ((state & 0x03) << shift); in pca9551_led_set_state() 125 void __led_set(led_id_t mask, int state) in __led_set() argument 128 pca9551_led_set_state(mask, PCA9551_LED_STATE_OFF); in __led_set() 130 pca9551_led_set_state(mask, PCA9551_LED_STATE_ON); in __led_set() 133 void __led_toggle(led_id_t mask) in __led_toggle() argument 137 pca9551_led_get_state(mask, &state); in __led_toggle() 138 pca9551_led_set_state(mask, !state); in __led_toggle() 141 void __led_blink(led_id_t mask, int freq) in __led_blink() argument [all …]
|
| /rk3399_rockchip-uboot/drivers/power/regulator/ |
| H A D | rk8xx.c | 386 int mask = info->vsel_mask; in _buck_set_value() local 398 __func__, uvolt, buck + 1, info->vsel_reg, mask, val); in _buck_set_value() 401 pmic_clrsetbits(pmic, info->vsel_reg, mask, val); in _buck_set_value() 404 return pmic_clrsetbits(pmic, info->vsel_reg, mask, val); in _buck_set_value() 410 uint mask, value, en_reg; in _buck_set_enable() local 441 mask = 1 << buck; in _buck_set_enable() 448 ret = pmic_clrsetbits(pmic, REG_DCDC_EN, mask, in _buck_set_enable() 449 enable ? mask : 0); in _buck_set_enable() 479 int mask = info->vsel_mask; in _buck_set_suspend_value() local 491 __func__, uvolt, buck + 1, info->vsel_sleep_reg, mask, val); in _buck_set_suspend_value() [all …]
|
| /rk3399_rockchip-uboot/arch/x86/lib/ |
| H A D | cmd_mtrr.c | 29 uint64_t base, mask, size; in do_mtrr_list() local 33 mask = native_read_msr(MTRR_PHYS_MASK_MSR(i)); in do_mtrr_list() 34 size = ~mask & ((1ULL << CONFIG_CPU_ADDR_BITS) - 1); in do_mtrr_list() 37 valid = mask & MTRR_PHYS_MASK_VALID; in do_mtrr_list() 41 mask & ~MTRR_PHYS_MASK_VALID, size); in do_mtrr_list() 52 uint64_t base, mask; in do_mtrr_set() local 71 mask = ~((uint64_t)size - 1); in do_mtrr_set() 72 mask &= (1ULL << CONFIG_CPU_ADDR_BITS) - 1; in do_mtrr_set() 74 mask |= MTRR_PHYS_MASK_VALID; in do_mtrr_set() 76 printf("base=%llx, mask=%llx\n", base, mask); in do_mtrr_set() [all …]
|
| /rk3399_rockchip-uboot/board/ti/beagle/ |
| H A D | led.c | 30 static int get_led_gpio(led_id_t mask) in get_led_gpio() argument 33 if (CONFIG_LED_STATUS_BIT & mask) in get_led_gpio() 37 if (CONFIG_LED_STATUS_BIT1 & mask) in get_led_gpio() 44 void __led_init (led_id_t mask, int state) in __led_init() argument 48 toggle_gpio = get_led_gpio(mask); in __led_init() 51 __led_set(mask, state); in __led_init() 54 void __led_toggle (led_id_t mask) in __led_toggle() argument 58 toggle_gpio = get_led_gpio(mask); in __led_toggle() 65 void __led_set (led_id_t mask, int state) in __led_set() argument 69 toggle_gpio = get_led_gpio(mask); in __led_set()
|
| /rk3399_rockchip-uboot/board/corscience/tricorder/ |
| H A D | led.c | 18 void __led_init(led_id_t mask, int state) in __led_init() argument 20 __led_set(mask, state); in __led_init() 23 void __led_toggle(led_id_t mask) in __led_toggle() argument 27 if (!toggle_gpio && CONFIG_LED_STATUS_BIT & mask) in __led_toggle() 31 if (!toggle_gpio && CONFIG_LED_STATUS_BIT1 & mask) in __led_toggle() 35 if (!toggle_gpio && CONFIG_LED_STATUS_BIT2 & mask) { in __led_toggle() 52 void __led_set(led_id_t mask, int state) in __led_set() argument 55 if (CONFIG_LED_STATUS_BIT & mask) { in __led_set() 62 if (CONFIG_LED_STATUS_BIT1 & mask) { in __led_set() 69 if (CONFIG_LED_STATUS_BIT2 & mask) { in __led_set()
|
| /rk3399_rockchip-uboot/arch/powerpc/include/asm/ |
| H A D | bitops.h | 34 unsigned long mask = 1 << (nr & 0x1f); in set_bit() local 44 : "r" (mask), "r" (p), "m" (*p) in set_bit() 51 unsigned long mask = 1 << (nr & 0x1f); in clear_bit() local 61 : "r" (mask), "r" (p), "m" (*p) in clear_bit() 68 unsigned long mask = 1 << (nr & 0x1f); in change_bit() local 78 : "r" (mask), "r" (p), "m" (*p) in change_bit() 85 unsigned int mask = 1 << (nr & 0x1f); in test_and_set_bit() local 95 : "r" (mask), "r" (p), "m" (*p) in test_and_set_bit() 98 return (old & mask) != 0; in test_and_set_bit() 104 unsigned int mask = 1 << (nr & 0x1f); in test_and_clear_bit() local [all …]
|
| /rk3399_rockchip-uboot/tools/ |
| H A D | pbl_crc32.c | 15 uint32_t mask; in make_crc_table() local 29 mask = i << 24; in make_crc_table() 31 if (mask & 0x80000000) in make_crc_table() 32 mask = (mask << 1) ^ poly; in make_crc_table() 34 mask <<= 1; in make_crc_table() 36 crc_table[i] = mask; in make_crc_table()
|
| /rk3399_rockchip-uboot/board/topic/zynq/ |
| H A D | ps7_init_common.c | 72 unsigned long mask; in ps7_config() local 86 mask = ptr[1]; in ps7_config() 88 iowrite((ioread(addr) & ~mask) | (val & mask), addr); in ps7_config() 93 mask = ptr[1]; in ps7_config() 95 while (!(ioread(addr) & mask)) { in ps7_config() 104 mask = ptr[1]; in ps7_config() 105 delay = get_number_of_cycles_for_delay(mask); in ps7_config()
|
| H A D | ps7_init_gpl.h | 17 #define EMIT_MASKWRITE(addr, mask, val) OPCODE_MASKWRITE | addr, mask, val argument 18 #define EMIT_MASKPOLL(addr, mask) OPCODE_MASKPOLL | addr, mask argument 19 #define EMIT_MASKDELAY(addr, mask) OPCODE_MASKDELAY | addr, mask argument
|
| /rk3399_rockchip-uboot/arch/arm/cpu/arm920t/ep93xx/ |
| H A D | led.c | 52 void __led_init(led_id_t mask, int state) in __led_init() argument 54 __led_set(mask, state); in __led_init() 57 void __led_toggle(led_id_t mask) in __led_toggle() argument 59 if (CONFIG_LED_STATUS_RED == mask) { in __led_toggle() 64 } else if (CONFIG_LED_STATUS_GREEN == mask) { in __led_toggle() 73 void __led_set(led_id_t mask, int state) in __led_set() argument 75 if (CONFIG_LED_STATUS_RED == mask) { in __led_set() 80 } else if (CONFIG_LED_STATUS_GREEN == mask) { in __led_set()
|
| /rk3399_rockchip-uboot/drivers/mmc/ |
| H A D | kona_sdhci.c | 25 unsigned int mask; in init_kona_mmc_core() local 34 mask = sdhci_readl(host, SDHCI_CORECTRL_OFFSET) | SDHCI_CORECTRL_RESET; in init_kona_mmc_core() 35 sdhci_writel(host, mask, SDHCI_CORECTRL_OFFSET); in init_kona_mmc_core() 51 mask = mask & ~SDHCI_CORECTRL_RESET; in init_kona_mmc_core() 52 sdhci_writel(host, mask, SDHCI_CORECTRL_OFFSET); in init_kona_mmc_core() 55 mask = sdhci_readl(host, SDHCI_CORECTRL_OFFSET); in init_kona_mmc_core() 56 sdhci_writel(host, mask | SDHCI_CORECTRL_EN, SDHCI_CORECTRL_OFFSET); in init_kona_mmc_core() 62 mask = sdhci_readl(host, SDHCI_CORESTAT_OFFSET); in init_kona_mmc_core() 63 sdhci_writel(host, mask | SDHCI_CORESTAT_CD_SW, SDHCI_CORESTAT_OFFSET); in init_kona_mmc_core()
|
| /rk3399_rockchip-uboot/arch/sandbox/include/asm/ |
| H A D | bitops.h | 45 unsigned long mask = BIT_MASK(nr); in __change_bit() local 48 *p ^= mask; in __change_bit() 53 unsigned long mask = BIT_MASK(nr); in __test_and_set_bit() local 57 *p = old | mask; in __test_and_set_bit() 58 return (old & mask) != 0; in __test_and_set_bit() 75 unsigned long mask = BIT_MASK(nr); in __test_and_clear_bit() local 79 *p = old & ~mask; in __test_and_clear_bit() 80 return (old & mask) != 0; in __test_and_clear_bit() 99 unsigned long mask = BIT_MASK(nr); in __test_and_change_bit() local 103 *p = old ^ mask; in __test_and_change_bit() [all …]
|