Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Common bus abstraction layer.
0004  *
0005  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
0006  * Copyright (c) 2010, ST-Ericsson
0007  */
0008 #ifndef WFX_BUS_H
0009 #define WFX_BUS_H
0010 
0011 #include <linux/mmc/sdio_func.h>
0012 #include <linux/spi/spi.h>
0013 
0014 #define WFX_REG_CONFIG        0x0
0015 #define WFX_REG_CONTROL       0x1
0016 #define WFX_REG_IN_OUT_QUEUE  0x2
0017 #define WFX_REG_AHB_DPORT     0x3
0018 #define WFX_REG_BASE_ADDR     0x4
0019 #define WFX_REG_SRAM_DPORT    0x5
0020 #define WFX_REG_SET_GEN_R_W   0x6
0021 #define WFX_REG_FRAME_OUT     0x7
0022 
0023 struct wfx_hwbus_ops {
0024     int (*copy_from_io)(void *bus_priv, unsigned int addr, void *dst, size_t count);
0025     int (*copy_to_io)(void *bus_priv, unsigned int addr, const void *src, size_t count);
0026     int (*irq_subscribe)(void *bus_priv);
0027     int (*irq_unsubscribe)(void *bus_priv);
0028     void (*lock)(void *bus_priv);
0029     void (*unlock)(void *bus_priv);
0030     size_t (*align_size)(void *bus_priv, size_t size);
0031 };
0032 
0033 extern struct sdio_driver wfx_sdio_driver;
0034 extern struct spi_driver wfx_spi_driver;
0035 
0036 #endif