excavar.h (110841) | excavar.h (115988) |
---|---|
1/* $FreeBSD: head/sys/dev/exca/excavar.h 110841 2003-02-14 06:21:18Z imp $ */ | 1/* $FreeBSD: head/sys/dev/exca/excavar.h 115988 2003-06-07 20:46:39Z imp $ */ |
2 3/* 4 * Copyright (c) 2002 M Warner Losh. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 61 unchanged lines hidden (view full) --- 71 struct pccard_mem_handle mem[EXCA_MEM_WINS]; 72 int ioalloc; 73 struct pccard_io_handle io[EXCA_IO_WINS]; 74 bus_space_tag_t bst; 75 bus_space_handle_t bsh; 76 uint32_t flags; 77#define EXCA_SOCKET_PRESENT 0x00000001 78#define EXCA_HAS_MEMREG_WIN 0x00000002 | 2 3/* 4 * Copyright (c) 2002 M Warner Losh. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 61 unchanged lines hidden (view full) --- 71 struct pccard_mem_handle mem[EXCA_MEM_WINS]; 72 int ioalloc; 73 struct pccard_io_handle io[EXCA_IO_WINS]; 74 bus_space_tag_t bst; 75 bus_space_handle_t bsh; 76 uint32_t flags; 77#define EXCA_SOCKET_PRESENT 0x00000001 78#define EXCA_HAS_MEMREG_WIN 0x00000002 |
79#define EXCA_CARD_OK 0x00000004 80#define EXCA_KTHREAD_RUNNING 0x00000008 81#define EXCA_KTHREAD_DONE 0x00000010 |
|
79 uint32_t offset; 80 int chipset; 81#define EXCA_CARDBUS 0 82#define EXCA_I82365 1 /* Intel i82365SL-A/B or clone */ 83#define EXCA_I82365SL_DF 2 /* Intel i82365sl-DF step */ 84#define EXCA_VLSI 3 /* VLSI chip */ 85#define EXCA_PD6710 4 /* Cirrus logic PD6710 */ 86#define EXCA_PD6722 5 /* Cirrus logic PD6722 */ 87#define EXCA_PD6729 6 /* Cirrus Logic PD6729 */ 88#define EXCA_VG365 7 /* Vadem 365 */ 89#define EXCA_VG465 8 /* Vadem 465 */ 90#define EXCA_VG468 9 /* Vadem 468 */ 91#define EXCA_VG469 10 /* Vadem 469 */ 92#define EXCA_RF5C296 11 /* Ricoh RF5C296 */ 93#define EXCA_RF5C396 12 /* Ricoh RF5C396 */ 94#define EXCA_IBM 13 /* IBM clone */ 95#define EXCA_IBM_KING 14 /* IBM KING PCMCIA Controller */ | 82 uint32_t offset; 83 int chipset; 84#define EXCA_CARDBUS 0 85#define EXCA_I82365 1 /* Intel i82365SL-A/B or clone */ 86#define EXCA_I82365SL_DF 2 /* Intel i82365sl-DF step */ 87#define EXCA_VLSI 3 /* VLSI chip */ 88#define EXCA_PD6710 4 /* Cirrus logic PD6710 */ 89#define EXCA_PD6722 5 /* Cirrus logic PD6722 */ 90#define EXCA_PD6729 6 /* Cirrus Logic PD6729 */ 91#define EXCA_VG365 7 /* Vadem 365 */ 92#define EXCA_VG465 8 /* Vadem 465 */ 93#define EXCA_VG468 9 /* Vadem 468 */ 94#define EXCA_VG469 10 /* Vadem 469 */ 95#define EXCA_RF5C296 11 /* Ricoh RF5C296 */ 96#define EXCA_RF5C396 12 /* Ricoh RF5C396 */ 97#define EXCA_IBM 13 /* IBM clone */ 98#define EXCA_IBM_KING 14 /* IBM KING PCMCIA Controller */ |
99#define EXCA_BOGUS -1 /* Invalid/not present/etc */ |
|
96 exca_getb_fn *getb; 97 exca_putb_fn *putb; | 100 exca_getb_fn *getb; 101 exca_putb_fn *putb; |
102 struct proc *event_thread; 103 struct mtx mtx; 104 struct cv cv; 105 device_t pccarddev; |
|
98}; 99 100void exca_init(struct exca_softc *sc, device_t dev, 101 bus_space_tag_t, bus_space_handle_t, uint32_t); | 106}; 107 108void exca_init(struct exca_softc *sc, device_t dev, 109 bus_space_tag_t, bus_space_handle_t, uint32_t); |
110void exca_insert(struct exca_softc *sc); |
|
102int exca_io_map(struct exca_softc *sc, int width, struct resource *r); 103int exca_io_unmap_res(struct exca_softc *sc, struct resource *res); 104int exca_is_pcic(struct exca_softc *sc); 105int exca_mem_map(struct exca_softc *sc, int kind, struct resource *res); 106int exca_mem_set_flags(struct exca_softc *sc, struct resource *res, 107 uint32_t flags); 108int exca_mem_set_offset(struct exca_softc *sc, struct resource *res, 109 uint32_t cardaddr, uint32_t *deltap); 110int exca_mem_unmap_res(struct exca_softc *sc, struct resource *res); 111int exca_probe_slots(device_t dev, struct exca_softc *exca, 112 bus_space_tag_t iot, bus_space_handle_t ioh); | 111int exca_io_map(struct exca_softc *sc, int width, struct resource *r); 112int exca_io_unmap_res(struct exca_softc *sc, struct resource *res); 113int exca_is_pcic(struct exca_softc *sc); 114int exca_mem_map(struct exca_softc *sc, int kind, struct resource *res); 115int exca_mem_set_flags(struct exca_softc *sc, struct resource *res, 116 uint32_t flags); 117int exca_mem_set_offset(struct exca_softc *sc, struct resource *res, 118 uint32_t cardaddr, uint32_t *deltap); 119int exca_mem_unmap_res(struct exca_softc *sc, struct resource *res); 120int exca_probe_slots(device_t dev, struct exca_softc *exca, 121 bus_space_tag_t iot, bus_space_handle_t ioh); |
122void exca_removal(struct exca_softc *); |
|
113void exca_reset(struct exca_softc *, device_t child); 114 | 123void exca_reset(struct exca_softc *, device_t child); 124 |
125/* bus/device interfaces */ 126int exca_activate_resource(struct exca_softc *exca, device_t child, int type, 127 int rid, struct resource *res); 128int exca_deactivate_resource(struct exca_softc *exca, device_t child, int type, 129 int rid, struct resource *res); 130 |
|
115static __inline uint8_t 116exca_getb(struct exca_softc *sc, int reg) 117{ 118 return (sc->getb(sc, reg)); 119} 120 121static __inline void 122exca_putb(struct exca_softc *sc, int reg, uint8_t val) --- 17 unchanged lines hidden --- | 131static __inline uint8_t 132exca_getb(struct exca_softc *sc, int reg) 133{ 134 return (sc->getb(sc, reg)); 135} 136 137static __inline void 138exca_putb(struct exca_softc *sc, int reg, uint8_t val) --- 17 unchanged lines hidden --- |