Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp700/dev Replace a magic constant with a define.
details: https://anonhg.NetBSD.org/src/rev/a5ca875678e7
branches: trunk
changeset: 751991:a5ca875678e7
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Feb 10 20:39:04 2010 +0000
description:
Replace a magic constant with a define.
diffstat:
sys/arch/hp700/dev/dino.c | 78 +++++++++++++++++++++++-----------------------
1 files changed, 39 insertions(+), 39 deletions(-)
diffs (truncated from 344 to 300 lines):
diff -r 5fdc30783268 -r a5ca875678e7 sys/arch/hp700/dev/dino.c
--- a/sys/arch/hp700/dev/dino.c Wed Feb 10 20:33:27 2010 +0000
+++ b/sys/arch/hp700/dev/dino.c Wed Feb 10 20:39:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dino.c,v 1.22 2010/01/17 08:29:00 skrll Exp $ */
+/* $NetBSD: dino.c,v 1.23 2010/02/10 20:39:04 skrll Exp $ */
/* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.22 2010/01/17 08:29:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.23 2010/02/10 20:39:04 skrll Exp $");
/* #include "cardbus.h" */
@@ -544,8 +544,8 @@
/* Find used PCI MEM and narrow allocateble region down to it. */
for (i = 1; i < 31; i++)
if ((reg & 1 << i) != 0) {
- rstart = 0xf0000000 | i << 23;
- rend = (0xf0000000 | (i + 1) << 23) - 1;
+ rstart = HPPA_IOSPACE | i << 23;
+ rend = (HPPA_IOSPACE | (i + 1) << 23) - 1;
break;
}
if ((error = bus_space_alloc(sc->sc_bt, rstart, rend, size, align,
@@ -561,7 +561,7 @@
struct dino_softc *sc = v;
volatile struct dino_regs *r = sc->sc_regs;
- if (bsh & 0xf0000000) {
+ if (bsh & HPPA_IOSPACE) {
bus_space_unmap(sc->sc_bt, bsh, size);
if (--sc->sc_memrefcount[((bsh >> 23) & 0x1f)] == 0)
/* Unmap the upper PCI MEM space. */
@@ -605,7 +605,7 @@
dino_r1(void *v, bus_space_handle_t h, bus_size_t o)
{
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
return *(volatile uint8_t *)h;
else {
struct dino_softc *sc = v;
@@ -622,7 +622,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -642,7 +642,7 @@
uint32_t data;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
data = *(volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -661,7 +661,7 @@
uint64_t data;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
data = *(volatile uint64_t *)h;
else
panic("dino_r8: not implemented");
@@ -673,7 +673,7 @@
dino_w1(void *v, bus_space_handle_t h, bus_size_t o, uint8_t vv)
{
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
*(volatile uint8_t *)h = vv;
else {
struct dino_softc *sc = v;
@@ -690,7 +690,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -710,7 +710,7 @@
{
h += o;
vv = htole32(vv);
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
*(volatile uint32_t *)h = vv;
else {
struct dino_softc *sc = v;
@@ -725,7 +725,7 @@
dino_w8(void *v, bus_space_handle_t h, bus_size_t o, uint64_t vv)
{
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
*(volatile uint64_t *)h = htole64(vv);
else
panic("dino_w8: not implemented");
@@ -738,7 +738,7 @@
volatile uint8_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint8_t *)h;
else {
struct dino_softc *sc = v;
@@ -758,7 +758,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -780,7 +780,7 @@
volatile uint32_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -806,7 +806,7 @@
volatile uint8_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint8_t *)h;
else {
struct dino_softc *sc = v;
@@ -826,7 +826,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -848,7 +848,7 @@
volatile uint32_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -874,7 +874,7 @@
volatile uint8_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint8_t *)h;
else {
struct dino_softc *sc = v;
@@ -894,7 +894,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -916,7 +916,7 @@
volatile uint32_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -943,7 +943,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -967,7 +967,7 @@
volatile uint32_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -996,7 +996,7 @@
volatile uint16_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint16_t *)h;
else {
struct dino_softc *sc = v;
@@ -1020,7 +1020,7 @@
volatile uint32_t *p;
h += o;
- if (h & 0xf0000000)
+ if (h & HPPA_IOSPACE)
p = (volatile uint32_t *)h;
else {
struct dino_softc *sc = v;
@@ -1048,7 +1048,7 @@
volatile uint8_t *p;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint8_t *)h;
while (c--)
*a++ = *p++;
@@ -1070,7 +1070,7 @@
volatile uint16_t *p, data;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint16_t *)h;
while (c--) {
data = *p++;
@@ -1097,7 +1097,7 @@
volatile uint32_t *p, data;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint32_t *)h;
while (c--) {
data = *p++;
@@ -1127,7 +1127,7 @@
volatile uint8_t *p;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint8_t *)h;
while (c--)
*p++ = *a++;
@@ -1149,7 +1149,7 @@
volatile uint16_t *p, data;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint16_t *)h;
while (c--) {
data = *a++;
@@ -1176,7 +1176,7 @@
volatile uint32_t *p, data;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint32_t *)h;
while (c--) {
data = *a++;
@@ -1208,7 +1208,7 @@
c /= 2;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint16_t *)h;
while (c--)
*a++ = *p++;
@@ -1234,7 +1234,7 @@
c /= 4;
h += o;
- if (h & 0xf0000000) {
+ if (h & HPPA_IOSPACE) {
p = (volatile uint32_t *)h;
while (c--)
*a++ = *p++;
@@ -1264,7 +1264,7 @@
Home |
Main Index |
Thread Index |
Old Index