Lines Matching refs:sockp
343 static boolean_t pcic_load_cardbus(pcicdev_t *pcic, const pcic_socket_t *sockp);
344 static void pcic_unload_cardbus(pcicdev_t *pcic, const pcic_socket_t *sockp);
2273 pcic_socket_t *sockp;
2276 sockp = &pcic->pc_sockets[i];
2279 if (sockp->pcs_flags & PCS_WAITING) {
2284 if (sockp->pcs_flags & PCS_CARD_IO)
2335 status, sockp->pcs_flags);
2345 irq = pcic_getb(pcic, sockp->pcs_socket,
2348 pcic_putb(pcic, sockp->pcs_socket,
2358 sockp->pcs_flags |= PCS_DEBOUNCING;
2360 if (!sockp->pcs_cd_softint_flg) {
2361 sockp->pcs_cd_softint_flg = 1;
2363 sockp->pcs_cd_softint_hdl, NULL);
2370 sockp->pcs_state ^= SBM_RDYBSY;
2372 sockp->pcs_flags |= PCS_READY;
2379 !(sockp->pcs_state & SBM_BVD2)) {
2380 sockp->pcs_state |= SBM_BVD2;
2392 !(sockp->pcs_state & SBM_BVD1)) {
2393 sockp->pcs_state |= SBM_BVD1;
2475 pcic_socket_t *sockp =
2481 sockp->pcs_flags, PCS_CARD_PRESENT);
2489 if ((sockp->pcs_flags & PCS_CARD_PRESENT) &&
2490 !(sockp->pcs_flags & PCS_DEBOUNCING) &&
2737 pcic_socket_t *sockp = &pcic->pc_sockets[window->socket];
2799 memp = &sockp->pcs_windows[win].mem;
3151 winp = &sockp->pcs_windows[win].io;
3489 pcic_card_state(pcicdev_t *pcic, pcic_socket_t *sockp)
3498 value = pcic_getb(pcic, sockp->pcs_socket, PCIC_INTERFACE_STATUS);
3504 (void *)sockp,
3507 sockp->pcs_socket);
3514 if (!(sockp->pcs_flags & (PCS_STARTING|PCS_CARD_ISCARDBUS)) &&
3515 !sockp->pcs_debounce_id &&
3538 (void *) sockp, orig_value,
3540 sockp->pcs_socket, result);
3789 pcic_socket_t *sockp = &pcic->pc_sockets[socket->socket];
3815 if (socket->VccLevel == 0 || !(sockp->pcs_flags & PCS_CARD_PRESENT)) {
3817 sockp->pcs_vcc = 0;
3818 sockp->pcs_vpp1 = 0;
3819 sockp->pcs_vpp2 = 0;
3854 sockp->pcs_vcc = PCIC_VCC_3VLEVEL;
3856 sockp->pcs_vcc = socket->VccLevel;
3880 sockp->pcs_vpp1 = socket->Vpp1Level;
3890 sockp->pcs_vpp2 = socket->Vpp2Level;
3899 if (sockp->pcs_vpp2 != sockp->pcs_vpp1) {
3901 if (sockp->pcs_vpp1 != 0 &&
3902 sockp->pcs_vpp2 != 0) {
3953 sockp->pcs_intmask = socket->SCIntMask;
3961 if (sockp->pcs_flags & PCS_CARD_PRESENT) {
3964 if (sockp->pcs_intmask & SBM_BVD1 || socket->IFType == IF_IO)
3967 if (sockp->pcs_intmask & SBM_BVD2)
3970 if (sockp->pcs_intmask & SBM_RDYBSY)
3973 if (sockp->pcs_intmask & SBM_CD)
3977 if (sockp->pcs_flags & PCS_READY) {
3983 sockp->pcs_flags &= ~PCS_READY;
4003 if (sockp->pcs_intmask & (SBM_EJECT|SBM_INSERT) &&
4039 if (pcic_power[sockp->pcs_vcc].PowerLevel == 33)
4054 if (pcic_power[sockp->pcs_vcc].PowerLevel == 33)
4076 if (pcic_power[sockp->pcs_vcc].PowerLevel == 33)
4094 if ((orig_pwrctl & POWER_OUTPUT_ENABLE) && sockp->pcs_vcc == 0) {
4116 if (!(orig_pwrctl & POWER_OUTPUT_ENABLE) && sockp->pcs_vcc != 0) {
4147 sockp->pcs_flags |= PCS_CARD_IO;
4148 if (irq != sockp->pcs_irq) {
4149 if (sockp->pcs_irq != 0)
4152 irq, sockp->pcs_irq);
4154 sockp->pcs_irq = irq;
4156 irq = sockp->pcs_irq;
4161 sockp->pcs_flags |= PCS_IRQ_ENABLED;
4164 sockp->pcs_flags &= ~PCS_IRQ_ENABLED;
4178 sockp->pcs_irq = 0;
4184 sockp->pcs_flags &= ~(PCS_CARD_IO|PCS_IRQ_ENABLED);
4187 sockp->pcs_state &= ~socket->State;
4352 pcic_socket_t *sockp;
4355 sockp = &pcic->pc_sockets[socknum];
4357 socket->SCIntMask = sockp->pcs_intmask;
4358 sockp->pcs_state = pcic_card_state(pcic, sockp);
4360 socket->state = sockp->pcs_state;
4362 socket->VccLevel = sockp->pcs_vcc;
4363 socket->Vpp1Level = sockp->pcs_vpp1;
4364 socket->Vpp2Level = sockp->pcs_vpp2;
4365 irq_enabled = (sockp->pcs_flags & PCS_IRQ_ENABLED) ?
4367 socket->IRQRouting = sockp->pcs_irq | irq_enabled;
4368 socket->IFType = (sockp->pcs_flags & PCS_CARD_IO) ?
4395 pcic_socket_t *sockp;
4398 sockp = &pcic->pc_sockets[socknum];
4400 status->CardState = pcic_card_state(pcic, sockp);
4401 status->SocketState = sockp->pcs_state;
4404 if (sockp->pcs_flags & PCS_CARD_PRESENT)
4407 irq_enabled = (sockp->pcs_flags & PCS_CARD_ENABLED) ?
4409 status->IRQRouting = sockp->pcs_irq | irq_enabled;
4410 status->IFType = (sockp->pcs_flags & PCS_CARD_IO) ?
4464 pcic_socket_t *sockp;
4479 sockp = &pcic->pc_sockets[socket];
4480 winp = &sockp->pcs_windows[win].mem;
4643 pcic_socket_t *sockp;
4658 sockp = &pcic->pc_sockets[socket];
4665 if (sockp->pcs_windows[i].io.pcw_status &
4668 io = &sockp->pcs_windows[i].io;
4672 if (sockp->pcs_windows[i].mem.pcw_status &
4675 mem = &sockp->pcs_windows[i].mem;
5416 pcic_socket_t *sockp = (pcic_socket_t *)arg1;
5421 mutex_enter(&sockp->pcs_pcic->pc_lock);
5422 if (sockp->pcs_cd_softint_flg) {
5424 sockp->pcs_cd_softint_flg = 0;
5426 status = pcic_getb(sockp->pcs_pcic, sockp->pcs_socket,
5428 pcic_handle_cd_change(sockp->pcs_pcic, sockp, status);
5430 mutex_exit(&sockp->pcs_pcic->pc_lock);
5449 pcic_handle_cd_change(pcicdev_t *pcic, pcic_socket_t *sockp, uint8_t status)
5459 debounce = sockp->pcs_debounce_id;
5460 sockp->pcs_debounce_id = 0;
5478 sockp->pcs_socket, status, debounce);
5482 sockp->pcs_flags &= ~(PCS_CARD_REMOVED|PCS_CARD_CBREM);
5483 if (!(sockp->pcs_flags & PCS_CARD_PRESENT)) {
5486 pcic_err(pcic->dip, 8, "New card (0x%x)\n", sockp->pcs_flags);
5507 sockp->pcs_flags |= PCS_CARD_PRESENT;
5515 sockp->pcs_flags |= PCS_CARD_IS16BIT;
5526 sockp->pcs_socket);
5533 sockp->pcs_flags |=
5537 sockp)) {
5539 pcic, sockp);
5576 sockp->pcs_socket);
5582 if (!(sockp->pcs_flags & PCS_CARD_PRESENT)) {
5596 if (sockp->pcs_flags & PCS_CARD_PRESENT) {
5600 pcic_putb(pcic, sockp->pcs_socket,
5602 (void) pcic_getb(pcic, sockp->pcs_socket,
5608 sockp->pcs_flags &= ~PCS_CARD_PRESENT;
5610 if (sockp->pcs_flags & PCS_CARD_IS16BIT) {
5611 sockp->pcs_flags &= ~PCS_CARD_IS16BIT;
5614 PCE_CARD_REMOVAL, sockp->pcs_socket);
5617 if (sockp->pcs_flags & PCS_CARD_ISCARDBUS) {
5618 sockp->pcs_flags &= ~PCS_CARD_ISCARDBUS;
5619 sockp->pcs_flags |= PCS_CARD_CBREM;
5621 sockp->pcs_flags |= PCS_CARD_REMOVED;
5625 if (debounce && (sockp->pcs_flags & PCS_CARD_REMOVED)) {
5626 if (sockp->pcs_flags & PCS_CARD_CBREM) {
5638 pcic_unload_cardbus(pcic, sockp);
5641 sockp->pcs_flags &= ~PCS_CARD_CBREM;
5643 sockp->pcs_flags &= ~PCS_CARD_REMOVED;
5660 sockp->pcs_socket);
5662 sockp->pcs_debounce_id =
5663 pcic_add_debqueue(sockp, debounce_time);
5680 irq = pcic_getb(pcic, sockp->pcs_socket, PCIC_MANAGEMENT_INT);
5682 pcic_putb(pcic, sockp->pcs_socket, PCIC_MANAGEMENT_INT, irq);
5686 sockp->pcs_flags &= ~PCS_DEBOUNCING;
6095 pcic_load_cardbus(pcicdev_t *pcic, const pcic_socket_t *sockp)
6109 s.socket = sockp->pcs_socket;
6130 if (pcic_reset_socket(dip, sockp->pcs_socket,
6135 g.socket = sockp->pcs_socket;
6140 s.socket = sockp->pcs_socket;
6154 retval = cardbus_load_cardbus(dip, sockp->pcs_socket, pcic->pc_base);
6168 pcic_unload_cardbus(pcicdev_t *pcic, const pcic_socket_t *sockp)
6178 s.socket = sockp->pcs_socket;
6702 pcic_socket_t *sockp = &pcic->pc_sockets[socket];
6706 ind = pcic_power[sockp->pcs_vpp1].PowerLevel/10;
6709 ind = pcic_power[sockp->pcs_vcc].PowerLevel/10;
6718 socket, sockp->pcs_vcc, sockp->pcs_vpp1, orig_cbctl, cbctl);
6780 cbctl, orig_cbctl, sockp->pcs_vcc, sockp->pcs_vpp1);