Merge tag 'kgdb-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt...
[linux-2.6-microblaze.git] / drivers / staging / wfx / bus.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Common bus abstraction layer.
4  *
5  * Copyright (c) 2017-2018, Silicon Laboratories, Inc.
6  * Copyright (c) 2010, ST-Ericsson
7  */
8 #ifndef WFX_BUS_H
9 #define WFX_BUS_H
10
11 #include <linux/mmc/sdio_func.h>
12 #include <linux/spi/spi.h>
13
14 #define WFX_REG_CONFIG        0x0
15 #define WFX_REG_CONTROL       0x1
16 #define WFX_REG_IN_OUT_QUEUE  0x2
17 #define WFX_REG_AHB_DPORT     0x3
18 #define WFX_REG_BASE_ADDR     0x4
19 #define WFX_REG_SRAM_DPORT    0x5
20 #define WFX_REG_SET_GEN_R_W   0x6
21 #define WFX_REG_FRAME_OUT     0x7
22
23 struct hwbus_ops {
24         int (*copy_from_io)(void *bus_priv, unsigned int addr,
25                             void *dst, size_t count);
26         int (*copy_to_io)(void *bus_priv, unsigned int addr,
27                           const void *src, size_t count);
28         void (*lock)(void *bus_priv);
29         void (*unlock)(void *bus_priv);
30         size_t (*align_size)(void *bus_priv, size_t size);
31 };
32
33 extern struct sdio_driver wfx_sdio_driver;
34 extern struct spi_driver wfx_spi_driver;
35
36 #endif