Deleted Added
full compact
pccbb_pci.c (238954) pccbb_pci.c (254263)
1/*-
2 * Copyright (c) 2002-2004 M. Warner Losh.
3 * Copyright (c) 2000-2001 Jonathan Chen.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

67 * The author would like to acknowledge:
68 * * HAYAKAWA Koichi: Author of the NetBSD code for the same thing
69 * * Warner Losh: Newbus/newcard guru and author of the pccard side of things
70 * * YAMAMOTO Shigeru: Author of another FreeBSD cardbus driver
71 * * David Cross: Author of the initial ugly hack for a specific cardbus card
72 */
73
74#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2004 M. Warner Losh.
3 * Copyright (c) 2000-2001 Jonathan Chen.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

67 * The author would like to acknowledge:
68 * * HAYAKAWA Koichi: Author of the NetBSD code for the same thing
69 * * Warner Losh: Newbus/newcard guru and author of the pccard side of things
70 * * YAMAMOTO Shigeru: Author of another FreeBSD cardbus driver
71 * * David Cross: Author of the initial ugly hack for a specific cardbus card
72 */
73
74#include <sys/cdefs.h>
75__FBSDID("$FreeBSD: head/sys/dev/pccbb/pccbb_pci.c 238954 2012-07-31 18:47:17Z adrian $");
75__FBSDID("$FreeBSD: head/sys/dev/pccbb/pccbb_pci.c 254263 2013-08-12 23:30:01Z scottl $");
76
77#include <sys/param.h>
78#include <sys/systm.h>
79#include <sys/proc.h>
80#include <sys/condvar.h>
81#include <sys/errno.h>
82#include <sys/kernel.h>
83#include <sys/lock.h>

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

466 pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1);
467
468 /* Restore bus configuration */
469 pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1);
470 pci_write_config(sc->dev, PCIR_SECBUS_2, sc->secbus, 1);
471 pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1);
472
473 /* Enable memory access */
76
77#include <sys/param.h>
78#include <sys/systm.h>
79#include <sys/proc.h>
80#include <sys/condvar.h>
81#include <sys/errno.h>
82#include <sys/kernel.h>
83#include <sys/lock.h>

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

466 pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1);
467
468 /* Restore bus configuration */
469 pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1);
470 pci_write_config(sc->dev, PCIR_SECBUS_2, sc->secbus, 1);
471 pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1);
472
473 /* Enable memory access */
474 PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND,
475 | PCIM_CMD_MEMEN
476 | PCIM_CMD_PORTEN
477 | PCIM_CMD_BUSMASTEREN, 2);
474 pci_enable_busmaster(sc->dev);
478
479 /* disable Legacy IO */
480 switch (sc->chipset) {
481 case CB_RF5C46X:
482 PCI_MASK_CONFIG(sc->dev, CBBR_BRIDGECTRL,
483 & ~(CBBM_BRIDGECTRL_RL_3E0_EN |
484 CBBM_BRIDGECTRL_RL_3E2_EN), 2);
485 break;

--- 381 unchanged lines hidden ---
475
476 /* disable Legacy IO */
477 switch (sc->chipset) {
478 case CB_RF5C46X:
479 PCI_MASK_CONFIG(sc->dev, CBBR_BRIDGECTRL,
480 & ~(CBBM_BRIDGECTRL_RL_3E0_EN |
481 CBBM_BRIDGECTRL_RL_3E2_EN), 2);
482 break;

--- 381 unchanged lines hidden ---