Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/cardbus Phase out some CardBus constants and types. ...
details: https://anonhg.NetBSD.org/src/rev/6ea03c6c71bc
branches: trunk
changeset: 752428:6ea03c6c71bc
user: dyoung <dyoung%NetBSD.org@localhost>
date: Thu Feb 25 21:18:35 2010 +0000
description:
Phase out some CardBus constants and types. Use the equivalent PCI
constants and types, instead:
CARDBUS_CLASS_REG -> PCI_CLASS_REG
CARDBUS_ID_REG -> PCI_ID_REG
cardbus_product_id_t -> pci_product_id_t
cardbus_vendor_id_t -> pci_vendor_id_t
diffstat:
sys/dev/cardbus/cardbus.c | 10 +++++-----
sys/dev/cardbus/cardbusreg.h | 9 +--------
sys/dev/cardbus/njata_cardbus.c | 8 ++++----
sys/dev/cardbus/njs_cardbus.c | 8 ++++----
sys/dev/cardbus/siisata_cardbus.c | 8 ++++----
5 files changed, 18 insertions(+), 25 deletions(-)
diffs (155 lines):
diff -r 0bf120bcc77e -r 6ea03c6c71bc sys/dev/cardbus/cardbus.c
--- a/sys/dev/cardbus/cardbus.c Thu Feb 25 21:13:07 2010 +0000
+++ b/sys/dev/cardbus/cardbus.c Thu Feb 25 21:18:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbus.c,v 1.103 2010/02/25 00:47:39 dyoung Exp $ */
+/* $NetBSD: cardbus.c,v 1.104 2010/02/25 21:18:35 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998, 1999 and 2000
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.103 2010/02/25 00:47:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.104 2010/02/25 21:18:35 dyoung Exp $");
#include "opt_cardbus.h"
@@ -460,7 +460,7 @@
int i;
for (i = 0; i < 5; ++i) {
- id = cardbus_conf_read(cc, cf, tag, CARDBUS_ID_REG);
+ id = cardbus_conf_read(cc, cf, tag, PCI_ID_REG);
if (id != 0xffffffff && id != 0) {
break;
}
@@ -497,8 +497,8 @@
tag = cardbus_make_tag(cc, cf, sc->sc_bus, function);
- id = cardbus_conf_read(cc, cf, tag, CARDBUS_ID_REG);
- class = cardbus_conf_read(cc, cf, tag, CARDBUS_CLASS_REG);
+ id = cardbus_conf_read(cc, cf, tag, PCI_ID_REG);
+ class = cardbus_conf_read(cc, cf, tag, PCI_CLASS_REG);
cis_ptr = cardbus_conf_read(cc, cf, tag, CARDBUS_CIS_REG);
/* Invalid vendor ID value? */
diff -r 0bf120bcc77e -r 6ea03c6c71bc sys/dev/cardbus/cardbusreg.h
--- a/sys/dev/cardbus/cardbusreg.h Thu Feb 25 21:13:07 2010 +0000
+++ b/sys/dev/cardbus/cardbusreg.h Thu Feb 25 21:18:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbusreg.h,v 1.4 2010/02/24 23:38:40 dyoung Exp $ */
+/* $NetBSD: cardbusreg.h,v 1.5 2010/02/25 21:18:35 dyoung Exp $ */
/*
* Copyright (c) 2001
@@ -33,11 +33,6 @@
typedef int cardbus_intr_line_t;
-#define CARDBUS_ID_REG 0x00
-
-typedef u_int16_t cardbus_vendor_id_t;
-typedef u_int16_t cardbus_product_id_t;
-
# define CARDBUS_VENDOR_SHIFT 0
# define CARDBUS_VENDOR_MASK 0xffff
# define CARDBUS_VENDOR(id) \
@@ -63,8 +58,6 @@
# define CARDBUS_COMMAND_BACKTOBACK_ENABLE 0x00000200
-#define CARDBUS_CLASS_REG 0x08
-
#define CARDBUS_CLASS_SHIFT 24
#define CARDBUS_CLASS_MASK 0xff
#define CARDBUS_CLASS(cr) \
diff -r 0bf120bcc77e -r 6ea03c6c71bc sys/dev/cardbus/njata_cardbus.c
--- a/sys/dev/cardbus/njata_cardbus.c Thu Feb 25 21:13:07 2010 +0000
+++ b/sys/dev/cardbus/njata_cardbus.c Thu Feb 25 21:18:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $Id: njata_cardbus.c,v 1.9 2010/02/24 19:52:52 dyoung Exp $ */
+/* $Id: njata_cardbus.c,v 1.10 2010/02/25 21:18:35 dyoung Exp $ */
/*
* Copyright (c) 2006 ITOH Yasufumi <itohy%NetBSD.org@localhost>.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: njata_cardbus.c,v 1.9 2010/02/24 19:52:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: njata_cardbus.c,v 1.10 2010/02/25 21:18:35 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,8 +71,8 @@
njata_cardbus_match, njata_cardbus_attach, njata_cardbus_detach, NULL);
static const struct njata32_cardbus_product {
- cardbus_vendor_id_t p_vendor;
- cardbus_product_id_t p_product;
+ pci_vendor_id_t p_vendor;
+ pci_product_id_t p_product;
uint8_t p_flags;
#define NJATA32_FL_IOMAP_ONLY 1 /* registers are only in the I/O map */
} njata32_cardbus_products[] = {
diff -r 0bf120bcc77e -r 6ea03c6c71bc sys/dev/cardbus/njs_cardbus.c
--- a/sys/dev/cardbus/njs_cardbus.c Thu Feb 25 21:13:07 2010 +0000
+++ b/sys/dev/cardbus/njs_cardbus.c Thu Feb 25 21:18:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: njs_cardbus.c,v 1.12 2010/02/24 19:52:52 dyoung Exp $ */
+/* $NetBSD: njs_cardbus.c,v 1.13 2010/02/25 21:18:35 dyoung Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: njs_cardbus.c,v 1.12 2010/02/24 19:52:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: njs_cardbus.c,v 1.13 2010/02/25 21:18:35 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -72,8 +72,8 @@
njs_cardbus_match, njs_cardbus_attach, njs_cardbus_detach, NULL);
static const struct njsc32_cardbus_product {
- cardbus_vendor_id_t p_vendor;
- cardbus_product_id_t p_product;
+ pci_vendor_id_t p_vendor;
+ pci_product_id_t p_product;
njsc32_model_t p_model;
int p_clk; /* one of NJSC32_CLK_* */
} njsc32_cardbus_products[] = {
diff -r 0bf120bcc77e -r 6ea03c6c71bc sys/dev/cardbus/siisata_cardbus.c
--- a/sys/dev/cardbus/siisata_cardbus.c Thu Feb 25 21:13:07 2010 +0000
+++ b/sys/dev/cardbus/siisata_cardbus.c Thu Feb 25 21:18:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_cardbus.c,v 1.7 2010/02/25 20:36:31 dyoung Exp $ */
+/* $NetBSD: siisata_cardbus.c,v 1.8 2010/02/25 21:18:35 dyoung Exp $ */
/* Id: siisata_pci.c,v 1.11 2008/05/21 16:20:11 jakllsch Exp */
/*
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata_cardbus.c,v 1.7 2010/02/25 20:36:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata_cardbus.c,v 1.8 2010/02/25 21:18:35 dyoung Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -86,8 +86,8 @@
static bool siisata_cardbus_resume(device_t, const pmf_qual_t *);
static const struct siisata_cardbus_product {
- cardbus_vendor_id_t scp_vendor;
- cardbus_product_id_t scp_product;
+ pci_vendor_id_t scp_vendor;
+ pci_product_id_t scp_product;
int scp_ports;
int scp_chip;
Home |
Main Index |
Thread Index |
Old Index