diff options
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r-- | usr/src/uts/common/sys/ddi_impldefs.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ddi_implfuncs.h | 9 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ddi_obsolete.h | 38 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ddidmareq.h | 29 | ||||
-rw-r--r-- | usr/src/uts/common/sys/devops.h | 38 | ||||
-rw-r--r-- | usr/src/uts/common/sys/dma_engine.h | 12 | ||||
-rw-r--r-- | usr/src/uts/common/sys/sunddi.h | 5 |
7 files changed, 65 insertions, 68 deletions
diff --git a/usr/src/uts/common/sys/ddi_impldefs.h b/usr/src/uts/common/sys/ddi_impldefs.h index 0699d1cbce..3380c6b314 100644 --- a/usr/src/uts/common/sys/ddi_impldefs.h +++ b/usr/src/uts/common/sys/ddi_impldefs.h @@ -20,6 +20,7 @@ */ /* * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. */ #ifndef _SYS_DDI_IMPLDEFS_H @@ -160,7 +161,6 @@ struct dev_info { /* logical parents for busop primitives */ struct dev_info *devi_bus_map_fault; /* bus_map_fault parent */ - struct dev_info *devi_bus_dma_map; /* bus_dma_map parent */ struct dev_info *devi_bus_dma_allochdl; /* bus_dma_newhdl parent */ struct dev_info *devi_bus_dma_freehdl; /* bus_dma_freehdl parent */ struct dev_info *devi_bus_dma_bindhdl; /* bus_dma_bindhdl parent */ diff --git a/usr/src/uts/common/sys/ddi_implfuncs.h b/usr/src/uts/common/sys/ddi_implfuncs.h index d095aff6f8..23413cffef 100644 --- a/usr/src/uts/common/sys/ddi_implfuncs.h +++ b/usr/src/uts/common/sys/ddi_implfuncs.h @@ -23,6 +23,9 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + */ #ifndef _SYS_DDI_IMPLFUNCS_H #define _SYS_DDI_IMPLFUNCS_H @@ -74,12 +77,6 @@ i_ddi_mem_alloc(dev_info_t *dip, ddi_dma_attr_t *attributes, ddi_device_acc_attr_t *accattrp, caddr_t *kaddrp, size_t *real_length, ddi_acc_hdl_t *handlep); -int -i_ddi_mem_alloc_lim(dev_info_t *dip, ddi_dma_lim_t *limits, - size_t length, int cansleep, int streaming, - ddi_device_acc_attr_t *accattrp, caddr_t *kaddrp, - uint_t *real_length, ddi_acc_hdl_t *handlep); - void i_ddi_mem_free(caddr_t kaddr, ddi_acc_hdl_t *ap); diff --git a/usr/src/uts/common/sys/ddi_obsolete.h b/usr/src/uts/common/sys/ddi_obsolete.h index f93d89fb7e..7123b47af2 100644 --- a/usr/src/uts/common/sys/ddi_obsolete.h +++ b/usr/src/uts/common/sys/ddi_obsolete.h @@ -2,6 +2,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + */ #ifndef _SYS_DDI_OBSOLETE_H #define _SYS_DDI_OBSOLETE_H @@ -33,38 +36,9 @@ int ddi_iomin(dev_info_t *dip, int initial, int streaming); extern long strtol(const char *, char **, int); extern unsigned long strtoul(const char *, char **, int); -int ddi_dma_setup(dev_info_t *dip, struct ddi_dma_req *dmareqp, - ddi_dma_handle_t *handlep); -int ddi_dma_addr_setup(dev_info_t *dip, struct as *as, caddr_t addr, size_t len, - uint_t flags, int (*waitfp)(), caddr_t arg, ddi_dma_lim_t *limits, - ddi_dma_handle_t *handlep); -int ddi_dma_buf_setup(dev_info_t *dip, struct buf *bp, uint_t flags, - int (*waitfp)(), caddr_t arg, ddi_dma_lim_t *limits, - ddi_dma_handle_t *handlep); -int ddi_dma_kvaddrp(ddi_dma_handle_t, off_t, size_t, caddr_t *); -int ddi_dma_htoc(ddi_dma_handle_t handle, off_t off, ddi_dma_cookie_t *cookiep); -int ddi_dma_coff(ddi_dma_handle_t handle, ddi_dma_cookie_t *cookiep, - off_t *offp); -int ddi_dma_curwin(ddi_dma_handle_t handle, off_t *offp, size_t *lenp); -int ddi_dma_nextwin(ddi_dma_handle_t, ddi_dma_win_t, ddi_dma_win_t *); -int ddi_dma_nextseg(ddi_dma_win_t, ddi_dma_seg_t, ddi_dma_seg_t *); -int ddi_dma_segtocookie(ddi_dma_seg_t, off_t *, off_t *, ddi_dma_cookie_t *); -int ddi_dma_free(ddi_dma_handle_t handle); -int ddi_iopb_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length, - caddr_t *iopbp); -void ddi_iopb_free(caddr_t iopb); -int ddi_mem_alloc(dev_info_t *dip, ddi_dma_lim_t *limits, uint_t length, - uint_t flags, caddr_t *kaddrp, uint_t *real_length); -void ddi_mem_free(caddr_t kaddr); -int ddi_dma_get_attr(ddi_dma_handle_t handle, ddi_dma_attr_t *attrp); -int ddi_dma_devalign(ddi_dma_handle_t handle, uint_t *alignment, - uint_t *mineffect); -void ddi_dmalim_merge(ddi_dma_lim_t *limit, ddi_dma_lim_t *modifier); - -#if defined(__sparc) -int ddi_dma_movwin(ddi_dma_handle_t, off_t *offp, size_t *lenp, - ddi_dma_cookie_t *); -#endif +/* we'd really like to remove this; unbundled nexus drivers might have it */ +int ddi_dma_map(dev_info_t *dip, dev_info_t *rdip, + struct ddi_dma_req *dmareqp, ddi_dma_handle_t *handlep); uint8_t ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *host_addr); uint16_t ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *host_addr); diff --git a/usr/src/uts/common/sys/ddidmareq.h b/usr/src/uts/common/sys/ddidmareq.h index aac53a6555..e7b2b5f30f 100644 --- a/usr/src/uts/common/sys/ddidmareq.h +++ b/usr/src/uts/common/sys/ddidmareq.h @@ -21,6 +21,9 @@ /* * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + */ #ifndef _SYS_DDIDMAREQ_H #define _SYS_DDIDMAREQ_H @@ -712,21 +715,21 @@ typedef struct ddi_dma_req { */ enum ddi_dma_ctlops { - DDI_DMA_FREE, /* free reference to object */ - DDI_DMA_SYNC, /* synchronize cache references */ - DDI_DMA_HTOC, /* return DMA cookie for handle */ - DDI_DMA_KVADDR, /* return kernel virtual address */ - DDI_DMA_MOVWIN, /* change mapped DMA window on object */ - DDI_DMA_REPWIN, /* report current window on DMA object */ - DDI_DMA_GETERR, /* report any post-transfer DMA errors */ - DDI_DMA_COFF, /* convert a DMA cookie to an offset */ - DDI_DMA_NEXTWIN, /* get next window within object */ - DDI_DMA_NEXTSEG, /* get next segment within window */ - DDI_DMA_SEGTOC, /* return segment DMA cookie */ + DDI_DMA_FREE, /* obsolete - do not use */ + DDI_DMA_SYNC, /* obsolete - do not use */ + DDI_DMA_HTOC, /* obsolete - do not use */ + DDI_DMA_KVADDR, /* obsolete - do not use */ + DDI_DMA_MOVWIN, /* obsolete - do not use */ + DDI_DMA_REPWIN, /* obsolete - do not use */ + DDI_DMA_GETERR, /* obsolete - do not use */ + DDI_DMA_COFF, /* obsolete - do not use */ + DDI_DMA_NEXTWIN, /* obsolete - do not use */ + DDI_DMA_NEXTSEG, /* obsolete - do not use */ + DDI_DMA_SEGTOC, /* obsolete - do not use */ DDI_DMA_RESERVE, /* reserve some DVMA range */ DDI_DMA_RELEASE, /* free preallocated DVMA range */ - DDI_DMA_RESETH, /* reset next cookie ptr in handle */ - DDI_DMA_CKSYNC, /* sync intermediate buffer to cookies */ + DDI_DMA_RESETH, /* obsolete - do not use */ + DDI_DMA_CKSYNC, /* obsolete - do not use */ DDI_DMA_IOPB_ALLOC, /* get contiguous DMA-able memory */ DDI_DMA_IOPB_FREE, /* return contiguous DMA-able memory */ DDI_DMA_SMEM_ALLOC, /* get contiguous DMA-able memory */ diff --git a/usr/src/uts/common/sys/devops.h b/usr/src/uts/common/sys/devops.h index 6efcdcc257..9e2bf1f7cc 100644 --- a/usr/src/uts/common/sys/devops.h +++ b/usr/src/uts/common/sys/devops.h @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + */ #ifndef _SYS_DEVOPS_H #define _SYS_DEVOPS_H @@ -74,10 +77,12 @@ extern "C" { * c XXwrite DDI/DKI * c XXioctl DDI/DKI * c XXdevmap DDI(Sun) - * c XXmmap DKI + * c XXmmap DKI(Obsolete) * c XXsegmap DKI * c XXchpoll DDI/DKI * c XXprop_op DDI(Sun) + * c XXaread DDI(Sun) + * c XXawrite DDI(Sun) */ struct cb_ops { @@ -129,14 +134,33 @@ struct cb_ops { * they will be called from outside the ddi. * * bus_map - Map/unmap/control IU -> device mappings. - * bus_get_intrspec - get interrupt specification by number - * bus_add_intrspec - add interrupt specification, return cookie - * bus_remove_intrspec - remove interrupt specification + * bus_get_intrspec - obsolete, not called + * bus_add_intrspec - obsolete, not called + * bus_remove_intrspec - obsolete, not called * bus_map_fault - bus fault handler - * bus_dma_map - setup dma mapping - * bus_dma_mapctl - control (and free) dma mapping + * bus_dma_map - obsolete, not called + * bus_dma_allochdl - allocate a DMA handle + * bus_dma_freehdl - free a DMA handle + * bus_dma_bindhdl - bind a DMA handle to physical mapping + * bus_dma_unbindhdl - unbind a DMA handle to physical mapping + * bus_dma_flush - flush DMA caches + * bus_dma_win - access DMA windows + * bus_dma_ctl - control dma mapping (legacy use only) * bus_ctl - generic control operations - * bus_prop_op _ request for property + * bus_prop_op - request for property + * bus_get_eventcookie - get an event cookie + * bus_add_eventcall - event call management + * bus_remove_eventcall - event call management + * bus_post_event - post an event + * bus_config - child node configuration + * bus_unconfig - child node unconfiguration + * bus_fm_init - FMA support + * bus_fm_fini - FMA support + * bus_fm_access_enter - FMA support + * bus_fm_access_exit - FMA support + * bus_power - power management + * bus_intr_op - control interrupt mappings + * bus_hp_op - hotplug support */ #define BUSO_REV_3 3 diff --git a/usr/src/uts/common/sys/dma_engine.h b/usr/src/uts/common/sys/dma_engine.h index 7e3e492e8e..80f75ec8ef 100644 --- a/usr/src/uts/common/sys/dma_engine.h +++ b/usr/src/uts/common/sys/dma_engine.h @@ -19,6 +19,11 @@ * * CDDL HEADER END */ + +/* + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + */ + /* * Copyright 1998 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -34,8 +39,6 @@ #ifndef _SYS_DMAENGINE_H #define _SYS_DMAENGINE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/dditypes.h> @@ -232,9 +235,8 @@ int ddi_dmae_1stparty(dev_info_t *dip, int chnl); * ddi_dmae_prog() can have dmaereqp set to NULL if only the address and * count have to be updated. * - * cookiep - pointer to a ddi_dma_cookie object obtained from - * ddi_dma_segtocookie(), which contains address, count and intermediate - * memory mapping information. + * cookiep - pointer to a ddi_dma_cookie object which contains address, + * count and intermediate memory mapping information. */ int ddi_dmae_prog(dev_info_t *dip, struct ddi_dmae_req *dmaereqp, diff --git a/usr/src/uts/common/sys/sunddi.h b/usr/src/uts/common/sys/sunddi.h index 26cafb882f..1eaf3a4feb 100644 --- a/usr/src/uts/common/sys/sunddi.h +++ b/usr/src/uts/common/sys/sunddi.h @@ -21,6 +21,7 @@ /* * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. */ #ifndef _SYS_SUNDDI_H @@ -1735,10 +1736,6 @@ ddi_ctlops(dev_info_t *d, dev_info_t *r, ddi_ctl_enum_t o, void *a, void *v); */ int -ddi_dma_map(dev_info_t *dip, dev_info_t *rdip, - struct ddi_dma_req *dmareqp, ddi_dma_handle_t *handlep); - -int ddi_dma_allochdl(dev_info_t *dip, dev_info_t *rdip, ddi_dma_attr_t *attr, int (*waitfp)(caddr_t), caddr_t arg, ddi_dma_handle_t *handlep); |