/titanic_41/usr/src/uts/common/io/ |
H A D | power.c | 182 static int power_attach_acpi(struct power_soft_state *softsp); 183 static void power_detach_acpi(struct power_soft_state *softsp); 186 static int power_setup_regs(struct power_soft_state *softsp); 187 static void power_free_regs(struct power_soft_state *softsp); 282 struct power_soft_state *softsp; in power_getinfo() local 289 if ((softsp = ddi_get_soft_state(power_state, power_inst)) in power_getinfo() 292 *result = (void *)softsp->dip; in power_getinfo() 307 struct power_soft_state *softsp; in power_attach() local 338 softsp = ddi_get_soft_state(power_state, power_inst); in power_attach() 339 softsp->dip = dip; in power_attach() [all …]
|
/titanic_41/usr/src/uts/sun4v/io/glvc/ |
H A D | glvc.c | 195 static int glvc_peek(glvc_soft_state_t *softsp, 199 static int glvc_ioctl_opt_op(glvc_soft_state_t *softsp, 257 glvc_soft_state_t *softsp; in glvc_attach() local 296 softsp = ddi_get_soft_state(glvc_ssp, instance); in glvc_attach() 299 softsp->dip = dip; in glvc_attach() 301 softsp->open_state = GLVC_NO_OPEN; in glvc_attach() 302 softsp->send_complete_flag = 1; in glvc_attach() 305 softsp->dip, DDI_PROP_DONTPASS, "glvc_debug", glvc_debug); in glvc_attach() 307 if ((softsp->s_id = (uint64_t)ddi_getprop(DDI_DEV_T_ANY, in glvc_attach() 308 softsp->dip, DDI_PROP_DONTPASS, "channel#", -1)) in glvc_attach() [all …]
|
/titanic_41/usr/src/uts/sun4u/sunfire/io/ |
H A D | sysctrl.c | 106 static uint_t ps_fail_handler(struct sysctrl_soft_state *softsp, int fromint); 108 enum power_state compute_power_state(struct sysctrl_soft_state *softsp, 111 static void ps_log_state_change(struct sysctrl_soft_state *softsp, 114 static void ps_log_pres_change(struct sysctrl_soft_state *softsp, 127 static void pps_fan_state_change(struct sysctrl_soft_state *softsp, 138 static void sysctrl_add_kstats(struct sysctrl_soft_state *softsp); 160 static void nvram_update_powerfail(struct sysctrl_soft_state *softsp); 170 static void rcons_reinit(struct sysctrl_soft_state *softsp); 394 struct sysctrl_soft_state *softsp; in sysctrl_attach() local 424 softsp = GETSOFTC(instance); in sysctrl_attach() [all …]
|
H A D | ac.c | 239 struct ac_soft_state *softsp; in ac_attach() local 261 softsp = ddi_get_soft_state(acp, instance); in ac_attach() 264 softsp->dip = devi; in ac_attach() 267 softsp->pdip = ddi_get_parent(softsp->dip); in ac_attach() 268 if ((softsp->board = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->pdip, in ac_attach() 276 " softsp=0x%p\n", instance, (void *)devi, (void *)softsp)); in ac_attach() 279 if (ddi_map_regs(softsp->dip, 0, (caddr_t *)&softsp->ac_base, 0, 0)) { in ac_attach() 285 softsp->ac_id = (uint32_t *)softsp->ac_base; in ac_attach() 286 softsp->ac_memctl = (uint64_t *)((char *)softsp->ac_base + in ac_attach() 288 softsp->ac_memdecode0 = (uint64_t *)((char *)softsp->ac_base + in ac_attach() [all …]
|
H A D | environ.c | 60 static int environ_init(struct environ_soft_state *softsp); 62 void environ_add_temp_kstats(struct environ_soft_state *softsp); 180 struct environ_soft_state *softsp; in environ_attach() local 199 softsp = ddi_get_soft_state(environp, instance); in environ_attach() 202 softsp->dip = devi; in environ_attach() 211 softsp->pdip = ddi_get_parent(softsp->dip); in environ_attach() 213 if ((softsp->board = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->pdip, in environ_attach() 221 (void *)devi, (void *)softsp)); in environ_attach() 227 if (environ_init(softsp) != DDI_SUCCESS) in environ_attach() 250 (void) fhc_bdlist_lock(softsp->board); in environ_attach() [all …]
|
H A D | simmstat.c | 162 struct simmstat_soft_state *softsp; in simmstat_attach() local 181 softsp = ddi_get_soft_state(simmstatp, instance); in simmstat_attach() 184 softsp->dip = devi; in simmstat_attach() 187 softsp->pdip = ddi_get_parent(softsp->dip); in simmstat_attach() 188 if ((softsp->board = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->pdip, in simmstat_attach() 196 " softsp=0x%p\n", instance, (void *)devi, (void *)softsp)); in simmstat_attach() 199 if (ddi_map_regs(softsp->dip, 0, in simmstat_attach() 200 (caddr_t *)&softsp->simmstat_base, 0, 0)) { in simmstat_attach() 211 simmstat_add_kstats(softsp); in simmstat_attach() 227 struct simmstat_soft_state *softsp; in simmstat_detach() local [all …]
|
H A D | sram.c | 157 struct sram_soft_state *softsp; in sram_attach() local 175 softsp = ddi_get_soft_state(sramp, instance); in sram_attach() 178 softsp->dip = devi; in sram_attach() 181 softsp->pdip = ddi_get_parent(softsp->dip); in sram_attach() 182 if ((softsp->board = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->pdip, in sram_attach() 190 " softsp=0x%p\n", instance, (void *)devi, (void *)softsp)); in sram_attach() 193 if (ddi_map_regs(softsp->dip, 0, in sram_attach() 194 (caddr_t *)&softsp->sram_base, 0, 0)) { in sram_attach() 205 sram_add_kstats(softsp); in sram_attach() 221 struct sram_soft_state *softsp; in sram_detach() local [all …]
|
H A D | fhc.c | 319 static int fhc_init(struct fhc_soft_state *softsp); 320 static void fhc_unmap_regs(struct fhc_soft_state *softsp); 520 fhc_handle_imr(struct fhc_soft_state *softsp) in fhc_handle_imr() argument 527 if (softsp->is_central) { in fhc_handle_imr() 530 want_igr = softsp->list->sc.board << 1; in fhc_handle_imr() 531 act_igr = *softsp->igr & 0x1f; in fhc_handle_imr() 533 *softsp->igr = want_igr; in fhc_handle_imr() 534 tmp_reg = *softsp->igr; in fhc_handle_imr() 540 if (*(softsp->intr_regs[i].clear_reg) == 3) { in fhc_handle_imr() 541 *(softsp->intr_regs[i].clear_reg) = in fhc_handle_imr() [all …]
|
H A D | sysctrl_dr.c | 109 sysc_policy_enough_cooling(struct sysctrl_soft_state *softsp, 112 sysc_policy_enough_precharge(struct sysctrl_soft_state *softsp, 115 sysc_policy_enough_power(struct sysctrl_soft_state *softsp, 118 sysc_policy_hardware_compatible(struct sysctrl_soft_state *softsp, 121 struct sysctrl_soft_state *softsp, 125 struct sysctrl_soft_state *softsp, 128 static void sysc_policy_connected_condition(struct sysctrl_soft_state *softsp, 136 static void sysctrl_post_config_change(struct sysctrl_soft_state *softsp); 162 sysc_policy_enough_power(struct sysctrl_soft_state *softsp, in sysc_policy_enough_power() argument 167 ASSERT(softsp); in sysc_policy_enough_power() [all …]
|
H A D | ac_add.c | 111 struct ac_soft_state *asp = pkt->softsp; in ac_add_bank() 203 board = fhc_bdlist_lock(pkt->softsp->board); in ac_add_memory() 209 ASSERT(pkt->softsp == board->ac_softsp); in ac_add_memory() 223 mem_info = &pkt->softsp->bank[pkt->bank]; in ac_add_memory() 225 fhc_bd_busy(pkt->softsp->board) || in ac_add_memory()
|
H A D | fhc_bd.c | 222 if (boards.boards[index]->softsp == NULL) in fhc_bd_is_jtag_master() 225 return ((boards.boards[index]->softsp)->jt_master.is_master); in fhc_bd_is_jtag_master() 313 fhc_bd_init(struct fhc_soft_state *softsp, int board, enum board_type type) in fhc_bd_init() argument 323 if (softsp->is_central) { in fhc_bd_init() 331 if (softsp->is_central) { in fhc_bd_init() 337 if (softsp->is_central) { in fhc_bd_init() 354 softsp->list = bdp; in fhc_bd_init() 356 bdp->softsp = softsp; in fhc_bd_init() 359 bdp->sc.plus_board = ISPLUSBRD(*softsp->bsr); in fhc_bd_init() 687 if (bdp->softsp && (bdp->softsp->jt_master.is_master == 1)) { in jtag_master_lock() [all …]
|
H A D | ac_test.c | 97 struct ac_soft_state *softsp; in ac_mem_test_start() local 113 board = fhc_bdlist_lock(pkt->softsp->board); in ac_mem_test_start() 119 ASSERT(pkt->softsp == board->ac_softsp); in ac_mem_test_start() 137 softsp = pkt->softsp; in ac_mem_test_start() 138 mem_info = &softsp->bank[pkt->bank]; in ac_mem_test_start() 140 fhc_bd_busy(softsp->board) || in ac_mem_test_start() 154 if (test->board == softsp->board && in ac_mem_test_start() 190 test->board = softsp->board; in ac_mem_test_start() 200 *softsp->ac_memdecode0 : *softsp->ac_memdecode1; in ac_mem_test_start()
|
/titanic_41/usr/src/uts/sun4u/serengeti/io/ |
H A D | sgsbbc.c | 223 sbbc_softstate_t *softsp; in sbbc_attach() local 238 softsp = ddi_get_soft_state(sbbcp, instance); in sbbc_attach() 239 softsp->sbbc_instance = instance; in sbbc_attach() 246 softsp_init(softsp, devi); in sbbc_attach() 253 if (ddi_getproplen(DDI_DEV_T_ANY, softsp->dip, in sbbc_attach() 265 softsp->sbbc_state = SBBC_STATE_INIT; in sbbc_attach() 266 sbbc_add_instance(softsp); in sbbc_attach() 274 if (sgsbbc_iosram_is_chosen(softsp)) { in sbbc_attach() 276 softsp->iosram = master_iosram; in sbbc_attach() 277 master_iosram->sgsbbc = softsp; in sbbc_attach() [all …]
|
H A D | ssm.c | 121 ssm_fm_init(struct ssm_soft_state *softsp); 124 ssm_fm_fini(struct ssm_soft_state *softsp); 337 struct ssm_soft_state *softsp; in ssm_attach() local 358 softsp = ddi_get_soft_state(ssm_softstates, instance); in ssm_attach() 361 softsp->dip = devi; in ssm_attach() 362 softsp->top_node = devi; in ssm_attach() 363 mutex_init(&softsp->ssm_sft_lock, NULL, MUTEX_DRIVER, NULL); in ssm_attach() 366 instance, (void *)devi, (void *)softsp)); in ssm_attach() 368 if ((softsp->ssm_nodeid = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->dip, in ssm_attach() 389 if (ssm_make_nodes(devi, instance, softsp->ssm_nodeid)) { in ssm_attach() [all …]
|
H A D | sgsbbc_iosram.c | 89 sgsbbc_iosram_is_chosen(sbbc_softstate_t *softsp) in sgsbbc_iosram_is_chosen() argument 113 softsp->sbbc_instance, nodeid, chosen_iosram); in sgsbbc_iosram_is_chosen() 115 (void) ddi_pathname(softsp->dip, pn); in sgsbbc_iosram_is_chosen() 117 softsp->sbbc_instance, (void *)softsp->dip, pn); in sgsbbc_iosram_is_chosen() 120 SGSBBC_DBG_ALL("sgsbbc_iosram(%d): ... %s\n", softsp->sbbc_instance, in sgsbbc_iosram_is_chosen() 122 SGSBBC_DBG_ALL("sgsbbc_iosram(%d): ... %s\n", softsp->sbbc_instance, in sgsbbc_iosram_is_chosen() 206 tunnel_commit(sbbc_softstate_t *softsp, tunnel_t *new_tunnel) in tunnel_commit() argument 210 master_iosram->iosram_sbbc = softsp; in tunnel_commit() 212 softsp->chosen = TRUE; in tunnel_commit() 217 softsp->intr_hdlrs = master_iosram->intrs; in tunnel_commit() [all …]
|
/titanic_41/usr/src/uts/sun4u/starcat/io/ |
H A D | axq.c | 294 struct axq_soft_state *softsp; in axq_attach() local 309 softsp = ddi_get_soft_state(axq_softp, instance); in axq_attach() 310 if (softsp->slotnum && softsp->paused && use_axq_iopause && in axq_attach() 312 *softsp->axq_domain_ctrl &= ~AXQ_DOMCTRL_PAUSE; in axq_attach() 313 softsp->paused = 0; in axq_attach() 324 softsp = ddi_get_soft_state(axq_softp, instance); in axq_attach() 327 softsp->dip = devi; in axq_attach() 330 if ((softsp->portid = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->dip, in axq_attach() 337 softsp->expid = softsp->portid >> 5; in axq_attach() 343 softsp->slotnum = softsp->portid & 0x1; in axq_attach() [all …]
|
/titanic_41/usr/src/uts/sun4u/io/ |
H A D | sysioerr.c | 83 sysio_ue_intr(struct sbus_soft_state *softsp); 86 sysio_ce_intr(struct sbus_soft_state *softsp); 89 sbus_err_intr(struct sbus_soft_state *softsp); 98 sbus_clear_intr(struct sbus_soft_state *softsp, uint64_t *pafsr); 101 sbus_log_error(struct sbus_soft_state *softsp, uint64_t *pafsr, uint64_t *pafar, 106 sbus_check_bto(struct sbus_soft_state *softsp); 112 sbus_ctrl_ecc_err(struct sbus_soft_state *softsp); 115 sysio_dis_err(struct sbus_soft_state *softsp); 118 sysio_init_err(struct sbus_soft_state *softsp); 121 sysio_thermal_warn_intr(struct sbus_soft_state *softsp); [all …]
|
H A D | iommu.c | 118 iommu_init(struct sbus_soft_state *softsp, caddr_t address) in iommu_init() argument 138 softsp->iommu_ctrl_reg = REG_ADDR(address, OFF_IOMMU_CTRL_REG); in iommu_init() 139 softsp->tsb_base_addr = REG_ADDR(address, OFF_TSB_BASE_ADDR); in iommu_init() 140 softsp->iommu_flush_reg = REG_ADDR(address, OFF_IOMMU_FLUSH_REG); in iommu_init() 141 softsp->iommu_tlb_tag = REG_ADDR(address, OFF_IOMMU_TLB_TAG); in iommu_init() 142 softsp->iommu_tlb_data = REG_ADDR(address, OFF_IOMMU_TLB_DATA); in iommu_init() 146 mutex_init(&softsp->dma_pool_lock, NULL, MUTEX_DEFAULT, NULL); in iommu_init() 147 mutex_init(&softsp->intr_poll_list_lock, NULL, MUTEX_DEFAULT, NULL); in iommu_init() 150 if ((softsp->iommu_tsb_cookie = iommu_tsb_alloc(softsp->upa_id)) == in iommu_init() 153 ddi_driver_name(softsp->dip), in iommu_init() [all …]
|
H A D | iocache.c | 59 stream_buf_init(struct sbus_soft_state *softsp, caddr_t address) in stream_buf_init() argument 66 version = (uchar_t)(*softsp->sysio_ctrl_reg >> SYSIO_VER_SHIFT); in stream_buf_init() 70 softsp->stream_buf_off = STREAM_BUF_OFF; in stream_buf_init() 88 softsp->str_buf_ctrl_reg = REG_ADDR(address, OFF_STR_BUF_CTRL_REG); in stream_buf_init() 89 softsp->str_buf_flush_reg = REG_ADDR(address, OFF_STR_BUF_FLUSH_REG); in stream_buf_init() 90 softsp->str_buf_sync_reg = REG_ADDR(address, OFF_STR_BUF_SYNC_REG); in stream_buf_init() 91 softsp->str_buf_pg_tag_diag = REG_ADDR(address, STR_BUF_PAGE_TAG_DIAG); in stream_buf_init() 97 (void *)softsp->str_buf_ctrl_reg, (void *)softsp->str_buf_flush_reg, in stream_buf_init() 98 (void *)softsp->str_buf_sync_reg)); in stream_buf_init() 101 mutex_init(&softsp->sync_reg_lock, NULL, MUTEX_DEFAULT, NULL); in stream_buf_init() [all …]
|
H A D | sysiosbus.c | 244 sysio_err_uninit(struct sbus_soft_state *softsp); 247 iommu_uninit(struct sbus_soft_state *softsp); 250 stream_buf_uninit(struct sbus_soft_state *softsp); 267 sbus_ctlops_poke(struct sbus_soft_state *softsp, peekpoke_ctlops_t *in_args); 270 sbus_ctlops_peek(struct sbus_soft_state *softsp, peekpoke_ctlops_t *in_args, 274 sbus_init(struct sbus_soft_state *softsp, caddr_t address); 277 sbus_resume_init(struct sbus_soft_state *softsp, int resume); 444 struct sbus_soft_state *softsp; in sbus_attach() local 462 softsp = ddi_get_soft_state(sbusp, instance); in sbus_attach() 464 if ((error = iommu_resume_init(softsp)) != DDI_SUCCESS) in sbus_attach() [all …]
|
H A D | todds1287.c | 260 struct ds1287 *softsp; in ds1287_getinfo() local 267 if ((softsp = ddi_get_soft_state(ds1287_state, instance)) in ds1287_getinfo() 270 *result = (void *)softsp->dip; in ds1287_getinfo() 285 struct ds1287 *softsp; in ds1287_attach() local 319 softsp = ddi_get_soft_state(ds1287_state, instance); in ds1287_attach() 321 (void *)softsp); in ds1287_attach() 323 softsp->dip = dip; in ds1287_attach() 338 &ds1287_lo_iblock, NULL, ds1287_softintr, (caddr_t)softsp) != in ds1287_attach() 400 struct ds1287 *softsp; in ds1287_open() local 406 if ((softsp = ddi_get_soft_state(ds1287_state, instance)) == in ds1287_open() [all …]
|
H A D | mc-us3i.c | 144 static int mc_get_memory_reg_info(struct mc_soft_state *softsp); 145 static void mc_construct(struct mc_soft_state *softsp); 214 struct mc_soft_state *softsp; in mc_attach() local 235 softsp = ddi_get_soft_state(mcp, instance); in mc_attach() 238 softsp->dip = devi; in mc_attach() 240 if ((softsp->portid = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->dip, in mc_attach() 248 instance, softsp->portid, CPU->cpu_id)); in mc_attach() 252 if ((ddi_getlongprop_buf(DDI_DEV_T_ANY, softsp->dip, DDI_PROP_DONTPASS, in mc_attach() 253 "memory-control-register-1", (caddr_t)&(softsp->mcreg1), in mc_attach() 256 softsp->mcr_read_ok = 1; in mc_attach() [all …]
|
H A D | mc-us3.c | 227 struct mc_soft_state *softsp; in mc_attach() local 240 softsp = ddi_get_soft_state(mcp, instance); in mc_attach() 250 if (ddi_prop_exists(DDI_DEV_T_ANY, softsp->dip, in mc_attach() 253 (void) ddi_prop_remove(DDI_DEV_T_NONE, softsp->dip, in mc_attach() 256 mlayout_del(softsp->portid, 0); in mc_attach() 257 if (mc_get_mcregs(softsp) == -1) { in mc_attach() 270 softsp = ddi_get_soft_state(mcp, instance); in mc_attach() 273 softsp->dip = devi; in mc_attach() 275 if ((softsp->portid = (int)ddi_getprop(DDI_DEV_T_ANY, softsp->dip, in mc_attach() 283 instance, softsp->portid, CPU->cpu_id)); in mc_attach() [all …]
|
H A D | pmubus.c | 395 pmubus_devstate_t *softsp = pmubus_mapreqp->mapreq_softsp; in pmubus_get8() local 416 value = pci_config_get8(softsp->pmubus_reghdl, offset) & mask; in pmubus_get8() 438 pmubus_devstate_t *softsp = pmubus_mapreqp->mapreq_softsp; in pmubus_get32() local 459 value = pci_config_get32(softsp->pmubus_reghdl, offset) & mask; in pmubus_get32() 480 pmubus_devstate_t *softsp = pmubus_mapreqp->mapreq_softsp; in pmubus_put8() local 502 mutex_enter(&softsp->pmubus_reg_access_lock); in pmubus_put8() 503 tmp = pci_config_get8(softsp->pmubus_reghdl, offset); in pmubus_put8() 507 pci_config_put8(softsp->pmubus_reghdl, offset, tmp); in pmubus_put8() 508 mutex_exit(&softsp->pmubus_reg_access_lock); in pmubus_put8() 515 pci_config_put8(softsp->pmubus_reghdl, offset, value); in pmubus_put8() [all …]
|
/titanic_41/usr/src/uts/i86pc/io/acpi/acpinex/ |
H A D | acpinex_drv.c | 78 static void acpinex_fm_init(acpinex_softstate_t *softsp); 79 static void acpinex_fm_fini(acpinex_softstate_t *softsp); 246 acpinex_softstate_t *softsp; in acpinex_attach() local 275 softsp = ddi_get_soft_state(acpinex_softstates, instance); in acpinex_attach() 278 softsp->ans_dip = devi; in acpinex_attach() 279 (void) ddi_pathname(devi, softsp->ans_path); in acpinex_attach() 280 if (ACPI_FAILURE(acpica_get_handle(devi, &softsp->ans_hdl))) { in acpinex_attach() 283 softsp->ans_path); in acpinex_attach() 287 mutex_init(&softsp->ans_lock, NULL, MUTEX_DRIVER, NULL); in acpinex_attach() 290 if (acpinex_event_scan(softsp, B_TRUE) != DDI_SUCCESS) { in acpinex_attach() [all …]
|