s3_pci.c (6a068746777241722b2b32c5d0bc443a2a64d80b) s3_pci.c (43cd61606b6bfae52bb09856277751103bfa28fd)
1/*-
2 * Copyright (c) 2000 Alcove - Nicolas Souchu <nsouch@freebsd.org>
3 * All rights reserved.
4 *
5 * Code based on Peter Horton <pdh@colonel-panic.com> patch.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 464 unchanged lines hidden (view full) ---

473 if (s3pci_dev) {
474 printf("%s: driver already attached!\n", __func__);
475 goto error;
476 }
477
478 /* Allocate resources
479 */
480 rid = 0;
1/*-
2 * Copyright (c) 2000 Alcove - Nicolas Souchu <nsouch@freebsd.org>
3 * All rights reserved.
4 *
5 * Code based on Peter Horton <pdh@colonel-panic.com> patch.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 464 unchanged lines hidden (view full) ---

473 if (s3pci_dev) {
474 printf("%s: driver already attached!\n", __func__);
475 goto error;
476 }
477
478 /* Allocate resources
479 */
480 rid = 0;
481 if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
482 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
481 if (!(sc->port_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
482 RF_ACTIVE | RF_SHAREABLE))) {
483 printf("%s: port resource allocation failed!\n", __func__);
484 goto error;
485 }
486 sc->st = rman_get_bustag(sc->port_res);
487 sc->sh = rman_get_bushandle(sc->port_res);
488
489 rid = 1;
483 printf("%s: port resource allocation failed!\n", __func__);
484 goto error;
485 }
486 sc->st = rman_get_bustag(sc->port_res);
487 sc->sh = rman_get_bushandle(sc->port_res);
488
489 rid = 1;
490 if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
491 0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) {
490 if (!(sc->enh_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
491 RF_ACTIVE | RF_SHAREABLE))) {
492 printf("%s: enhanced port resource allocation failed!\n",
493 __func__);
494 goto error;
495 }
496 sc->enh_st = rman_get_bustag(sc->enh_res);
497 sc->enh_sh = rman_get_bushandle(sc->enh_res);
498
499 rid = PCI_BASE_MEMORY;

--- 68 unchanged lines hidden ---
492 printf("%s: enhanced port resource allocation failed!\n",
493 __func__);
494 goto error;
495 }
496 sc->enh_st = rman_get_bustag(sc->enh_res);
497 sc->enh_sh = rman_get_bushandle(sc->enh_res);
498
499 rid = PCI_BASE_MEMORY;

--- 68 unchanged lines hidden ---