pccardvar.h (65917) | pccardvar.h (66058) |
---|---|
1/* $NetBSD: pcmciavar.h,v 1.9 1998/12/29 09:00:28 marc Exp $ */ | 1/* $NetBSD: pcmciavar.h,v 1.9 1998/12/29 09:00:28 marc Exp $ */ |
2/* $FreeBSD: head/sys/dev/pccard/pccardvar.h 65917 2000-09-16 06:52:20Z imp $ */ | 2/* $FreeBSD: head/sys/dev/pccard/pccardvar.h 66058 2000-09-19 04:39:20Z imp $ */ |
3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 253 unchanged lines hidden (view full) --- 264#define pccard_mem_free(pf, pcmhp) \ 265 (pccard_chip_mem_free((pf)->sc->pct, (pf)->sc->pch, (pcmhp))) 266#define pccard_mem_map(pf, kind, card_addr, size, pcmhp, offsetp, windowp) \ 267 (pccard_chip_mem_map((pf)->sc->pct, (pf)->sc->pch, (kind), \ 268 (card_addr), (size), (pcmhp), (offsetp), (windowp))) 269#define pccard_mem_unmap(pf, window) \ 270 (pccard_chip_mem_unmap((pf)->sc->pct, (pf)->sc->pch, (window))) 271 | 3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 253 unchanged lines hidden (view full) --- 264#define pccard_mem_free(pf, pcmhp) \ 265 (pccard_chip_mem_free((pf)->sc->pct, (pf)->sc->pch, (pcmhp))) 266#define pccard_mem_map(pf, kind, card_addr, size, pcmhp, offsetp, windowp) \ 267 (pccard_chip_mem_map((pf)->sc->pct, (pf)->sc->pch, (kind), \ 268 (card_addr), (size), (pcmhp), (offsetp), (windowp))) 269#define pccard_mem_unmap(pf, window) \ 270 (pccard_chip_mem_unmap((pf)->sc->pct, (pf)->sc->pch, (window))) 271 |
272/* compat layer */ 273int pccard_compat_probe(device_t dev); 274int pccard_compat_attach(device_t dev); 275 |
|
272/* ivar interface */ 273enum { 274 PCCARD_IVAR_ETHADDR, /* read ethernet address from CIS tupple */ 275}; 276 277/* read ethernet address from CIS tupple */ 278__inline static int 279pccard_get_ether(device_t dev, u_char *enaddr) 280{ 281 return BUS_READ_IVAR(device_get_parent(dev), dev, 282 PCCARD_IVAR_ETHADDR, (uintptr_t *)enaddr); 283} 284 285enum { 286 PCCARD_A_MEM_ATTR = 0x1 287}; 288 289#define PCCARD_SOFTC(d) (struct pccard_softc *) device_get_softc(d) | 276/* ivar interface */ 277enum { 278 PCCARD_IVAR_ETHADDR, /* read ethernet address from CIS tupple */ 279}; 280 281/* read ethernet address from CIS tupple */ 282__inline static int 283pccard_get_ether(device_t dev, u_char *enaddr) 284{ 285 return BUS_READ_IVAR(device_get_parent(dev), dev, 286 PCCARD_IVAR_ETHADDR, (uintptr_t *)enaddr); 287} 288 289enum { 290 PCCARD_A_MEM_ATTR = 0x1 291}; 292 293#define PCCARD_SOFTC(d) (struct pccard_softc *) device_get_softc(d) |