X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fmagpie_fw_dev%2Ftarget%2Finc%2Fadf_os_types.h;h=44d77da4afac67359efc0a71197fda260325fd57;hb=8ee6f049432d2a962d056aae1d15c047f1e109a5;hp=5e180a95027f8eaeda4121a03704a1f77ebb0beb;hpb=8804cc94e3b66550797279f540b960d18a78421f;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/magpie_fw_dev/target/inc/adf_os_types.h b/target_firmware/magpie_fw_dev/target/inc/adf_os_types.h index 5e180a9..44d77da 100755 --- a/target_firmware/magpie_fw_dev/target/inc/adf_os_types.h +++ b/target_firmware/magpie_fw_dev/target/inc/adf_os_types.h @@ -1,3 +1,37 @@ +/* + * Copyright (c) 2013 Qualcomm Atheros, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted (subject to the limitations in the + * disclaimer below) provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Qualcomm Atheros nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE + * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT + * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /** * @ingroup adf_os_public * @file adf_os_types.h @@ -14,12 +48,12 @@ #define ADF_OS_MAX_SCATTER __ADF_OS_MAX_SCATTER /** * @brief Max number of scatter-gather segments. - */ + */ #define ADF_OS_MAX_SGLIST 4 /** * @brief denotes structure is packed. - */ + */ #define adf_os_packed __adf_os_packed /** @@ -52,34 +86,34 @@ typedef __adf_os_off_t adf_os_off_t; /** * @brief DMA mapping object. - */ + */ typedef __adf_os_dma_map_t adf_os_dma_map_t; /** * @brief DMA address. - */ + */ typedef __adf_os_dma_addr_t adf_os_dma_addr_t; /** * @brief DMA size. - */ + */ typedef __adf_os_dma_size_t adf_os_dma_size_t; /** * @brief Information inside a DMA map. - */ + */ typedef struct adf_os_dmamap_info{ a_uint32_t nsegs; /**< total number mapped segments*/ struct __dma_segs{ adf_os_dma_addr_t paddr; /**< physical(dma'able) address of the segment*/ adf_os_dma_size_t len; /**< length of the segment*/ - } dma_segs[ADF_OS_MAX_SCATTER]; + } dma_segs[ADF_OS_MAX_SCATTER]; }adf_os_dmamap_info_t; /** * @brief Representation of a scatter-gather list. - */ + */ typedef struct adf_os_sglist{ a_uint32_t nsegs; /**< total number of segments*/ struct __sg_segs{ @@ -99,7 +133,7 @@ typedef struct adf_os_sglist{ * operations, where reading a network packet or * storage sector corresponds to a read operation in * bus_dma. - * + * * ADF_SYNC_PREREAD Perform any synchronization * required prior to an update * of host memory by the DMA @@ -146,7 +180,7 @@ typedef enum { } a_status_t; /** - * @brief An ecore needs to provide a table of all pci device/vendor id's it + * @brief An ecore needs to provide a table of all pci device/vendor id's it * supports * * This table should be terminated by a NULL entry , i.e. {0} @@ -180,7 +214,7 @@ typedef enum { /** * @brief Representation of a h/w resource. - */ + */ typedef struct { a_uint64_t start; a_uint64_t end; @@ -191,7 +225,7 @@ typedef struct { /** * @brief Representation of bus registration data. - */ + */ typedef union { adf_os_pci_dev_id_t *pci; void *raw; @@ -199,7 +233,7 @@ typedef union { /** * @brief Representation of data required for attach. - */ + */ typedef union { adf_os_pci_dev_id_t pci; void *raw; @@ -209,7 +243,7 @@ typedef union { /** * @brief Types of buses. - */ + */ typedef enum { ADF_OS_BUS_TYPE_PCI = 1, ADF_OS_BUS_TYPE_GENERIC, @@ -217,7 +251,7 @@ typedef enum { /** * @brief IRQ handler response codes. - */ + */ typedef enum { ADF_OS_IRQ_NONE, ADF_OS_IRQ_HANDLED, @@ -225,7 +259,7 @@ typedef enum { /** * @brief DMA mask types. - */ + */ typedef enum { ADF_OS_DMA_MASK_32BIT, ADF_OS_DMA_MASK_64BIT, @@ -238,8 +272,8 @@ typedef enum { * ADF_OS_DMA_FROM_DEVICE (data going from memory to device) */ typedef enum { - ADF_OS_DMA_TO_DEVICE = __ADF_OS_DMA_TO_DEVICE, - ADF_OS_DMA_FROM_DEVICE = __ADF_OS_DMA_FROM_DEVICE, + ADF_OS_DMA_TO_DEVICE = __ADF_OS_DMA_TO_DEVICE, + ADF_OS_DMA_FROM_DEVICE = __ADF_OS_DMA_FROM_DEVICE, } adf_os_dma_dir_t; /* @@ -266,12 +300,12 @@ typedef void (*adf_os_timer_func_t)(void *); /** * @brief Prototype of IRQ function. - */ -typedef adf_os_irq_resp_t (*adf_os_drv_intr)(adf_drv_handle_t hdl); + */ +typedef adf_os_irq_resp_t (*adf_os_drv_intr)(adf_drv_handle_t hdl); /** * @brief The OS print routine. - */ + */ #define adf_os_print __adf_os_print /** @@ -282,8 +316,8 @@ typedef struct _adf_drv_info{ /** * @brief driver specific functions */ - adf_drv_handle_t (*drv_attach) (adf_os_resource_t *res, int count, - adf_os_attach_data_t *data, + adf_drv_handle_t (*drv_attach) (adf_os_resource_t *res, int count, + adf_os_attach_data_t *data, adf_os_device_t osdev); void (*drv_detach) (adf_drv_handle_t hdl); void (*drv_suspend) (adf_drv_handle_t hdl, adf_os_pm_t pm);