94 static int pcic_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
95 static int pcic_attach(dev_info_t *, ddi_attach_cmd_t);
96 static int pcic_detach(dev_info_t *, ddi_detach_cmd_t);
97 static int32_t pcic_quiesce(dev_info_t *);
98 static uint_t pcic_intr(caddr_t, caddr_t);
99 static int pcic_do_io_intr(pcicdev_t *, uint32_t);
100 static int pcic_probe(dev_info_t *);
101
102 static int pcic_open(dev_t *, int, int, cred_t *);
103 static int pcic_close(dev_t, int, int, cred_t *);
104 static int pcic_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
105
106 typedef struct pcm_regs pcm_regs_t;
107
108 static void pcic_init_assigned(dev_info_t *);
109 static int pcic_apply_avail_ranges(dev_info_t *, pcm_regs_t *,
110 pci_regspec_t *, int);
111 int pci_resource_setup_avail(dev_info_t *, pci_regspec_t *, int);
112
113 /*
114 * On x86 platforms the ddi_iobp_alloc(9F) and ddi_mem_alloc(9F) calls
115 * are xlated into DMA ctlops. To make this nexus work on x86, we
116 * need to have the default ddi_dma_mctl ctlops in the bus_ops
117 * structure, just to pass the request to the parent. The correct
118 * ctlops should be ddi_no_dma_mctl because so far we don't do DMA.
119 */
120 static
121 struct bus_ops pcmciabus_ops = {
122 BUSO_REV,
123 pcmcia_bus_map,
124 NULL,
125 NULL,
126 NULL,
127 i_ddi_map_fault,
128 ddi_no_dma_map,
129 ddi_no_dma_allochdl,
130 ddi_no_dma_freehdl,
131 ddi_no_dma_bindhdl,
132 ddi_no_dma_unbindhdl,
133 ddi_no_dma_flush,
134 ddi_no_dma_win,
135 ddi_dma_mctl,
136 pcmcia_ctlops,
137 pcmcia_prop_op,
|
94 static int pcic_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
95 static int pcic_attach(dev_info_t *, ddi_attach_cmd_t);
96 static int pcic_detach(dev_info_t *, ddi_detach_cmd_t);
97 static int32_t pcic_quiesce(dev_info_t *);
98 static uint_t pcic_intr(caddr_t, caddr_t);
99 static int pcic_do_io_intr(pcicdev_t *, uint32_t);
100 static int pcic_probe(dev_info_t *);
101
102 static int pcic_open(dev_t *, int, int, cred_t *);
103 static int pcic_close(dev_t, int, int, cred_t *);
104 static int pcic_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
105
106 typedef struct pcm_regs pcm_regs_t;
107
108 static void pcic_init_assigned(dev_info_t *);
109 static int pcic_apply_avail_ranges(dev_info_t *, pcm_regs_t *,
110 pci_regspec_t *, int);
111 int pci_resource_setup_avail(dev_info_t *, pci_regspec_t *, int);
112
113 /*
114 * To make this nexus work on x86, we need to have the default ddi_dma_mctl
115 * ctlops in the bus_ops structure, just to pass the request to the parent.
116 * ctlops should be ddi_no_dma_mctl because so far we don't do DMA.
117 */
118 static
119 struct bus_ops pcmciabus_ops = {
120 BUSO_REV,
121 pcmcia_bus_map,
122 NULL,
123 NULL,
124 NULL,
125 i_ddi_map_fault,
126 ddi_no_dma_map,
127 ddi_no_dma_allochdl,
128 ddi_no_dma_freehdl,
129 ddi_no_dma_bindhdl,
130 ddi_no_dma_unbindhdl,
131 ddi_no_dma_flush,
132 ddi_no_dma_win,
133 ddi_dma_mctl,
134 pcmcia_ctlops,
135 pcmcia_prop_op,
|