summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-01-27 05:47:01 +0000
committerimp <imp@FreeBSD.org>2003-01-27 05:47:01 +0000
commit9527a0b0213657fdcc71dbc45effa68b47ffec2a (patch)
treeee9b8710c353521b1ef1269c65fc2f59db78b07f
parentd966c96567a802e5d00e7fc9ff0a85cc3b0e51aa (diff)
downloadFreeBSD-src-9527a0b0213657fdcc71dbc45effa68b47ffec2a.zip
FreeBSD-src-9527a0b0213657fdcc71dbc45effa68b47ffec2a.tar.gz
MFp4:
u_int*_t -> uint*_t to conform more closely with C99.
-rw-r--r--sys/dev/cardbus/cardbus.c28
-rw-r--r--sys/dev/cardbus/cardbus_cis.c74
-rw-r--r--sys/dev/cardbus/cardbus_cis.h2
-rw-r--r--sys/dev/cardbus/cardbusvar.h22
4 files changed, 63 insertions, 63 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index b87e7a8..f231558 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -89,7 +89,7 @@ static int cardbus_child_location_str(device_t cbdev, device_t child,
static int cardbus_child_pnpinfo_str(device_t cbdev, device_t child,
char *, size_t len);
static __inline void cardbus_clear_command_bit(device_t cbdev, device_t child,
- u_int16_t bit);
+ uint16_t bit);
static void cardbus_delete_resource(device_t cbdev, device_t child,
int type, int rid);
static void cardbus_delete_resource_method(device_t cbdev, device_t child,
@@ -122,7 +122,7 @@ static void cardbus_probe_nomatch(device_t cbdev, device_t child);
static struct cardbus_devinfo *cardbus_read_device(device_t brdev, int b,
int s, int f);
static void cardbus_read_extcap(device_t cbdev, pcicfgregs *cfg);
-static u_int32_t cardbus_read_config_method(device_t cbdev,
+static uint32_t cardbus_read_config_method(device_t cbdev,
device_t child, int reg, int width);
static int cardbus_read_ivar(device_t cbdev, device_t child, int which,
u_long *result);
@@ -131,7 +131,7 @@ static void cardbus_release_all_resources(device_t cbdev,
static int cardbus_release_resource(device_t cbdev, device_t child,
int type, int rid, struct resource *r);
static __inline void cardbus_set_command_bit(device_t cbdev, device_t child,
- u_int16_t bit);
+ uint16_t bit);
static int cardbus_set_powerstate_method(device_t cbdev, device_t child,
int state);
static int cardbus_set_resource(device_t cbdev, device_t child, int type,
@@ -144,7 +144,7 @@ static int cardbus_setup_intr(device_t cbdev, device_t child,
static int cardbus_teardown_intr(device_t cbdev, device_t child,
struct resource *irq, void *cookie);
static void cardbus_write_config_method(device_t cbdev, device_t child,
- int reg, u_int32_t val, int width);
+ int reg, uint32_t val, int width);
static int cardbus_write_ivar(device_t cbdev, device_t child, int which,
uintptr_t value);
@@ -952,10 +952,10 @@ cardbus_read_ivar(device_t cbdev, device_t child, int which, u_long *result)
* we set the return value, then return an error.
*/
if ((dinfo->fepresent & (1 << TPL_FUNCE_LAN_NID)) == 0) {
- *((u_int8_t **) result) = NULL;
+ *((uint8_t **) result) = NULL;
return (EINVAL);
}
- *((u_int8_t **) result) = dinfo->funce.lan.nid;
+ *((uint8_t **) result) = dinfo->funce.lan.nid;
break;
case PCI_IVAR_SUBVENDOR:
*result = cfg->subvendor;
@@ -1049,7 +1049,7 @@ cardbus_set_powerstate_method(device_t cbdev, device_t child, int state)
{
struct cardbus_devinfo *dinfo = device_get_ivars(child);
pcicfgregs *cfg = &dinfo->pci.cfg;
- u_int16_t status;
+ uint16_t status;
int result;
if (cfg->pp_cap != 0) {
@@ -1094,7 +1094,7 @@ cardbus_get_powerstate_method(device_t cbdev, device_t child)
{
struct cardbus_devinfo *dinfo = device_get_ivars(child);
pcicfgregs *cfg = &dinfo->pci.cfg;
- u_int16_t status;
+ uint16_t status;
int result;
if (cfg->pp_cap != 0) {
@@ -1123,7 +1123,7 @@ cardbus_get_powerstate_method(device_t cbdev, device_t child)
return (result);
}
-static u_int32_t
+static uint32_t
cardbus_read_config_method(device_t cbdev, device_t child, int reg, int width)
{
struct cardbus_devinfo *dinfo = device_get_ivars(child);
@@ -1135,7 +1135,7 @@ cardbus_read_config_method(device_t cbdev, device_t child, int reg, int width)
static void
cardbus_write_config_method(device_t cbdev, device_t child, int reg,
- u_int32_t val, int width)
+ uint32_t val, int width)
{
struct cardbus_devinfo *dinfo = device_get_ivars(child);
pcicfgregs *cfg = &dinfo->pci.cfg;
@@ -1145,9 +1145,9 @@ cardbus_write_config_method(device_t cbdev, device_t child, int reg,
}
static __inline void
-cardbus_set_command_bit(device_t cbdev, device_t child, u_int16_t bit)
+cardbus_set_command_bit(device_t cbdev, device_t child, uint16_t bit)
{
- u_int16_t command;
+ uint16_t command;
command = PCI_READ_CONFIG(cbdev, child, PCIR_COMMAND, 2);
command |= bit;
@@ -1155,9 +1155,9 @@ cardbus_set_command_bit(device_t cbdev, device_t child, u_int16_t bit)
}
static __inline void
-cardbus_clear_command_bit(device_t cbdev, device_t child, u_int16_t bit)
+cardbus_clear_command_bit(device_t cbdev, device_t child, uint16_t bit)
{
- u_int16_t command;
+ uint16_t command;
command = PCI_READ_CONFIG(cbdev, child, PCIR_COMMAND, 2);
command &= ~bit;
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index 9bee096..6654557 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -59,7 +59,7 @@ extern int cardbus_cis_debug;
#define DECODE_PARAMS \
(device_t cbdev, device_t child, int id, int len, \
- u_int8_t *tupledata, u_int32_t start, u_int32_t *off, \
+ uint8_t *tupledata, uint32_t start, uint32_t *off, \
struct tuple_callbacks *info)
struct tuple_callbacks {
@@ -81,21 +81,21 @@ DECODE_PROTOTYPE(bar);
DECODE_PROTOTYPE(unhandled);
DECODE_PROTOTYPE(end);
static int cardbus_read_tuple_conf(device_t cbdev, device_t child,
- u_int32_t start, u_int32_t *off, int *tupleid, int *len,
- u_int8_t *tupledata);
+ uint32_t start, uint32_t *off, int *tupleid, int *len,
+ uint8_t *tupledata);
static int cardbus_read_tuple_mem(device_t cbdev, struct resource *res,
- u_int32_t start, u_int32_t *off, int *tupleid, int *len,
- u_int8_t *tupledata);
+ uint32_t start, uint32_t *off, int *tupleid, int *len,
+ uint8_t *tupledata);
static int cardbus_read_tuple(device_t cbdev, device_t child,
- struct resource *res, u_int32_t start, u_int32_t *off,
- int *tupleid, int *len, u_int8_t *tupledata);
+ struct resource *res, uint32_t start, uint32_t *off,
+ int *tupleid, int *len, uint8_t *tupledata);
static void cardbus_read_tuple_finish(device_t cbdev, device_t child,
int rid, struct resource *res);
static struct resource *cardbus_read_tuple_init(device_t cbdev, device_t child,
- u_int32_t *start, int *rid);
+ uint32_t *start, int *rid);
static int decode_tuple(device_t cbdev, device_t child, int tupleid,
- int len, u_int8_t *tupledata, u_int32_t start,
- u_int32_t *off, struct tuple_callbacks *callbacks);
+ int len, uint8_t *tupledata, uint32_t start,
+ uint32_t *off, struct tuple_callbacks *callbacks);
static int cardbus_parse_cis(device_t cbdev, device_t child,
struct tuple_callbacks *callbacks);
static int barsort(const void *a, const void *b);
@@ -120,7 +120,7 @@ static char *funcnames[] = {
};
struct cardbus_quirk {
- u_int32_t devid; /* Vendor/device of the card */
+ uint32_t devid; /* Vendor/device of the card */
int type;
#define CARDBUS_QUIRK_MAP_REG 1 /* PCI map register in weird place */
int arg1;
@@ -331,14 +331,14 @@ DECODE_PROTOTYPE(bar)
struct cardbus_devinfo *dinfo = device_get_ivars(child);
int type;
int reg;
- u_int32_t bar;
+ uint32_t bar;
if (len != 6) {
printf("*** ERROR *** BAR length not 6 (%d)\n", len);
return (EINVAL);
}
- reg = *(u_int16_t*)tupledata;
- len = *(u_int32_t*)(tupledata + 2);
+ reg = *(uint16_t*)tupledata;
+ len = *(uint32_t*)(tupledata + 2);
if (reg & TPL_BAR_REG_AS) {
type = SYS_RES_IOPORT;
} else {
@@ -395,12 +395,12 @@ DECODE_PROTOTYPE(end)
*/
static int
-cardbus_read_tuple_conf(device_t cbdev, device_t child, u_int32_t start,
- u_int32_t *off, int *tupleid, int *len, u_int8_t *tupledata)
+cardbus_read_tuple_conf(device_t cbdev, device_t child, uint32_t start,
+ uint32_t *off, int *tupleid, int *len, uint8_t *tupledata)
{
int i, j;
- u_int32_t e;
- u_int32_t loc;
+ uint32_t e;
+ uint32_t loc;
loc = start + *off;
@@ -424,8 +424,8 @@ cardbus_read_tuple_conf(device_t cbdev, device_t child, u_int32_t start,
}
static int
-cardbus_read_tuple_mem(device_t cbdev, struct resource *res, u_int32_t start,
- u_int32_t *off, int *tupleid, int *len, u_int8_t *tupledata)
+cardbus_read_tuple_mem(device_t cbdev, struct resource *res, uint32_t start,
+ uint32_t *off, int *tupleid, int *len, uint8_t *tupledata)
{
bus_space_tag_t bt;
bus_space_handle_t bh;
@@ -444,8 +444,8 @@ cardbus_read_tuple_mem(device_t cbdev, struct resource *res, u_int32_t start,
static int
cardbus_read_tuple(device_t cbdev, device_t child, struct resource *res,
- u_int32_t start, u_int32_t *off, int *tupleid, int *len,
- u_int8_t *tupledata)
+ uint32_t start, uint32_t *off, int *tupleid, int *len,
+ uint8_t *tupledata)
{
if (res == (struct resource*)~0UL) {
return (cardbus_read_tuple_conf(cbdev, child, start, off,
@@ -468,11 +468,11 @@ cardbus_read_tuple_finish(device_t cbdev, device_t child, int rid,
}
static struct resource *
-cardbus_read_tuple_init(device_t cbdev, device_t child, u_int32_t *start,
+cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start,
int *rid)
{
- u_int32_t testval;
- u_int32_t size;
+ uint32_t testval;
+ uint32_t size;
struct resource *res;
switch (CARDBUS_CIS_SPACE(*start)) {
@@ -538,10 +538,10 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, u_int32_t *start,
if (CARDBUS_CIS_SPACE(*start) == CARDBUS_CIS_ASI_ROM) {
bus_space_tag_t bt;
bus_space_handle_t bh;
- u_int32_t imagesize;
- u_int32_t imagebase = 0;
- u_int32_t pcidata;
- u_int16_t romsig;
+ uint32_t imagesize;
+ uint32_t imagebase = 0;
+ uint32_t pcidata;
+ uint16_t romsig;
int romnum = 0;
int imagenum;
@@ -614,7 +614,7 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, u_int32_t *start,
static int
decode_tuple(device_t cbdev, device_t child, int tupleid, int len,
- u_int8_t *tupledata, u_int32_t start, u_int32_t *off,
+ uint8_t *tupledata, uint32_t start, uint32_t *off,
struct tuple_callbacks *callbacks)
{
int i;
@@ -637,11 +637,11 @@ static int
cardbus_parse_cis(device_t cbdev, device_t child,
struct tuple_callbacks *callbacks)
{
- u_int8_t tupledata[MAXTUPLESIZE];
+ uint8_t tupledata[MAXTUPLESIZE];
int tupleid;
int len;
int expect_linktarget;
- u_int32_t start, off;
+ uint32_t start, off;
struct resource *res;
int rid;
@@ -693,9 +693,9 @@ cardbus_alloc_resources(device_t cbdev, device_t child)
struct resource_list_entry *rle;
struct resource_list_entry **barlist;
int tmp;
- u_int32_t mem_psize = 0, mem_nsize = 0, io_size = 0;
+ uint32_t mem_psize = 0, mem_nsize = 0, io_size = 0;
struct resource *res;
- u_int32_t start,end;
+ uint32_t start,end;
int rid, flags;
count = 0;
@@ -931,8 +931,8 @@ cardbus_add_map(device_t cbdev, device_t child, int reg)
{
struct cardbus_devinfo *dinfo = device_get_ivars(child);
struct resource_list_entry *rle;
- u_int32_t size;
- u_int32_t testval;
+ uint32_t size;
+ uint32_t testval;
int type;
SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
@@ -988,7 +988,7 @@ cardbus_pickup_maps(device_t cbdev, device_t child)
}
int
-cardbus_cis_read(device_t cbdev, device_t child, u_int8_t id,
+cardbus_cis_read(device_t cbdev, device_t child, uint8_t id,
struct cis_tupleinfo **buff, int *nret)
{
struct tuple_callbacks cisread_callbacks[] = {
diff --git a/sys/dev/cardbus/cardbus_cis.h b/sys/dev/cardbus/cardbus_cis.h
index 5796a81..a65b300 100644
--- a/sys/dev/cardbus/cardbus_cis.h
+++ b/sys/dev/cardbus/cardbus_cis.h
@@ -35,7 +35,7 @@
struct cis_tupleinfo;
int cardbus_do_cis(device_t, device_t);
-int cardbus_cis_read(device_t, device_t, u_int8_t, struct cis_tupleinfo**,
+int cardbus_cis_read(device_t, device_t, uint8_t, struct cis_tupleinfo**,
int*);
void cardbus_cis_free(device_t, struct cis_tupleinfo*, int*);
diff --git a/sys/dev/cardbus/cardbusvar.h b/sys/dev/cardbus/cardbusvar.h
index 76a98a5..b827689 100644
--- a/sys/dev/cardbus/cardbusvar.h
+++ b/sys/dev/cardbus/cardbusvar.h
@@ -33,24 +33,24 @@
*/
struct cardbus_devinfo {
struct pci_devinfo pci;
- u_int8_t mprefetchable; /* bit mask of prefetchable BARs */
- u_int8_t mbelow1mb; /* bit mask of BARs which require below 1Mb */
- u_int8_t ibelow1mb; /* bit mask of BARs which require below 1Mb */
+ uint8_t mprefetchable; /* bit mask of prefetchable BARs */
+ uint8_t mbelow1mb; /* bit mask of BARs which require below 1Mb */
+ uint8_t ibelow1mb; /* bit mask of BARs which require below 1Mb */
#define BARBIT(RID) (1<<(((RID)-CARDBUS_BASE0_REG)/4))
- u_int16_t mfrid; /* manufacturer id */
- u_int16_t prodid; /* product id */
+ uint16_t mfrid; /* manufacturer id */
+ uint16_t prodid; /* product id */
u_int funcid; /* function id */
union {
struct {
u_int type; /* UART type */
} sio;
struct {
- u_int8_t nid[6]; /* MAC address */
- u_int8_t tech; /* technology */
- u_int8_t contype; /* connector type */
- u_int32_t speed[3]; /* available speeds */
- u_int8_t media[4]; /* media types */
+ uint8_t nid[6]; /* MAC address */
+ uint8_t tech; /* technology */
+ uint8_t contype; /* connector type */
+ uint32_t speed[3]; /* available speeds */
+ uint8_t media[4]; /* media types */
} lan;
} funce;
- u_int32_t fepresent; /* bit mask of funce values present */
+ uint32_t fepresent; /* bit mask of funce values present */
};
OpenPOWER on IntegriCloud