Home
last modified time | relevance | path

Searched refs:unitp (Results 1 – 25 of 34) sorted by relevance

12

/titanic_50/usr/src/uts/sun4u/javelin/io/
H A Denvctrltwo.c274 register struct envctrlunit *unitp; in envctrl_attach() local
294 if (!(unitp = ddi_get_soft_state(envctrlsoft_statep, instance))) in envctrl_attach()
296 mutex_enter(&unitp->umutex); in envctrl_attach()
297 if (!unitp->suspended) { in envctrl_attach()
298 mutex_exit(&unitp->umutex); in envctrl_attach()
301 unitp->suspended = 0; in envctrl_attach()
302 unitp->initting = B_TRUE; in envctrl_attach()
303 envctrl_init_bus(unitp); in envctrl_attach()
304 unitp->initting = B_FALSE; in envctrl_attach()
306 envctrl_ps_probe(unitp); in envctrl_attach()
[all …]
/titanic_50/usr/src/uts/sun4u/montecarlo/io/
H A Dpcf8574_nct.c72 mutex_enter(&unitp->umutex); \
73 while (unitp->pcf8574_flags == PCF8574_BUSY) { \
74 if (cv_wait_sig(&unitp->pcf8574_cv, \
75 &unitp->umutex) <= 0) { \
76 mutex_exit(&unitp->umutex); \
80 unitp->pcf8574_flags = PCF8574_BUSY; \
81 mutex_exit(&unitp->umutex); \
86 mutex_enter(&unitp->umutex); \
87 unitp->pcf8574_flags = 0; \
88 cv_signal(&unitp->pcf8574_cv); \
[all …]
H A Dpcf8591_nct.c141 static int pcf8591_read_props(struct pcf8591_unit *unitp);
213 struct pcf8591_unit *unitp; in pcf8591_open() local
223 unitp = (struct pcf8591_unit *) in pcf8591_open()
226 if (unitp == NULL) { in pcf8591_open()
234 mutex_enter(&unitp->umutex); in pcf8591_open()
237 if (unitp->pcf8591_oflag[channel] != 0) { in pcf8591_open()
240 unitp->pcf8591_oflag[channel] = FEXCL; in pcf8591_open()
243 if (unitp->pcf8591_oflag[channel] == FEXCL) { in pcf8591_open()
246 unitp->pcf8591_oflag[channel] = FOPEN; in pcf8591_open()
250 mutex_exit(&unitp->umutex); in pcf8591_open()
[all …]
/titanic_50/usr/src/uts/sun4u/tazmo/io/
H A Denvctrl.c417 struct envctrlunit *unitp; in envctrl_attach() local
438 if (!(unitp = ddi_get_soft_state(envctrlsoft_statep, instance))) in envctrl_attach()
440 mutex_enter(&unitp->umutex); in envctrl_attach()
441 if (!unitp->suspended) { in envctrl_attach()
442 mutex_exit(&unitp->umutex); in envctrl_attach()
445 unitp->suspended = 0; in envctrl_attach()
446 mutex_exit(&unitp->umutex); in envctrl_attach()
447 unitp->initting = B_TRUE; in envctrl_attach()
448 envctrl_init_bus(unitp); in envctrl_attach()
449 unitp->initting = B_FALSE; in envctrl_attach()
[all …]
/titanic_50/usr/src/uts/sun4u/io/i2c/clients/
H A Dtda8444.c163 struct tda8444_unit *unitp; in tda8444_do_resume() local
167 unitp = (struct tda8444_unit *) in tda8444_do_resume()
170 if (unitp == NULL) { in tda8444_do_resume()
176 unitp->tda8444_transfer->i2c_wbuf[0] = TDA8444_REGBASE | in tda8444_do_resume()
178 unitp->tda8444_transfer->i2c_wbuf[1] = in tda8444_do_resume()
179 unitp->tda8444_output[channel]; in tda8444_do_resume()
181 channel, unitp->tda8444_output[channel])); in tda8444_do_resume()
182 if (i2c_transfer(unitp->tda8444_hdl, in tda8444_do_resume()
183 unitp->tda8444_transfer) != I2C_SUCCESS) { in tda8444_do_resume()
188 mutex_enter(&unitp->tda8444_mutex); in tda8444_do_resume()
[all …]
H A Dseeprom.c149 struct seepromunit *unitp; in seeprom_do_attach() local
162 unitp = ddi_get_soft_state(seepromsoft_statep, instance); in seeprom_do_attach()
164 unitp->seeprom_dip = dip; in seeprom_do_attach()
166 (void) snprintf(unitp->seeprom_name, sizeof (unitp->seeprom_name), in seeprom_do_attach()
172 unitp->seeprom_name, ddi_node_name(dip)); in seeprom_do_attach()
178 if (i2c_client_register(dip, &unitp->seeprom_hdl) != I2C_SUCCESS) { in seeprom_do_attach()
187 unitp->seeprom_addrsize = AT34C02_ADDRSIZE; in seeprom_do_attach()
188 unitp->seeprom_memsize = AT34C02_MEMSIZE; in seeprom_do_attach()
189 unitp->seeprom_pagesize = AT34C02_PAGESIZE; in seeprom_do_attach()
190 unitp->seeprom_pagemask = AT34C02_PAGEMASK; in seeprom_do_attach()
[all …]
H A Dmax1617.c170 struct max1617_unit *unitp; in max1617_do_attach() local
184 unitp = ddi_get_soft_state(max1617_soft_statep, instance); in max1617_do_attach()
186 (void) snprintf(unitp->max1617_name, sizeof (unitp->max1617_name), in max1617_do_attach()
196 " name '%s'", unitp->max1617_name, minor_name); in max1617_do_attach()
209 unitp->max1617_name, minor_name); in max1617_do_attach()
216 if (i2c_client_register(dip, &unitp->max1617_hdl) != I2C_SUCCESS) { in max1617_do_attach()
223 mutex_init(&unitp->max1617_mutex, NULL, MUTEX_DRIVER, NULL); in max1617_do_attach()
224 cv_init(&unitp->max1617_cv, NULL, CV_DRIVER, NULL); in max1617_do_attach()
235 struct max1617_unit *unitp; in max1617_do_resume() local
237 if ((unitp = ddi_get_soft_state(max1617_soft_statep, instance)) == in max1617_do_resume()
[all …]
H A Dssc100.c153 struct ssc100_unit *unitp; in ssc100_open() local
163 unitp = (struct ssc100_unit *) in ssc100_open()
166 if (unitp == NULL) { in ssc100_open()
174 mutex_enter(&unitp->ssc100_mutex); in ssc100_open()
177 if (unitp->ssc100_oflag != 0) { in ssc100_open()
180 unitp->ssc100_oflag = FEXCL; in ssc100_open()
183 if (unitp->ssc100_oflag == FEXCL) { in ssc100_open()
186 unitp->ssc100_oflag = FOPEN; in ssc100_open()
190 mutex_exit(&unitp->ssc100_mutex); in ssc100_open()
200 struct ssc100_unit *unitp; in ssc100_close() local
[all …]
H A Dpcf8574.c148 struct pcf8574_unit *unitp; in pcf8574_open() local
160 unitp = (struct pcf8574_unit *) in pcf8574_open()
163 if (unitp == NULL) { in pcf8574_open()
171 mutex_enter(&unitp->pcf8574_mutex); in pcf8574_open()
174 if (unitp->pcf8574_oflag != 0) { in pcf8574_open()
177 unitp->pcf8574_oflag = FEXCL; in pcf8574_open()
180 if (unitp->pcf8574_oflag == FEXCL) { in pcf8574_open()
183 unitp->pcf8574_oflag = FOPEN; in pcf8574_open()
187 mutex_exit(&unitp->pcf8574_mutex); in pcf8574_open()
197 struct pcf8574_unit *unitp; in pcf8574_close() local
[all …]
H A Dlm75.c148 struct lm75_unit *unitp; in lm75_open() local
158 unitp = (struct lm75_unit *) in lm75_open()
161 if (unitp == NULL) { in lm75_open()
169 mutex_enter(&unitp->lm75_mutex); in lm75_open()
172 if (unitp->lm75_oflag != 0) { in lm75_open()
175 unitp->lm75_oflag = FEXCL; in lm75_open()
178 if (unitp->lm75_oflag == FEXCL) { in lm75_open()
181 unitp->lm75_oflag = FOPEN; in lm75_open()
185 mutex_exit(&unitp->lm75_mutex); in lm75_open()
195 struct lm75_unit *unitp; in lm75_close() local
[all …]
H A Dltc1427.c148 struct ltc1427_unit *unitp; in ltc1427_open() local
158 unitp = (struct ltc1427_unit *) in ltc1427_open()
161 if (unitp == NULL) { in ltc1427_open()
169 mutex_enter(&unitp->ltc1427_mutex); in ltc1427_open()
172 if (unitp->ltc1427_oflag != 0) { in ltc1427_open()
175 unitp->ltc1427_oflag = FEXCL; in ltc1427_open()
178 if (unitp->ltc1427_oflag == FEXCL) { in ltc1427_open()
181 unitp->ltc1427_oflag = FOPEN; in ltc1427_open()
185 mutex_exit(&unitp->ltc1427_mutex); in ltc1427_open()
195 struct ltc1427_unit *unitp; in ltc1427_close() local
[all …]
H A Dpic16f819.c146 pic16f819_get(struct pic16f819_unit *unitp, int reg, uchar_t *byte, int flags) in pic16f819_get() argument
151 (void) i2c_transfer_alloc(unitp->pic16f819_hdl, &i2c_tran_pointer, in pic16f819_get()
159 err = i2c_transfer(unitp->pic16f819_hdl, i2c_tran_pointer); in pic16f819_get()
162 unitp->pic16f819_name, reg)); in pic16f819_get()
167 i2c_transfer_free(unitp->pic16f819_hdl, i2c_tran_pointer); in pic16f819_get()
172 pic16f819_set(struct pic16f819_unit *unitp, int reg, uchar_t byte) in pic16f819_set() argument
177 (void) i2c_transfer_alloc(unitp->pic16f819_hdl, &i2c_tran_pointer, in pic16f819_set()
181 "i2c_tran_pointer not allocated", unitp->pic16f819_name)); in pic16f819_set()
189 unitp->pic16f819_name, reg, byte)); in pic16f819_set()
191 err = i2c_transfer(unitp->pic16f819_hdl, i2c_tran_pointer); in pic16f819_set()
[all …]
H A Dpcf8591.c152 struct pcf8591_unit *unitp; in pcf8591_open() local
162 unitp = (struct pcf8591_unit *) in pcf8591_open()
165 if (unitp == NULL) { in pcf8591_open()
173 mutex_enter(&unitp->pcf8591_mutex); in pcf8591_open()
176 if (unitp->pcf8591_oflag != 0) { in pcf8591_open()
179 unitp->pcf8591_oflag = FEXCL; in pcf8591_open()
182 if (unitp->pcf8591_oflag == FEXCL) { in pcf8591_open()
185 unitp->pcf8591_oflag = FOPEN; in pcf8591_open()
189 mutex_exit(&unitp->pcf8591_mutex); in pcf8591_open()
199 struct pcf8591_unit *unitp; in pcf8591_close() local
[all …]
H A Dssc050.c182 struct ssc050_unit *unitp; in ssc050_open() local
192 unitp = (struct ssc050_unit *) in ssc050_open()
195 if (unitp == NULL) { in ssc050_open()
203 mutex_enter(&unitp->mutex); in ssc050_open()
206 if (unitp->oflag != 0) { in ssc050_open()
209 unitp->oflag = FEXCL; in ssc050_open()
212 if (unitp->oflag == FEXCL) { in ssc050_open()
215 unitp->oflag = FOPEN; in ssc050_open()
219 mutex_exit(&unitp->mutex); in ssc050_open()
229 struct ssc050_unit *unitp; in ssc050_close() local
[all …]
H A Dadm1026.c81 static int adm1026_get8(adm1026_unit_t *unitp, uint8_t reg, uint8_t *val);
82 static int adm1026_put8(adm1026_unit_t *unitp, uint8_t reg, uint8_t val);
184 adm1026_unit_t *unitp; in adm1026_open()
196 unitp = (struct adm1026_unit *) in adm1026_open()
199 if (unitp == NULL) { in adm1026_open()
207 mutex_enter(&unitp->adm1026_mutex); in adm1026_open()
210 if (unitp->adm1026_oflag != 0) { in adm1026_open()
213 unitp->adm1026_oflag = FEXCL; in adm1026_open()
216 if (unitp->adm1026_oflag == FEXCL) { in adm1026_open()
219 unitp->adm1026_oflag = FOPEN; in adm1026_open()
[all …]
/titanic_50/usr/src/uts/sun4u/littleneck/io/
H A Dpcf8574_lneck.c160 struct pcf8574_unit *unitp; in pcf8574_open() local
172 unitp = (struct pcf8574_unit *) in pcf8574_open()
175 if (unitp == NULL) { in pcf8574_open()
183 mutex_enter(&unitp->pcf8574_mutex); in pcf8574_open()
186 if (unitp->pcf8574_oflag != 0) { in pcf8574_open()
189 unitp->pcf8574_oflag = FEXCL; in pcf8574_open()
192 if (unitp->pcf8574_oflag == FEXCL) { in pcf8574_open()
195 unitp->pcf8574_oflag = FOPEN; in pcf8574_open()
199 mutex_exit(&unitp->pcf8574_mutex); in pcf8574_open()
208 struct pcf8574_unit *unitp; in pcf8574_close() local
[all …]
/titanic_50/usr/src/uts/sun4u/io/ppm/
H A Djbusppm.c192 jbppm_unit *unitp; in jbppm_attach() local
216 if ((unitp = ddi_get_soft_state(jbppm_statep, instance)) == NULL) { in jbppm_attach()
231 unitp->dip = dip; in jbppm_attach()
237 rv = ddi_regs_map_setup(dip, 0, (caddr_t *)&unitp->devid_csr, 0, 8, in jbppm_attach()
238 &attr, &unitp->devid_hndl); in jbppm_attach()
242 rv = ddi_regs_map_setup(dip, 1, (caddr_t *)&unitp->estar_csr, 0, 16, in jbppm_attach()
243 &attr, &unitp->estar_hndl); in jbppm_attach()
246 unitp->j_chng_csr = (uint64_t *)((caddr_t)unitp->estar_csr + in jbppm_attach()
249 data64 = ddi_get64(unitp->devid_hndl, (uint64_t *)unitp->devid_csr); in jbppm_attach()
250 unitp->is_master = (data64 & MASTER_IOBRIDGE_BIT) ? 1 : 0; in jbppm_attach()
[all …]
/titanic_50/usr/src/uts/intel/io/
H A Diommulib.c346 iommulib_unit_t *unitp; in iommulib_iommu_register() local
439 unitp = kmem_zalloc(sizeof (iommulib_unit_t), KM_SLEEP); in iommulib_iommu_register()
445 kmem_free(unitp, sizeof (iommulib_unit_t)); in iommulib_iommu_register()
453 mutex_init(&unitp->ilu_lock, NULL, MUTEX_DEFAULT, NULL); in iommulib_iommu_register()
455 mutex_enter(&unitp->ilu_lock); in iommulib_iommu_register()
456 unitp->ilu_unitid = ++iommulib_unit_ids; in iommulib_iommu_register()
457 unitp->ilu_ref = 0; in iommulib_iommu_register()
459 unitp->ilu_dip = dip; in iommulib_iommu_register()
460 unitp->ilu_ops = ops; in iommulib_iommu_register()
461 unitp->ilu_data = ops->ilops_data; in iommulib_iommu_register()
[all …]
/titanic_50/usr/src/uts/sun4u/grover/io/
H A Dgrfans.c162 struct grfans_unit *unitp; in grfans_do_attach() local
181 unitp = ddi_get_soft_state(grfans_soft_statep, instance); in grfans_do_attach()
182 if (unitp == NULL) in grfans_do_attach()
198 (caddr_t *)&unitp->cpufan_reg, in grfans_do_attach()
199 3, 1, &attr, &unitp->cpufan_rhandle) != DDI_SUCCESS) { in grfans_do_attach()
207 (caddr_t *)&unitp->sysfan_reg, in grfans_do_attach()
208 0, 1, &attr, &unitp->sysfan_rhandle) != DDI_SUCCESS) { in grfans_do_attach()
211 ddi_regs_map_free(&unitp->cpufan_rhandle); in grfans_do_attach()
221 ddi_regs_map_free(&unitp->cpufan_rhandle); in grfans_do_attach()
222 ddi_regs_map_free(&unitp->sysfan_rhandle); in grfans_do_attach()
[all …]
/titanic_50/usr/src/uts/sun4u/excalibur/io/
H A Dxcalppm.c226 xcppm_unit_t *unitp; in xcppm_map_all_regs() local
230 unitp = ddi_get_soft_state(ppm_statep, ppm_inst); in xcppm_map_all_regs()
240 &unitp->hndls.bbc_estar_ctrl); in xcppm_map_all_regs()
242 unitp->regs.bbc_estar_ctrl = (uint16_t *)(base_addr + in xcppm_map_all_regs()
244 unitp->regs.bbc_assert_change = (uint32_t *)(base_addr + in xcppm_map_all_regs()
246 unitp->regs.bbc_pll_settle = (uint32_t *)(base_addr + in xcppm_map_all_regs()
250 (caddr_t *)&unitp->regs.rio_mode_auxio, in xcppm_map_all_regs()
251 0, 0, &attr_le, &unitp->hndls.rio_mode_auxio); in xcppm_map_all_regs()
254 0, 0, &attr_le, &unitp->hndls.gpio_bank_select); in xcppm_map_all_regs()
256 unitp->regs.gpio_bank_sel_index = (uint8_t *)(base_addr + in xcppm_map_all_regs()
[all …]
/titanic_50/usr/src/uts/sun4u/daktari/io/
H A Dhpc3130_dak.c271 hpc3130_unit_t *unitp; in hpc3130_open()
281 unitp = (hpc3130_unit_t *) in hpc3130_open()
284 if (unitp == NULL) { in hpc3130_open()
288 mutex_enter(&unitp->hpc3130_mutex); in hpc3130_open()
291 if (unitp->hpc3130_oflag != 0) { in hpc3130_open()
294 unitp->hpc3130_oflag = FEXCL; in hpc3130_open()
297 if (unitp->hpc3130_oflag == FEXCL) { in hpc3130_open()
300 unitp->hpc3130_oflag = FOPEN; in hpc3130_open()
304 mutex_exit(&unitp->hpc3130_mutex); in hpc3130_open()
313 hpc3130_unit_t *unitp; in hpc3130_close()
[all …]
/titanic_50/usr/src/uts/i86pc/io/ppm/
H A Dacpippm.c198 appm_unit *unitp; in appm_attach() local
221 if ((unitp = ddi_get_soft_state(appm_statep, instance)) == NULL) { in appm_attach()
238 unitp->dip = dip; in appm_attach()
247 unitp->lyropen = 0; in appm_attach()
286 appm_unit *unitp; in appm_getinfo() local
292 unitp = ddi_get_soft_state(appm_statep, instance); in appm_getinfo()
293 if (unitp == NULL) { in appm_getinfo()
296 *result = (void *) unitp->dip; in appm_getinfo()
335 appm_unit *unitp; in appm_open() local
341 if ((unitp = ddi_get_soft_state( in appm_open()
[all …]
/titanic_50/usr/src/uts/common/io/ppm/
H A Dppm.c249 struct ppm_unit *unitp; in ppm_getinfo() local
259 if (unitp = ddi_get_soft_state(ppm_statep, (dev_t)arg)) { in ppm_getinfo()
260 *resultp = unitp->dip; in ppm_getinfo()
285 ppm_unit_t *unitp; in ppm_attach() local
299 unitp = ddi_get_soft_state(ppm_statep, ppm_inst); in ppm_attach()
300 mutex_enter(&unitp->lock); in ppm_attach()
301 unitp->states &= ~PPM_STATE_SUSPENDED; in ppm_attach()
302 mutex_exit(&unitp->lock); in ppm_attach()
321 unitp = ddi_get_soft_state(ppm_statep, ppm_inst); in ppm_attach()
330 unitp->dip = dip; in ppm_attach()
[all …]
/titanic_50/usr/src/uts/sun/io/ttymux/
H A Dttymux_impl.h132 #define BLOCKING(unitp, proto, flag) \ argument
135 unitp->sm_lqs && \
136 (unitp->sm_flags & SM_CARON) == 0)
/titanic_50/usr/src/uts/i86pc/io/
H A Dppm_plat.c123 ppm_unit_t *unitp; in ppm_change_cpu_power() local
130 unitp = ddi_get_soft_state(ppm_statep, ppm_inst); in ppm_change_cpu_power()
131 ASSERT(unitp); in ppm_change_cpu_power()

12