diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-05-24 15:04:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-05-24 15:04:56 +0000 |
commit | c21269afd52217e765c983c592761cfe6a7ae96b (patch) | |
tree | 6041df9153c90c7bd2e71a622734bb9c84d9b987 /sys/arch/hppa/dev | |
parent | 692ae6fe82dd7e240b408d4ac6bb900a9e450ac0 (diff) |
Add missing prototypes
ok jsing kettenis
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r-- | sys/arch/hppa/dev/apic.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/dev/astro.c | 3 | ||||
-rw-r--r-- | sys/arch/hppa/dev/elroy.c | 156 | ||||
-rw-r--r-- | sys/arch/hppa/dev/mongoose.c | 53 |
4 files changed, 214 insertions, 4 deletions
diff --git a/sys/arch/hppa/dev/apic.c b/sys/arch/hppa/dev/apic.c index 5870a29ec88..3cffc4bf40e 100644 --- a/sys/arch/hppa/dev/apic.c +++ b/sys/arch/hppa/dev/apic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apic.c,v 1.9 2010/04/01 22:53:49 kettenis Exp $ */ +/* $OpenBSD: apic.c,v 1.10 2010/05/24 15:04:53 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -77,6 +77,10 @@ u_int32_t apic_get_int_ent0(struct elroy_softc *, int); void apic_dump(struct elroy_softc *); #endif +void apic_write(volatile struct elroy_regs *r, u_int32_t reg, + u_int32_t val); +u_int32_t apic_read(volatile struct elroy_regs *r, u_int32_t reg); + void apic_write(volatile struct elroy_regs *r, u_int32_t reg, u_int32_t val) { diff --git a/sys/arch/hppa/dev/astro.c b/sys/arch/hppa/dev/astro.c index 70318e804a4..0e326375297 100644 --- a/sys/arch/hppa/dev/astro.c +++ b/sys/arch/hppa/dev/astro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: astro.c,v 1.10 2010/04/29 13:48:29 jsing Exp $ */ +/* $OpenBSD: astro.c,v 1.11 2010/05/24 15:04:53 deraadt Exp $ */ /* * Copyright (c) 2007 Mark Kettenis @@ -165,6 +165,7 @@ int iommu_dvmamap_create(void *, bus_size_t, int, bus_size_t, bus_size_t, void iommu_dvmamap_destroy(void *, bus_dmamap_t); int iommu_dvmamap_load(void *, bus_dmamap_t, void *, bus_size_t, struct proc *, int); +int iommu_iomap_load_map(struct astro_softc *, bus_dmamap_t, int); int iommu_dvmamap_load_mbuf(void *, bus_dmamap_t, struct mbuf *, int); int iommu_dvmamap_load_uio(void *, bus_dmamap_t, struct uio *, int); int iommu_dvmamap_load_raw(void *, bus_dmamap_t, bus_dma_segment_t *, diff --git a/sys/arch/hppa/dev/elroy.c b/sys/arch/hppa/dev/elroy.c index 207303f855d..2d72384e6fc 100644 --- a/sys/arch/hppa/dev/elroy.c +++ b/sys/arch/hppa/dev/elroy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elroy.c,v 1.5 2009/03/30 21:24:57 kettenis Exp $ */ +/* $OpenBSD: elroy.c,v 1.6 2010/05/24 15:04:53 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -57,6 +57,129 @@ struct cfdriver elroy_cd = { NULL, "elroy", DV_DULL }; +void elroy_attach_hook(struct device *parent, struct device *self, + struct pcibus_attach_args *pba); +int elroy_maxdevs(void *v, int bus); +pcitag_t elroy_make_tag(void *v, int bus, int dev, int func); +void elroy_decompose_tag(void *v, pcitag_t tag, int *bus, + int *dev, int *func); +pcireg_t elroy_conf_read(void *v, pcitag_t tag, int reg); +void elroy_conf_write(void *v, pcitag_t tag, int reg, + pcireg_t data); +int elroy_iomap(void *v, bus_addr_t bpa, bus_size_t size, + int flags, bus_space_handle_t *bshp); +int elroy_memmap(void *v, bus_addr_t bpa, bus_size_t size, + int flags, bus_space_handle_t *bshp); +int elroy_subregion(void *v, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, + bus_space_handle_t *nbshp); +int elroy_ioalloc(void *v, bus_addr_t rstart, bus_addr_t rend, + bus_size_t size, bus_size_t align, bus_size_t boundary, + int flags, bus_addr_t *addrp, bus_space_handle_t *bshp); +int elroy_memalloc(void *v, bus_addr_t rstart, bus_addr_t rend, + bus_size_t size, bus_size_t align, bus_size_t boundary, + int flags, bus_addr_t *addrp, bus_space_handle_t *bshp); +void elroy_unmap(void *v, bus_space_handle_t bsh, + bus_size_t size); +void elroy_free(void *v, bus_space_handle_t bh, bus_size_t size); +void elroy_barrier(void *v, bus_space_handle_t h, bus_size_t o, + bus_size_t l, int op); +void * elroy_alloc_parent(struct device *self, + struct pci_attach_args *pa, int io); +void * elroy_vaddr(void *v, bus_space_handle_t h); +u_int8_t elroy_r1(void *v, bus_space_handle_t h, bus_size_t o); +u_int16_t elroy_r2(void *v, bus_space_handle_t h, bus_size_t o); +u_int32_t elroy_r4(void *v, bus_space_handle_t h, bus_size_t o); +u_int64_t elroy_r8(void *v, bus_space_handle_t h, bus_size_t o); +void elroy_w1(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t vv); +void elroy_w2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv); +void elroy_w4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv); +void elroy_w8(void *v, bus_space_handle_t h, bus_size_t o, + u_int64_t vv); +void elroy_rm_1(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rm_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t *a, bus_size_t c); +void elroy_rm_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t *a, bus_size_t c); +void elroy_rm_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int64_t *a, bus_size_t c); +void elroy_wm_1(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wm_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int16_t *a, bus_size_t c); +void elroy_wm_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int32_t *a, bus_size_t c); +void elroy_wm_8(void *v, bus_space_handle_t h, bus_size_t o, + const u_int64_t *a, bus_size_t c); +void elroy_sm_1(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t vv, bus_size_t c); +void elroy_sm_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv, bus_size_t c); +void elroy_sm_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv, bus_size_t c); +void elroy_sm_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int64_t vv, bus_size_t c); +void elroy_rrm_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rrm_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rrm_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_wrm_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wrm_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wrm_8(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_rr_1(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rr_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t *a, bus_size_t c); +void elroy_rr_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t *a, bus_size_t c); +void elroy_rr_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int64_t *a, bus_size_t c); +void elroy_wr_1(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wr_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int16_t *a, bus_size_t c); +void elroy_wr_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int32_t *a, bus_size_t c); +void elroy_wr_8(void *v, bus_space_handle_t h, bus_size_t o, + const u_int64_t *a, bus_size_t c); +void elroy_rrr_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rrr_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_rrr_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t *a, bus_size_t c); +void elroy_wrr_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wrr_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_wrr_8(void *v, bus_space_handle_t h, bus_size_t o, + const u_int8_t *a, bus_size_t c); +void elroy_sr_1(void *v, bus_space_handle_t h, bus_size_t o, + u_int8_t vv, bus_size_t c); +void elroy_sr_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv, bus_size_t c); +void elroy_sr_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv, bus_size_t c); +void elroy_sr_8(void *v, bus_space_handle_t h, bus_size_t o, + u_int64_t vv, bus_size_t c); +void elroy_cp_1(void *v, bus_space_handle_t h1, bus_size_t o1, + bus_space_handle_t h2, bus_size_t o2, bus_size_t c); +void elroy_cp_2(void *v, bus_space_handle_t h1, bus_size_t o1, + bus_space_handle_t h2, bus_size_t o2, bus_size_t c); +void elroy_cp_4(void *v, bus_space_handle_t h1, bus_size_t o1, + bus_space_handle_t h2, bus_size_t o2, bus_size_t c); +void elroy_cp_8(void *v, bus_space_handle_t h1, bus_size_t o1, + bus_space_handle_t h2, bus_size_t o2, bus_size_t c); + int elroy_match(struct device *parent, void *cfdata, void *aux) { @@ -927,6 +1050,35 @@ const struct hppa_bus_space_tag elroy_iomemt = { elroy_cp_1, elroy_cp_2, elroy_cp_4, elroy_cp_8 }; +int elroy_dmamap_create(void *v, bus_size_t size, + int nsegments, bus_size_t maxsegsz, + bus_size_t boundary, int flags, + bus_dmamap_t *dmamp); +void elroy_dmamap_destroy(void *v, bus_dmamap_t map); +int elroy_dmamap_load(void *v, bus_dmamap_t map, + void *addr, bus_size_t size, + struct proc *p, int flags); +int elroy_dmamap_load_mbuf(void *v, bus_dmamap_t map, + struct mbuf *m, int flags); +int elroy_dmamap_load_uio(void *v, bus_dmamap_t map, + struct uio *uio, int flags); +int elroy_dmamap_load_raw(void *v, bus_dmamap_t map, + bus_dma_segment_t *segs, + int nsegs, bus_size_t size, int flags); +void elroy_dmamap_unload(void *v, bus_dmamap_t map); +void elroy_dmamap_sync(void *v, bus_dmamap_t map, bus_addr_t off, + bus_size_t len, int ops); +int elroy_dmamem_alloc(void *v, bus_size_t size, + bus_size_t alignment, bus_size_t boundary, + bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags); +void elroy_dmamem_free(void *v, bus_dma_segment_t *segs, + int nsegs); +int elroy_dmamem_map(void *v, bus_dma_segment_t *segs, int nsegs, + size_t size, caddr_t *kvap, int flags); +void elroy_dmamem_unmap(void *v, caddr_t kva, size_t size); +paddr_t elroy_dmamem_mmap(void *v, bus_dma_segment_t *segs, + int nsegs, off_t off, int prot, int flags); + int elroy_dmamap_create(void *v, bus_size_t size, int nsegments, bus_size_t maxsegsz, bus_size_t boundary, int flags, bus_dmamap_t *dmamp) @@ -1067,6 +1219,8 @@ const struct hppa_pci_chipset_tag elroy_pc = { #endif }; +int elroy_print(void *aux, const char *pnp); + int elroy_print(void *aux, const char *pnp) { diff --git a/sys/arch/hppa/dev/mongoose.c b/sys/arch/hppa/dev/mongoose.c index be66db5a73d..d4836daa796 100644 --- a/sys/arch/hppa/dev/mongoose.c +++ b/sys/arch/hppa/dev/mongoose.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mongoose.c,v 1.20 2010/04/27 18:29:39 kettenis Exp $ */ +/* $OpenBSD: mongoose.c,v 1.21 2010/05/24 15:04:53 deraadt Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -58,6 +58,57 @@ struct cfdriver mongoose_cd = { NULL, "mongoose", DV_DULL }; +void mg_eisa_attach_hook(struct device *parent, + struct device *self, + struct eisabus_attach_args *mg); +int mg_intr_map(void *v, u_int irq, eisa_intr_handle_t *ehp); +const char *mg_intr_string(void *v, int irq); +void mg_isa_attach_hook(struct device *parent, + struct device *self, + struct isabus_attach_args *iba); +void *mg_intr_establish(void *v, int irq, int type, int pri, + int (*handler)(void *), void *arg, const char *name); +void mg_intr_disestablish(void *v, void *cookie); +int mg_intr_check(void *v, int irq, int type); +int mg_eisa_iomap(void *v, bus_addr_t addr, bus_size_t size, + int flags, bus_space_handle_t *bshp); +int mg_eisa_memmap(void *v, bus_addr_t addr, bus_size_t size, + int flags, bus_space_handle_t *bshp); +void mg_eisa_memunmap(void *v, bus_space_handle_t bsh, + bus_size_t size); +void mg_isa_barrier(void *v, bus_space_handle_t h, bus_size_t o, + bus_size_t l, int op); +u_int16_t mg_isa_r2(void *v, bus_space_handle_t h, bus_size_t o); +u_int32_t mg_isa_r4(void *v, bus_space_handle_t h, bus_size_t o); +void mg_isa_w2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv); +void mg_isa_w4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv); +void mg_isa_rm_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t *a, bus_size_t c); +void mg_isa_rm_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t *a, bus_size_t c); +void mg_isa_wm_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int16_t *a, bus_size_t c); +void mg_isa_wm_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int32_t *a, bus_size_t c); +void mg_isa_sm_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv, bus_size_t c); +void mg_isa_sm_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv, bus_size_t c); +void mg_isa_rr_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t *a, bus_size_t c); +void mg_isa_rr_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t *a, bus_size_t c); +void mg_isa_wr_2(void *v, bus_space_handle_t h, bus_size_t o, + const u_int16_t *a, bus_size_t c); +void mg_isa_wr_4(void *v, bus_space_handle_t h, bus_size_t o, + const u_int32_t *a, bus_size_t c); +void mg_isa_sr_2(void *v, bus_space_handle_t h, bus_size_t o, + u_int16_t vv, bus_size_t c); +void mg_isa_sr_4(void *v, bus_space_handle_t h, bus_size_t o, + u_int32_t vv, bus_size_t c); + /* TODO: DMA guts */ void |