svn commit: r185623 - head/sys/dev/pccbb
Warner Losh
imp at FreeBSD.org
Thu Dec 4 20:46:26 PST 2008
Author: imp
Date: Fri Dec 5 04:46:26 2008
New Revision: 185623
URL: http://svn.freebsd.org/changeset/base/185623
Log:
Augment comments, and move things around a smidge.
Modified:
head/sys/dev/pccbb/pccbb.c
Modified: head/sys/dev/pccbb/pccbb.c
==============================================================================
--- head/sys/dev/pccbb/pccbb.c Fri Dec 5 04:43:25 2008 (r185622)
+++ head/sys/dev/pccbb/pccbb.c Fri Dec 5 04:46:26 2008 (r185623)
@@ -946,32 +946,32 @@ cbb_cardbus_reset(device_t brdev, device
/*
* Asserting reset for 20ms is necessary for most bridges. For some
- * reason, the Ricoh RF5C47x bridges need it asserted for 400ms.
+ * reason, the Ricoh RF5C47x bridges need it asserted for 400ms. The
+ * root cause of this is unknown, and NetBSD does the same thing.
*/
delay = sc->chipset == CB_RF5C47X ? 400 : 20;
PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, |CBBM_BRIDGECTRL_RESET, 2);
pause("cbbP3", hz * delay / 1000);
/*
- * If a card exists and we're turning it on, take it out of reset.
+ * If a card exists and we're turning it on, take it out of reset.
+ * After clearing reset, wait up to 1.1s for the first configuration
+ * register (vendor/product) configuration register of device 0.0 to
+ * become != 0xffffffff. The PCMCIA PC Card Host System Specification
+ * says that when powering up the card, the PCI Spec v2.1 must be
+ * followed. In PCI spec v2.2 Table 4-6, Trhfa (Reset High to first
+ * Config Access) is at most 2^25 clocks, or just over 1s. Section
+ * 2.2.1 states any card not ready to participate in bus transactions
+ * must tristate its outputs. Therefore, any access to its
+ * configuration registers must be ignored. In that state, the config
+ * reg will read 0xffffffff. Section 6.2.1 states a vendor id of
+ * 0xffff is invalid, so this can never match a real card. Print a
+ * warning if it never returns a real id. The PCMCIA PC Card
+ * Electrical Spec Section 5.2.7.1 implies only device 0 is present on
+ * a cardbus bus, so that's the only register we check here.
*/
if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) {
/*
- * After clearing reset, wait up to 1.1s for the first
- * configuration register (vendor/product) configuration
- * register of device 0.0 to become != 0xffffffff. The PCMCIA
- * PC Card Host System Specification says that when powering
- * up the card, the PCI Spec v2.1 must be followed. In PCI
- * spec v2.2 Table 4-6, Trhfa (Reset High to first Config
- * Access) is at most 2^25 clocks, or just over 1s. Section
- * 2.2.1 states any card not ready to participate in bus
- * transactions must tristate its outputs. Therefore, any
- * access to its configuration registers must be ignored. In
- * that state, the config reg will read 0xffffffff. Section
- * 6.2.1 states a vendor id of 0xffff is invalid, so this can
- * never match a real card. Print a warning if it never
- * returns a real id. The PCMCIA PC Card Electrical Spec
- * Section 5.2.7.1 implies only device 0.
*/
PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL,
&~CBBM_BRIDGECTRL_RESET, 2);
More information about the svn-src-head
mailing list