Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Like some other TI SDHCI parts, PCI_PRODUCT_TI_P...
details: https://anonhg.NetBSD.org/src/rev/ccd51bdcf441
branches: trunk
changeset: 761598:ccd51bdcf441
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Feb 02 04:18:14 2011 +0000
description:
Like some other TI SDHCI parts, PCI_PRODUCT_TI_PCIXX12SD also needs the SD
card moved to the SDHCI controller.
diffstat:
sys/dev/pci/sdhc_pci.c | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r d57a7997dbba -r ccd51bdcf441 sys/dev/pci/sdhc_pci.c
--- a/sys/dev/pci/sdhc_pci.c Wed Feb 02 03:00:44 2011 +0000
+++ b/sys/dev/pci/sdhc_pci.c Wed Feb 02 04:18:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc_pci.c,v 1.3 2009/10/02 04:38:47 uebayasi Exp $ */
+/* $NetBSD: sdhc_pci.c,v 1.4 2011/02/02 04:18:14 jakllsch Exp $ */
/* $OpenBSD: sdhc_pci.c,v 1.7 2007/10/30 18:13:45 chl Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.3 2009/10/02 04:38:47 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_pci.c,v 1.4 2011/02/02 04:18:14 jakllsch Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -89,6 +89,15 @@
},
{
+ PCI_VENDOR_TI,
+ PCI_PRODUCT_TI_PCIXX12SD,
+ 0xffff,
+ 0xffff,
+ 3,
+ SDHC_PCI_QUIRK_TI_HACK
+ },
+
+ {
PCI_VENDOR_ENE,
PCI_PRODUCT_ENE_CB712,
0xffff,
@@ -278,11 +287,19 @@
pcitag_t tag;
pcireg_t id, reg;
- /* Look at func 3 for the flash device */
- tag = pci_make_tag(pc, pa->pa_bus, pa->pa_device, 3);
+ /* Look at func - 1 for the flash device */
+ tag = pci_make_tag(pc, pa->pa_bus, pa->pa_device, pa->pa_function - 1);
id = pci_conf_read(pc, tag, PCI_ID_REG);
- if (PCI_PRODUCT(id) != PCI_PRODUCT_TI_PCI72111FM)
+ if (PCI_VENDOR(id) != PCI_VENDOR_TI) {
return;
+ }
+ switch (PCI_PRODUCT(id)) {
+ case PCI_PRODUCT_TI_PCI72111FM:
+ case PCI_PRODUCT_TI_PCIXX12FM:
+ break;
+ default:
+ return;
+ }
/*
* Disable MMC/SD on the flash media controller so the
Home |
Main Index |
Thread Index |
Old Index