qca955x_pci.c revision 287911
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2011, Luiz Otavio O Souza.
4 * Copyright (c) 2015, Adrian Chadd <adrian@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice unmodified, this list of conditions, and the following
12 *    disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/mips/atheros/qca955x_pci.c 287911 2015-09-17 12:04:41Z bz $");
32
33#include "opt_ar71xx.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37
38#include <sys/bus.h>
39#include <sys/interrupt.h>
40#include <sys/malloc.h>
41#include <sys/kernel.h>
42#include <sys/module.h>
43#include <sys/rman.h>
44
45#include <vm/vm.h>
46#include <vm/pmap.h>
47#include <vm/vm_extern.h>
48
49#include <machine/bus.h>
50#include <machine/cpu.h>
51#include <machine/intr_machdep.h>
52#include <machine/pmap.h>
53
54#include <dev/pci/pcivar.h>
55#include <dev/pci/pcireg.h>
56
57#include <dev/pci/pcib_private.h>
58#include "pcib_if.h"
59
60#include <mips/atheros/ar71xxreg.h> /* XXX aim to eliminate this! */
61#include <mips/atheros/qca955xreg.h>
62#include <mips/atheros/ar71xx_setup.h>
63#include <mips/atheros/ar71xx_pci_bus_space.h>
64
65#include <mips/atheros/ar71xx_cpudef.h>
66
67#undef	AR724X_PCI_DEBUG
68//#define AR724X_PCI_DEBUG
69#ifdef AR724X_PCI_DEBUG
70#define dprintf printf
71#else
72#define dprintf(x, arg...)
73#endif
74
75/*
76 * This is a PCI controller for the QCA955x and later SoCs.
77 * It needs to be aware of >1 PCIe host endpoints.
78 *
79 * XXX TODO; it may be nice to merge this with ar724x_pci.c;
80 * they're very similar.
81 */
82struct ar71xx_pci_irq {
83	struct ar71xx_pci_softc *sc;
84	int irq;
85};
86
87struct ar71xx_pci_softc {
88	device_t		sc_dev;
89
90	int			sc_busno;
91	struct rman		sc_mem_rman;
92	struct rman		sc_irq_rman;
93
94	uint32_t		sc_pci_reg_base;	/* XXX until bus stuff is done */
95	uint32_t		sc_pci_crp_base;	/* XXX until bus stuff is done */
96	uint32_t		sc_pci_ctrl_base;	/* XXX until bus stuff is done */
97	uint32_t		sc_pci_mem_base;	/* XXX until bus stuff is done */
98	uint32_t		sc_pci_membase_limit;
99
100	struct intr_event	*sc_eventstab[AR71XX_PCI_NIRQS];
101	mips_intrcnt_t		sc_intr_counter[AR71XX_PCI_NIRQS];
102	struct ar71xx_pci_irq	sc_pci_irq[AR71XX_PCI_NIRQS];
103	struct resource		*sc_irq;
104	void			*sc_ih;
105};
106
107static int qca955x_pci_setup_intr(device_t, device_t, struct resource *, int,
108		    driver_filter_t *, driver_intr_t *, void *, void **);
109static int qca955x_pci_teardown_intr(device_t, device_t, struct resource *,
110		    void *);
111static int qca955x_pci_intr(void *);
112
113static void
114qca955x_pci_write(uint32_t reg, uint32_t offset, uint32_t data, int bytes)
115{
116	uint32_t val, mask, shift;
117
118	/* Register access is 32-bit aligned */
119	shift = (offset & 3) * 8;
120	if (bytes % 4)
121		mask = (1 << (bytes * 8)) - 1;
122	else
123		mask = 0xffffffff;
124
125	val = ATH_READ_REG(reg + (offset & ~3));
126	val &= ~(mask << shift);
127	val |= ((data & mask) << shift);
128	ATH_WRITE_REG(reg + (offset & ~3), val);
129
130	dprintf("%s: %#x/%#x addr=%#x, data=%#x(%#x), bytes=%d\n", __func__,
131	    reg, reg + (offset & ~3), offset, data, val, bytes);
132}
133
134static uint32_t
135qca955x_pci_read_config(device_t dev, u_int bus, u_int slot, u_int func,
136    u_int reg, int bytes)
137{
138	struct ar71xx_pci_softc *sc = device_get_softc(dev);
139	uint32_t data, shift, mask;
140
141	/* Register access is 32-bit aligned */
142	shift = (reg & 3) * 8;
143
144	/* Create a mask based on the width, post-shift */
145	if (bytes == 2)
146		mask = 0xffff;
147	else if (bytes == 1)
148		mask = 0xff;
149	else
150		mask = 0xffffffff;
151
152	dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot,
153	    func, reg, bytes);
154
155	if ((bus == 0) && (slot == 0) && (func == 0))
156		data = ATH_READ_REG(sc->sc_pci_reg_base + (reg & ~3));
157	else
158		data = -1;
159
160	/* Get request bytes from 32-bit word */
161	data = (data >> shift) & mask;
162
163	dprintf("%s: read 0x%x\n", __func__, data);
164
165	return (data);
166}
167
168static void
169qca955x_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func,
170    u_int reg, uint32_t data, int bytes)
171{
172	struct ar71xx_pci_softc *sc = device_get_softc(dev);
173
174	dprintf("%s: tag (%x, %x, %x) reg %d(%d): %x\n", __func__, bus, slot,
175	    func, reg, bytes, data);
176
177	if ((bus != 0) || (slot != 0) || (func != 0))
178		return;
179
180	qca955x_pci_write(sc->sc_pci_reg_base, reg, data, bytes);
181}
182
183static void
184qca955x_pci_mask_irq(void *source)
185{
186	uint32_t reg;
187	struct ar71xx_pci_irq *pirq = source;
188	struct ar71xx_pci_softc *sc = pirq->sc;
189
190	/* XXX - Only one interrupt ? Only one device ? */
191	if (pirq->irq != AR71XX_PCI_IRQ_START)
192		return;
193
194	/* Update the interrupt mask reg */
195	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK);
196	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK,
197	    reg & ~QCA955X_PCI_INTR_DEV0);
198
199	/* Clear any pending interrupt */
200	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS);
201	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS,
202	    reg | QCA955X_PCI_INTR_DEV0);
203}
204
205static void
206qca955x_pci_unmask_irq(void *source)
207{
208	uint32_t reg;
209	struct ar71xx_pci_irq *pirq = source;
210	struct ar71xx_pci_softc *sc = pirq->sc;
211
212	if (pirq->irq != AR71XX_PCI_IRQ_START)
213		return;
214
215	/* Update the interrupt mask reg */
216	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK);
217	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK,
218	    reg | QCA955X_PCI_INTR_DEV0);
219}
220
221static int
222qca955x_pci_setup(device_t dev)
223{
224	struct ar71xx_pci_softc *sc = device_get_softc(dev);
225	uint32_t reg;
226
227	/* setup COMMAND register */
228	reg = PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN | PCIM_CMD_SERRESPEN |
229	    PCIM_CMD_BACKTOBACK | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN;
230
231	qca955x_pci_write(sc->sc_pci_crp_base, PCIR_COMMAND, reg, 2);
232
233	/* These are the memory/prefetch base/limit parameters */
234	qca955x_pci_write(sc->sc_pci_crp_base, 0x20, sc->sc_pci_membase_limit, 4);
235	qca955x_pci_write(sc->sc_pci_crp_base, 0x24, sc->sc_pci_membase_limit, 4);
236
237	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET);
238	if (reg != 0x7) {
239		DELAY(100000);
240		ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET, 0);
241		ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET);
242		DELAY(100);
243		ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET, 4);
244		ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET);
245		DELAY(100000);
246	}
247
248	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_APP, 0x1ffc1);
249	/* Flush write */
250	(void) ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_APP);
251
252	DELAY(1000);
253
254	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_RESET);
255	if ((reg & QCA955X_PCI_RESET_LINK_UP) == 0) {
256		device_printf(dev, "no PCIe controller found\n");
257		return (ENXIO);
258	}
259
260	return (0);
261}
262
263static int
264qca955x_pci_probe(device_t dev)
265{
266
267	return (BUS_PROBE_NOWILDCARD);
268}
269
270static int
271qca955x_pci_attach(device_t dev)
272{
273	struct ar71xx_pci_softc *sc = device_get_softc(dev);
274	int unit = device_get_unit(dev);
275	int rid = 0;
276
277	/* Dirty; maybe these could all just be hints */
278	if (unit == 0) {
279		sc->sc_pci_reg_base = QCA955X_PCI_CFG_BASE0;
280		sc->sc_pci_crp_base = QCA955X_PCI_CRP_BASE0;
281		sc->sc_pci_ctrl_base = QCA955X_PCI_CTRL_BASE0;
282		sc->sc_pci_mem_base = QCA955X_PCI_MEM_BASE0;
283		/* XXX verify */
284		sc->sc_pci_membase_limit = 0x11f01000;
285	} else if (unit == 1) {
286		sc->sc_pci_reg_base = QCA955X_PCI_CFG_BASE1;
287		sc->sc_pci_crp_base = QCA955X_PCI_CRP_BASE1;
288		sc->sc_pci_ctrl_base = QCA955X_PCI_CTRL_BASE1;
289		sc->sc_pci_mem_base = QCA955X_PCI_MEM_BASE1;
290		/* XXX verify */
291		sc->sc_pci_membase_limit = 0x12f01200;
292	} else {
293		device_printf(dev, "%s: invalid unit (%d)\n", __func__, unit);
294		return (ENXIO);
295	}
296
297	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
298	sc->sc_mem_rman.rm_descr = "qca955x PCI memory window";
299	if (rman_init(&sc->sc_mem_rman) != 0 ||
300	    rman_manage_region(&sc->sc_mem_rman,
301	    sc->sc_pci_mem_base,
302	    sc->sc_pci_mem_base + QCA955X_PCI_MEM_SIZE - 1) != 0) {
303		panic("qca955x_pci_attach: failed to set up I/O rman");
304	}
305
306	sc->sc_irq_rman.rm_type = RMAN_ARRAY;
307	sc->sc_irq_rman.rm_descr = "qca955x PCI IRQs";
308	if (rman_init(&sc->sc_irq_rman) != 0 ||
309	    rman_manage_region(&sc->sc_irq_rman, AR71XX_PCI_IRQ_START,
310	        AR71XX_PCI_IRQ_END) != 0)
311		panic("qca955x_pci_attach: failed to set up IRQ rman");
312
313	/* Disable interrupts */
314	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS, 0);
315	ATH_WRITE_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK, 0);
316
317	/* Hook up our interrupt handler. */
318	if ((sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
319	    RF_SHAREABLE | RF_ACTIVE)) == NULL) {
320		device_printf(dev, "unable to allocate IRQ resource\n");
321		return (ENXIO);
322	}
323
324	if ((bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC,
325			    qca955x_pci_intr, NULL, sc, &sc->sc_ih))) {
326		device_printf(dev,
327		    "WARNING: unable to register interrupt handler\n");
328		return (ENXIO);
329	}
330
331	/* Reset PCIe core and PCIe PHY */
332	ar71xx_device_stop(QCA955X_RESET_PCIE);
333	ar71xx_device_stop(QCA955X_RESET_PCIE_PHY);
334	DELAY(100);
335	ar71xx_device_start(QCA955X_RESET_PCIE_PHY);
336	ar71xx_device_start(QCA955X_RESET_PCIE);
337
338	if (qca955x_pci_setup(dev))
339		return (ENXIO);
340
341	/*
342	 * Write initial base address.
343	 *
344	 * I'm not yet sure why this is required and/or why it isn't
345	 * initialised like this.  The AR71xx PCI code initialises
346	 * the PCI windows for each device, but neither it or the
347	 * 724x PCI bridge modules explicitly initialise the BAR.
348	 *
349	 * So before this gets committed, have a chat with jhb@ or
350	 * someone else who knows PCI well and figure out whether
351	 * the initial BAR is supposed to be determined by /other/
352	 * means.
353	 */
354	qca955x_pci_write_config(dev, 0, 0, 0, PCIR_BAR(0),
355	    sc->sc_pci_mem_base,
356	    4);
357
358	/* Fixup internal PCI bridge */
359	qca955x_pci_write_config(dev, 0, 0, 0, PCIR_COMMAND,
360            PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN
361	    | PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK
362	    | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2);
363
364	device_add_child(dev, "pci", -1);
365	return (bus_generic_attach(dev));
366}
367
368static int
369qca955x_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
370{
371	struct ar71xx_pci_softc *sc = device_get_softc(dev);
372
373	switch (which) {
374	case PCIB_IVAR_DOMAIN:
375		*result = 0;
376		return (0);
377	case PCIB_IVAR_BUS:
378		*result = sc->sc_busno;
379		return (0);
380	}
381
382	return (ENOENT);
383}
384
385static int
386qca955x_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
387{
388	struct ar71xx_pci_softc * sc = device_get_softc(dev);
389
390	switch (which) {
391	case PCIB_IVAR_BUS:
392		sc->sc_busno = result;
393		return (0);
394	}
395
396	return (ENOENT);
397}
398
399static struct resource *
400qca955x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
401    u_long start, u_long end, u_long count, u_int flags)
402{
403	struct ar71xx_pci_softc *sc = device_get_softc(bus);
404	struct resource *rv;
405	struct rman *rm;
406
407	switch (type) {
408	case SYS_RES_IRQ:
409		rm = &sc->sc_irq_rman;
410		break;
411	case SYS_RES_MEMORY:
412		rm = &sc->sc_mem_rman;
413		break;
414	default:
415		return (NULL);
416	}
417
418	rv = rman_reserve_resource(rm, start, end, count, flags, child);
419
420	if (rv == NULL)
421		return (NULL);
422
423	rman_set_rid(rv, *rid);
424
425	if (flags & RF_ACTIVE) {
426		if (bus_activate_resource(child, type, *rid, rv)) {
427			rman_release_resource(rv);
428			return (NULL);
429		}
430	}
431
432	return (rv);
433}
434
435static int
436qca955x_pci_activate_resource(device_t bus, device_t child, int type, int rid,
437    struct resource *r)
438{
439	int res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus),
440	    child, type, rid, r));
441
442	if (!res) {
443		switch(type) {
444		case SYS_RES_MEMORY:
445		case SYS_RES_IOPORT:
446
447			rman_set_bustag(r, ar71xx_bus_space_pcimem);
448			break;
449		}
450	}
451
452	return (res);
453}
454
455static int
456qca955x_pci_setup_intr(device_t bus, device_t child, struct resource *ires,
457		int flags, driver_filter_t *filt, driver_intr_t *handler,
458		void *arg, void **cookiep)
459{
460	struct ar71xx_pci_softc *sc = device_get_softc(bus);
461	struct intr_event *event;
462	int irq, error;
463
464	irq = rman_get_start(ires);
465	if (irq > AR71XX_PCI_IRQ_END)
466		panic("%s: bad irq %d", __func__, irq);
467
468	event = sc->sc_eventstab[irq];
469	if (event == NULL) {
470		sc->sc_pci_irq[irq].sc = sc;
471		sc->sc_pci_irq[irq].irq = irq;
472		error = intr_event_create(&event, (void *)&sc->sc_pci_irq[irq],
473		    0, irq,
474		    qca955x_pci_mask_irq,
475		    qca955x_pci_unmask_irq,
476		    NULL, NULL,
477		    "pci intr%d:", irq);
478
479		if (error == 0) {
480			sc->sc_eventstab[irq] = event;
481			sc->sc_intr_counter[irq] =
482			    mips_intrcnt_create(event->ie_name);
483		}
484		else
485			return error;
486	}
487
488	intr_event_add_handler(event, device_get_nameunit(child), filt,
489	    handler, arg, intr_priority(flags), flags, cookiep);
490	mips_intrcnt_setname(sc->sc_intr_counter[irq], event->ie_fullname);
491
492	qca955x_pci_unmask_irq(&sc->sc_pci_irq[irq]);
493
494	return (0);
495}
496
497static int
498qca955x_pci_teardown_intr(device_t dev, device_t child, struct resource *ires,
499    void *cookie)
500{
501	struct ar71xx_pci_softc *sc = device_get_softc(dev);
502	int irq, result;
503
504	irq = rman_get_start(ires);
505	if (irq > AR71XX_PCI_IRQ_END)
506		panic("%s: bad irq %d", __func__, irq);
507
508	if (sc->sc_eventstab[irq] == NULL)
509		panic("Trying to teardown unoccupied IRQ");
510
511	qca955x_pci_mask_irq(&sc->sc_pci_irq[irq]);
512
513	result = intr_event_remove_handler(cookie);
514	if (!result)
515		sc->sc_eventstab[irq] = NULL;
516
517	return (result);
518}
519
520static int
521qca955x_pci_intr(void *arg)
522{
523	struct ar71xx_pci_softc *sc = arg;
524	struct intr_event *event;
525	uint32_t reg, irq, mask;
526
527	/* There's only one PCIe DDR flush for both PCIe EPs */
528	ar71xx_device_flush_ddr(AR71XX_CPU_DDR_FLUSH_PCIE);
529
530	reg = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_STATUS);
531	mask = ATH_READ_REG(sc->sc_pci_ctrl_base + QCA955X_PCI_INTR_MASK);
532
533	/*
534	 * Handle only unmasked interrupts
535	 */
536	reg &= mask;
537	/*
538	 * XXX TODO: handle >1 PCIe end point!
539	 */
540	if (reg & QCA955X_PCI_INTR_DEV0) {
541		irq = AR71XX_PCI_IRQ_START;
542		event = sc->sc_eventstab[irq];
543		if (!event || TAILQ_EMPTY(&event->ie_handlers)) {
544			printf("Stray IRQ %d\n", irq);
545			return (FILTER_STRAY);
546		}
547
548		/* TODO: frame instead of NULL? */
549		intr_event_handle(event, NULL);
550		mips_intrcnt_inc(sc->sc_intr_counter[irq]);
551	}
552
553	return (FILTER_HANDLED);
554}
555
556static int
557qca955x_pci_maxslots(device_t dev)
558{
559
560	return (PCI_SLOTMAX);
561}
562
563static int
564qca955x_pci_route_interrupt(device_t pcib, device_t device, int pin)
565{
566
567	return (pci_get_slot(device));
568}
569
570static device_method_t qca955x_pci_methods[] = {
571	/* Device interface */
572	DEVMETHOD(device_probe,		qca955x_pci_probe),
573	DEVMETHOD(device_attach,	qca955x_pci_attach),
574	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
575	DEVMETHOD(device_suspend,	bus_generic_suspend),
576	DEVMETHOD(device_resume,	bus_generic_resume),
577
578	/* Bus interface */
579	DEVMETHOD(bus_read_ivar,	qca955x_pci_read_ivar),
580	DEVMETHOD(bus_write_ivar,	qca955x_pci_write_ivar),
581	DEVMETHOD(bus_alloc_resource,	qca955x_pci_alloc_resource),
582	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
583	DEVMETHOD(bus_activate_resource, qca955x_pci_activate_resource),
584	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
585	DEVMETHOD(bus_setup_intr,	qca955x_pci_setup_intr),
586	DEVMETHOD(bus_teardown_intr,	qca955x_pci_teardown_intr),
587
588	/* pcib interface */
589	DEVMETHOD(pcib_maxslots,	qca955x_pci_maxslots),
590	DEVMETHOD(pcib_read_config,	qca955x_pci_read_config),
591	DEVMETHOD(pcib_write_config,	qca955x_pci_write_config),
592	DEVMETHOD(pcib_route_interrupt,	qca955x_pci_route_interrupt),
593
594	DEVMETHOD_END
595};
596
597static driver_t qca955x_pci_driver = {
598	"pcib",
599	qca955x_pci_methods,
600	sizeof(struct ar71xx_pci_softc),
601};
602
603static devclass_t qca955x_pci_devclass;
604
605DRIVER_MODULE(qca955x_pci, nexus, qca955x_pci_driver, qca955x_pci_devclass, 0, 0);
606DRIVER_MODULE(qca955x_pci, apb, qca955x_pci_driver, qca955x_pci_devclass, 0, 0);
607