• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __OAL_CHANNEL_HOST_IF_H__
20 #define __OAL_CHANNEL_HOST_IF_H__
21 
22 /* ****************************************************************************
23   1 Include other Head file
24 **************************************************************************** */
25 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
26 #include "oal_sdio_host_if.h"
27 #else
28 #include "plat_sdio.h"
29 #endif
30 
31 #ifdef __cplusplus
32 #if __cplusplus
33 extern "C" {
34 #endif
35 #endif
36 
37 #define oal_get_bus_default_handler()     oal_get_sdio_default_handler()
38 
39 #define oal_bus_wake_lock(bus)     oal_sdio_wake_lock(bus)
40 #define oal_bus_wake_unlock(bus)     oal_sdio_wake_unlock(bus)
41 
42 #define oal_bus_message_register(bus, msg, cb, data)  oal_sdio_message_register(bus, msg, cb, data)
43 #define oal_bus_message_unregister(bus, msg)    oal_sdio_message_unregister(bus, msg)
44 
45 #define oal_bus_patch_readsb(buf, len, ms_timeout)  sdio_patch_readsb(buf, len, ms_timeout)
46 #define oal_bus_patch_writesb(buf, len)  sdio_patch_writesb(buf, len)
47 
48 #define oal_bus_claim_host(bus)     oal_sdio_claim_host(bus)
49 #define oal_bus_release_host(bus)     oal_sdio_release_host(bus)
50 
51 #define oal_bus_send_msg(bus, val)     oal_sdio_send_msg(bus, val)
52 
53 #define oal_disable_bus_state(bus, mask)     oal_disable_sdio_state(bus, mask)
54 
55 #define oal_bus_rx_transfer_lock(bus)     oal_sdio_rx_transfer_lock(bus)
56 #define oal_bus_rx_transfer_unlock(bus)     oal_sdio_rx_transfer_unlock(bus)
57 
58 #define oal_bus_init_module(bus, pdata)     oal_sdio_init_module(bus, pdata)
59 
60 #define oal_bus_transfer_rx_register(bus, rx_handler) oal_sdio_transfer_rx_register(bus, rx_handler)
61 #define oal_bus_transfer_rx_unregister(bus)     oal_sdio_transfer_rx_unregister(bus)
62 
63 #define oal_bus_func_init(bus)     oal_sdio_func_init(bus)
64 #define oal_bus_func_remove(bus)     oal_sdio_func_remove(bus)
65 
66 #define oal_bus_transfer_prepare(bus)   oal_sdio_transfer_prepare(bus)
67 
68 #ifdef __cplusplus
69 #if __cplusplus
70 }
71 #endif
72 #endif
73 
74 #endif
75