1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name #ifndef _ADMA_H_ 21*5113495bSYour Name #define _ADMA_H_ 22*5113495bSYour Name 23*5113495bSYour Name #include "hif_sdio_dev.h" 24*5113495bSYour Name #include "htc_packet.h" 25*5113495bSYour Name #include "htc_api.h" 26*5113495bSYour Name #include "hif_internal.h" 27*5113495bSYour Name 28*5113495bSYour Name /* This should align with the underlying transport layer */ 29*5113495bSYour Name #define HIF_DEFAULT_IO_BLOCK_SIZE 512 30*5113495bSYour Name #define HIF_BLOCK_SIZE HIF_DEFAULT_IO_BLOCK_SIZE 31*5113495bSYour Name #define HIF_DUMMY_SPACE_MASK 0x0FFFFFFF 32*5113495bSYour Name 33*5113495bSYour Name #define HIF_SDIO_MAX_AL_CHANNELS 2 34*5113495bSYour Name 35*5113495bSYour Name struct devRegisters { 36*5113495bSYour Name uint32_t dummy; 37*5113495bSYour Name }; 38*5113495bSYour Name 39*5113495bSYour Name #include "transfer.h" 40*5113495bSYour Name #define DEV_REGISTERS_SIZE sizeof(struct devRegisters) 41*5113495bSYour Name 42*5113495bSYour Name uint8_t hif_dev_map_adma_chan_to_pipe(struct hif_sdio_device *pdev, 43*5113495bSYour Name uint8_t chan, bool upload); 44*5113495bSYour Name 45*5113495bSYour Name struct sdio_al_channel_handle *hif_dev_map_pipe_to_adma_chan 46*5113495bSYour Name ( 47*5113495bSYour Name struct hif_sdio_device *pdev, 48*5113495bSYour Name uint8_t pipeid 49*5113495bSYour Name ); 50*5113495bSYour Name 51*5113495bSYour Name void dl_xfer_cb(struct sdio_al_channel_handle *ch_handle, 52*5113495bSYour Name struct sdio_al_xfer_result *result, 53*5113495bSYour Name void *ctx); 54*5113495bSYour Name void ul_xfer_cb(struct sdio_al_channel_handle *ch_handle, 55*5113495bSYour Name struct sdio_al_xfer_result *result, 56*5113495bSYour Name void *ctx); 57*5113495bSYour Name 58*5113495bSYour Name void dl_data_avail_cb(struct sdio_al_channel_handle *ch_handle, 59*5113495bSYour Name unsigned int len); 60*5113495bSYour Name 61*5113495bSYour Name void hif_sdio_rx_q_alloc(void *ctx); 62*5113495bSYour Name #endif 63