-/* $OpenBSD: grf_mv.c,v 1.12 1997/04/10 20:34:33 briggs Exp $ */
+/* $OpenBSD: grf_mv.c,v 1.13 1997/04/17 17:46:39 gene Exp $ */
/* $NetBSD: grf_mv.c,v 1.17 1997/02/24 06:20:06 scottr Exp $ */
/*
static void load_image_data __P((caddr_t data, struct image_data *image));
-static char zero = 0;
static void grfmv_intr_generic __P((void *vsc, int slot));
static void grfmv_intr_cti __P((void *vsc, int slot));
static void grfmv_intr_cb264 __P((void *vsc, int slot));
void *vcf;
void *aux;
{
- struct nubus_attach_args *na = (struct nubus_attach_args *) aux;
+ struct nubus_attach_args *na = (struct nubus_attach_args *)aux;
if (na->category != NUBUS_CATEGORY_DISPLAY)
return 0;
struct device *parent, *self;
void *aux;
{
- struct grfbus_softc *sc = (struct grfbus_softc *) self;
- struct nubus_attach_args *na = (struct nubus_attach_args *) aux;
+ struct grfbus_softc *sc = (struct grfbus_softc *)self;
+ struct nubus_attach_args *na = (struct nubus_attach_args *)aux;
struct image_data image_store, image;
struct grfmode *gm;
char cardname[CARD_NAME_LEN];
return;
}
- if (nubus_get_ind_data(&sc->sc_slot, &dirent, (caddr_t) &image_store,
+ if (nubus_get_ind_data(&sc->sc_slot, &dirent, (caddr_t)&image_store,
sizeof(struct image_data)) <= 0) {
printf("\n%s: probe failed to get indirect mode data.\n",
sc->sc_dev.dv_xname);
/* Need to load display info (and driver?), etc... (?) */
- load_image_data((caddr_t) &image_store, &image);
+ load_image_data((caddr_t)&image_store, &image);
gm = &sc->curr_mode;
gm->mode_id = mode;
- gm->fbbase = (caddr_t) (sc->sc_slot.virtual_base +
+ gm->fbbase = (caddr_t)(sc->sc_slot.virtual_base +
mac68k_trunc_page(image.offset));
gm->fboff = image.offset & PGOFSET;
gm->rowbytes = image.rowbytes;
strncpy(cardname, nubus_get_card_name(&sc->sc_slot),
CARD_NAME_LEN);
cardname[CARD_NAME_LEN-1] = '\0';
+ printf(": %s\n", cardname);
if (sc->card_id == NUBUS_DRHW_TFB) {
/*
* value here, even though the cards are different, so we
* so we try to differentiate here.
*/
- if (strncmp(cardname, "Samsung 768", 11) == 0) {
+ if (strncmp(cardname, "Samsung 768", 11) == 0)
sc->card_id = NUBUS_DRHW_SAM768;
- } else if (strncmp(cardname, "Toby frame", 10) == 0) {
- } else {
- printf(": (evil card pretending to be TFB)");
- }
+ else if (strncmp(cardname, "Toby frame", 10) != 0)
+ printf("%s: card masquaredes as Toby Framebuffer",
+ sc->sc_dev.dv_xname);
}
- printf(": %s\n", cardname);
-
switch (sc->card_id) {
case NUBUS_DRHW_M2HRVC:
case NUBUS_DRHW_TFB:
case NUBUS_DRHW_MICRON:
/* What do we know about this one? */
default:
- printf(" Unknown video card 0x%x--", sc->card_id);
+ printf("%s: Unknown video card 0x%x--",
+ sc->sc_dev.dv_xname, sc->card_id);
printf("Not installing interrupt routine.\n");
break;
}
struct grf_softc *gp;
vm_offset_t addr;
{
- return (caddr_t) (NUBUS_SLOT2PA(gp->sc_slot->slot) +
+ return (caddr_t)(NUBUS_SLOT2PA(gp->sc_slot->slot) +
(addr - gp->sc_slot->virtual_base));
}
void *vsc;
int slot;
{
- caddr_t slotbase;
- struct grfbus_softc *sc;
+ static char zero = 0;
+ struct grfbus_softc *sc;
+ volatile char *slotbase;
- sc = (struct grfbus_softc *) vsc;
- slotbase = (caddr_t) sc->sc_slot.virtual_base;
+ sc = (struct grfbus_softc *)vsc;
+ slotbase = (volatile char *)sc->sc_slot.virtual_base;
slotbase[sc->cli_offset] = zero;
}
void *vsc;
int slot;
{
- volatile char *slotbase;
- struct grfbus_softc *sc;
+ struct grfbus_softc *sc;
+ volatile char *slotbase;
- sc = (struct grfbus_softc *) vsc;
- slotbase = ((volatile char *) sc->sc_slot.virtual_base) + 0x00080000;
+ sc = (struct grfbus_softc *)vsc;
+ slotbase = ((volatile char *)sc->sc_slot.virtual_base) + 0x00080000;
*slotbase = (*slotbase | 0x02);
*slotbase = (*slotbase & 0xFD);
}
int slot;
{
struct grfbus_softc *sc;
- caddr_t slotbase;
+ volatile char *slotbase;
- sc = (struct grfbus_softc *) vsc;
- slotbase = (caddr_t) sc->sc_slot.virtual_base;
+ sc = (struct grfbus_softc *)vsc;
+ slotbase = (volatile char *)sc->sc_slot.virtual_base;
asm volatile(" movl %0,a0
movl a0@(0xff6028),d0
andl #0x2,d0
-/* $OpenBSD: if_ae.c,v 1.11 1997/03/25 04:58:43 briggs Exp $ */
-/* $NetBSD: if_ae.c,v 1.60 1997/03/19 08:04:38 scottr Exp $ */
+/* $OpenBSD: if_ae.c,v 1.12 1997/04/17 17:46:41 gene Exp $ */
+/* $NetBSD: if_ae.c,v 1.61 1997/04/14 16:28:34 scottr Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
struct ae_softc *sc;
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int i;
- u_char mcaf[8];
+ u_int8_t mcaf[8];
+ int i;
/*
* Initialize the NIC in the exact order outlined in the NS manual.
ae_rint(sc)
struct ae_softc *sc;
{
- u_char boundary, current;
+ u_char boundary, current;
u_short len;
- u_char nlen;
+ u_char nlen;
u_int8_t *lenp;
struct ae_ring packet_hdr;
int packet_ptr;
}
/*
- * Process an ioctl request. This code needs some work - it looks pretty ugly.
+ * Process an ioctl request.
+ * XXX - This code needs some work - it looks pretty ugly.
*/
int
aeioctl(ifp, cmd, data)
- register struct ifnet *ifp;
+ struct ifnet *ifp;
u_long cmd;
caddr_t data;
{
struct ae_softc *sc = ifp->if_softc;
- register struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifaddr *ifa = (struct ifaddr *) data;
struct ifreq *ifr = (struct ifreq *) data;
int s, error = 0;
/*
* Supporting routines.
*/
+
/*
* Given a source and destination address, copy 'amount' of a packet from the
* ring buffer into a linear destination buffer. Takes into account ring-wrap.
{
struct ifnet *ifp = &ac->ac_if;
struct ether_multi *enm;
- register u_char *cp, c;
- register u_long crc;
- register int i, len;
+ u_char *cp, c;
+ u_int32_t crc;
+ int i, len;
struct ether_multistep step;
/*