Lines Matching defs:bit
37 * 1:1 mapping between the bit position and the IRQ number.
46 static inline unsigned int ilsel_offset(unsigned int bit)
48 return ILSEL_LEVELS - bit - 1;
51 static inline unsigned long mk_ilsel_addr(unsigned int bit)
53 return ILSEL_BASE + ((ilsel_offset(bit) >> 1) & ~0x1);
56 static inline unsigned int mk_ilsel_shift(unsigned int bit)
58 return (ilsel_offset(bit) & 0x3) << 2;
61 static void __ilsel_enable(ilsel_source_t set, unsigned int bit)
68 addr = mk_ilsel_addr(bit);
69 shift = mk_ilsel_shift(bit);
71 pr_debug("%s: bit#%d: addr - 0x%08lx (shift %d, set %d)\n",
72 __func__, bit, addr, shift, set);
94 unsigned int bit;
102 bit = find_first_zero_bit(&ilsel_level_map, ILSEL_LEVELS);
103 } while (test_and_set_bit(bit, &ilsel_level_map));
105 __ilsel_enable(set, bit);
107 return bit;
124 unsigned int bit = ilsel_offset(level - 1);
126 if (test_and_set_bit(bit, &ilsel_level_map))
129 __ilsel_enable(set, bit);
131 return bit;