Lines Matching refs:bit
38 * 1:1 mapping between the bit position and the IRQ number.
47 static inline unsigned int ilsel_offset(unsigned int bit)
49 return ILSEL_LEVELS - bit - 1;
52 static inline unsigned long mk_ilsel_addr(unsigned int bit)
54 return ILSEL_BASE + ((ilsel_offset(bit) >> 1) & ~0x1);
57 static inline unsigned int mk_ilsel_shift(unsigned int bit)
59 return (ilsel_offset(bit) & 0x3) << 2;
62 static void __ilsel_enable(ilsel_source_t set, unsigned int bit)
67 addr = mk_ilsel_addr(bit);
68 shift = mk_ilsel_shift(bit);
70 pr_debug("%s: bit#%d: addr - 0x%08lx (shift %d, set %d)\n",
71 __func__, bit, addr, shift, set);
93 unsigned int bit;
99 bit = find_first_zero_bit(&ilsel_level_map, ILSEL_LEVELS);
100 } while (test_and_set_bit(bit, &ilsel_level_map));
102 __ilsel_enable(set, bit);
104 return bit;
121 unsigned int bit = ilsel_offset(level - 1);
123 if (test_and_set_bit(bit, &ilsel_level_map))
126 __ilsel_enable(set, bit);
128 return bit;