Lines Matching refs:dat_idx
54 unsigned int dat_idx; in hci_dat_v1_init() local
74 for (dat_idx = 0; dat_idx < hci->DAT_entries; dat_idx++) { in hci_dat_v1_init()
75 dat_w0_write(dat_idx, 0); in hci_dat_v1_init()
76 dat_w1_write(dat_idx, 0); in hci_dat_v1_init()
91 unsigned int dat_idx; in hci_dat_v1_alloc_entry() local
99 dat_idx = find_first_zero_bit(hci->DAT_data, hci->DAT_entries); in hci_dat_v1_alloc_entry()
100 if (dat_idx >= hci->DAT_entries) in hci_dat_v1_alloc_entry()
102 __set_bit(dat_idx, hci->DAT_data); in hci_dat_v1_alloc_entry()
105 dat_w0_write(dat_idx, DAT_0_SIR_REJECT | DAT_0_MR_REJECT); in hci_dat_v1_alloc_entry()
107 return dat_idx; in hci_dat_v1_alloc_entry()
110 static void hci_dat_v1_free_entry(struct i3c_hci *hci, unsigned int dat_idx) in hci_dat_v1_free_entry() argument
112 dat_w0_write(dat_idx, 0); in hci_dat_v1_free_entry()
113 dat_w1_write(dat_idx, 0); in hci_dat_v1_free_entry()
115 __clear_bit(dat_idx, hci->DAT_data); in hci_dat_v1_free_entry()
119 unsigned int dat_idx, u8 address) in hci_dat_v1_set_dynamic_addr() argument
123 dat_w0 = dat_w0_read(dat_idx); in hci_dat_v1_set_dynamic_addr()
127 dat_w0_write(dat_idx, dat_w0); in hci_dat_v1_set_dynamic_addr()
131 unsigned int dat_idx, u8 address) in hci_dat_v1_set_static_addr() argument
135 dat_w0 = dat_w0_read(dat_idx); in hci_dat_v1_set_static_addr()
138 dat_w0_write(dat_idx, dat_w0); in hci_dat_v1_set_static_addr()
141 static void hci_dat_v1_set_flags(struct i3c_hci *hci, unsigned int dat_idx, in hci_dat_v1_set_flags() argument
146 dat_w0 = dat_w0_read(dat_idx); in hci_dat_v1_set_flags()
147 dat_w1 = dat_w1_read(dat_idx); in hci_dat_v1_set_flags()
150 dat_w0_write(dat_idx, dat_w0); in hci_dat_v1_set_flags()
151 dat_w1_write(dat_idx, dat_w1); in hci_dat_v1_set_flags()
154 static void hci_dat_v1_clear_flags(struct i3c_hci *hci, unsigned int dat_idx, in hci_dat_v1_clear_flags() argument
159 dat_w0 = dat_w0_read(dat_idx); in hci_dat_v1_clear_flags()
160 dat_w1 = dat_w1_read(dat_idx); in hci_dat_v1_clear_flags()
163 dat_w0_write(dat_idx, dat_w0); in hci_dat_v1_clear_flags()
164 dat_w1_write(dat_idx, dat_w1); in hci_dat_v1_clear_flags()
169 unsigned int dat_idx; in hci_dat_v1_get_index() local
172 for_each_set_bit(dat_idx, hci->DAT_data, hci->DAT_entries) { in hci_dat_v1_get_index()
173 dat_w0 = dat_w0_read(dat_idx); in hci_dat_v1_get_index()
175 return dat_idx; in hci_dat_v1_get_index()