blob: cf12ca6817e1168f17ee29a142ff3d0281531042 [file] [log] [blame]
Sagar Dharia7c927c02016-11-23 11:51:43 -07001/*
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +05302 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
Sagar Dharia7c927c02016-11-23 11:51:43 -07003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#ifndef _LINUX_QCOM_GENI_SE
16#define _LINUX_QCOM_GENI_SE
Girish Mahadevanebeed352016-11-23 10:59:29 -070017#include <linux/clk.h>
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060018#include <linux/dma-direction.h>
19#include <linux/io.h>
20#include <linux/list.h>
Girish Mahadevanebeed352016-11-23 10:59:29 -070021#include <linux/msm-bus.h>
22#include <linux/msm-bus-board.h>
Sagar Dharia7c927c02016-11-23 11:51:43 -070023
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060024/* Transfer mode supported by GENI Serial Engines */
Sagar Dharia7c927c02016-11-23 11:51:43 -070025enum se_xfer_mode {
26 INVALID,
27 FIFO_MODE,
28 GSI_DMA,
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060029 SE_DMA,
Sagar Dharia7c927c02016-11-23 11:51:43 -070030};
31
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060032/* Protocols supported by GENI Serial Engines */
Sagar Dharia7c927c02016-11-23 11:51:43 -070033enum se_protocol_types {
34 NONE,
35 SPI,
36 UART,
37 I2C,
38 I3C
39};
40
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060041/**
42 * struct geni_se_rsc - GENI Serial Engine Resource
Shrey Vijaydb097e82018-05-09 17:31:00 +053043 * @ctrl_dev Pointer to controller device.
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060044 * @wrapper_dev: Pointer to the parent QUPv3 core.
45 * @se_clk: Handle to the core serial engine clock.
46 * @m_ahb_clk: Handle to the primary AHB clock.
47 * @s_ahb_clk: Handle to the secondary AHB clock.
48 * @ab_list: List Head of Average bus banwidth list.
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053049 * @ab_list_noc: List Head of Average DDR path bus
50 bandwidth list.
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060051 * @ab: Average bus bandwidth request value.
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053052 * @ab_noc: Average DDR path bus bandwidth request value.
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060053 * @ib_list: List Head of Instantaneous bus banwidth list.
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053054 * @ib_list_noc: List Head of Instantaneous DDR path bus
55 bandwidth list.
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060056 * @ib: Instantaneous bus bandwidth request value.
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053057 * @ib_noc: Instantaneous DDR path bus bandwidth
58 request value.
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060059 * @geni_pinctrl: Handle to the pinctrl configuration.
60 * @geni_gpio_active: Handle to the default/active pinctrl state.
61 * @geni_gpi_sleep: Handle to the sleep pinctrl state.
62 */
Girish Mahadevanebeed352016-11-23 10:59:29 -070063struct se_geni_rsc {
Shrey Vijaydb097e82018-05-09 17:31:00 +053064 struct device *ctrl_dev;
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060065 struct device *wrapper_dev;
Girish Mahadevanebeed352016-11-23 10:59:29 -070066 struct clk *se_clk;
67 struct clk *m_ahb_clk;
68 struct clk *s_ahb_clk;
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060069 struct list_head ab_list;
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053070 struct list_head ab_list_noc;
Girish Mahadevanebeed352016-11-23 10:59:29 -070071 unsigned long ab;
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053072 unsigned long ab_noc;
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -060073 struct list_head ib_list;
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053074 struct list_head ib_list_noc;
Girish Mahadevanebeed352016-11-23 10:59:29 -070075 unsigned long ib;
Prudhvi Yarlagaddaf5a559a2019-01-11 16:39:52 +053076 unsigned long ib_noc;
Girish Mahadevanebeed352016-11-23 10:59:29 -070077 struct pinctrl *geni_pinctrl;
78 struct pinctrl_state *geni_gpio_active;
79 struct pinctrl_state *geni_gpio_sleep;
Shrey Vijay6f231202017-07-11 11:16:16 +053080 int clk_freq_out;
Girish Mahadevanebeed352016-11-23 10:59:29 -070081};
82
83#define PINCTRL_DEFAULT "default"
Akash Asthanab53e9f52019-02-20 17:43:05 +053084#define PINCTRL_ACTIVE "active"
Girish Mahadevanebeed352016-11-23 10:59:29 -070085#define PINCTRL_SLEEP "sleep"
86
Shrey Vijay6f231202017-07-11 11:16:16 +053087#define KHz(freq) (1000 * (freq))
88
Girish Mahadevan2ef85af2017-02-14 14:42:22 -070089/* Common SE registers */
Sagar Dharia7c927c02016-11-23 11:51:43 -070090#define GENI_INIT_CFG_REVISION (0x0)
91#define GENI_S_INIT_CFG_REVISION (0x4)
92#define GENI_FORCE_DEFAULT_REG (0x20)
93#define GENI_OUTPUT_CTRL (0x24)
94#define GENI_CGC_CTRL (0x28)
95#define SE_GENI_STATUS (0x40)
96#define GENI_SER_M_CLK_CFG (0x48)
97#define GENI_SER_S_CLK_CFG (0x4C)
98#define GENI_CLK_CTRL_RO (0x60)
Girish Mahadevanaf5f2bc2017-08-15 12:05:40 -060099#define GENI_IF_FIFO_DISABLE_RO (0x64)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700100#define GENI_FW_REVISION_RO (0x68)
101#define GENI_FW_S_REVISION_RO (0x6C)
102#define SE_GENI_CLK_SEL (0x7C)
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600103#define SE_GENI_BYTE_GRAN (0x254)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700104#define SE_GENI_DMA_MODE_EN (0x258)
105#define SE_GENI_TX_PACKING_CFG0 (0x260)
106#define SE_GENI_TX_PACKING_CFG1 (0x264)
107#define SE_GENI_RX_PACKING_CFG0 (0x284)
108#define SE_GENI_RX_PACKING_CFG1 (0x288)
109#define SE_GENI_M_CMD0 (0x600)
110#define SE_GENI_M_CMD_CTRL_REG (0x604)
111#define SE_GENI_M_IRQ_STATUS (0x610)
112#define SE_GENI_M_IRQ_EN (0x614)
113#define SE_GENI_M_IRQ_CLEAR (0x618)
114#define SE_GENI_S_CMD0 (0x630)
115#define SE_GENI_S_CMD_CTRL_REG (0x634)
116#define SE_GENI_S_IRQ_STATUS (0x640)
117#define SE_GENI_S_IRQ_EN (0x644)
118#define SE_GENI_S_IRQ_CLEAR (0x648)
119#define SE_GENI_TX_FIFOn (0x700)
120#define SE_GENI_RX_FIFOn (0x780)
121#define SE_GENI_TX_FIFO_STATUS (0x800)
122#define SE_GENI_RX_FIFO_STATUS (0x804)
123#define SE_GENI_TX_WATERMARK_REG (0x80C)
124#define SE_GENI_RX_WATERMARK_REG (0x810)
125#define SE_GENI_RX_RFR_WATERMARK_REG (0x814)
Girish Mahadevan7115f4e2017-03-15 15:18:34 -0600126#define SE_GENI_IOS (0x908)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700127#define SE_GENI_M_GP_LENGTH (0x910)
128#define SE_GENI_S_GP_LENGTH (0x914)
Girish Mahadevana95a3612017-04-19 11:49:24 -0600129#define SE_GSI_EVENT_EN (0xE18)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700130#define SE_IRQ_EN (0xE1C)
131#define SE_HW_PARAM_0 (0xE24)
132#define SE_HW_PARAM_1 (0xE28)
133#define SE_DMA_GENERAL_CFG (0xE30)
Girish Mahadevan3b7e9742017-09-15 15:17:16 -0600134#define SE_DMA_DEBUG_REG0 (0xE40)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700135
136/* GENI_OUTPUT_CTRL fields */
137#define DEFAULT_IO_OUTPUT_CTRL_MSK (GENMASK(6, 0))
138
139/* GENI_FORCE_DEFAULT_REG fields */
140#define FORCE_DEFAULT (BIT(0))
141
142/* GENI_CGC_CTRL fields */
143#define CFG_AHB_CLK_CGC_ON (BIT(0))
144#define CFG_AHB_WR_ACLK_CGC_ON (BIT(1))
145#define DATA_AHB_CLK_CGC_ON (BIT(2))
146#define SCLK_CGC_ON (BIT(3))
147#define TX_CLK_CGC_ON (BIT(4))
148#define RX_CLK_CGC_ON (BIT(5))
149#define EXT_CLK_CGC_ON (BIT(6))
150#define PROG_RAM_HCLK_OFF (BIT(8))
151#define PROG_RAM_SCLK_OFF (BIT(9))
152#define DEFAULT_CGC_EN (GENMASK(6, 0))
153
154/* GENI_STATUS fields */
155#define M_GENI_CMD_ACTIVE (BIT(0))
156#define S_GENI_CMD_ACTIVE (BIT(12))
157
158/* GENI_SER_M_CLK_CFG/GENI_SER_S_CLK_CFG */
159#define SER_CLK_EN (BIT(0))
160#define CLK_DIV_MSK (GENMASK(15, 4))
161#define CLK_DIV_SHFT (4)
162
163/* CLK_CTRL_RO fields */
164
Girish Mahadevanaf5f2bc2017-08-15 12:05:40 -0600165/* FIFO_IF_DISABLE_RO fields */
166#define FIFO_IF_DISABLE (BIT(0))
Sagar Dharia7c927c02016-11-23 11:51:43 -0700167
168/* FW_REVISION_RO fields */
169#define FW_REV_PROTOCOL_MSK (GENMASK(15, 8))
170#define FW_REV_PROTOCOL_SHFT (8)
Mukesh Kumar Savaliya17692d92018-04-12 23:36:27 +0530171#define FW_REV_VERSION_MSK (GENMASK(7, 0))
Sagar Dharia7c927c02016-11-23 11:51:43 -0700172
Girish Mahadevan2ef85af2017-02-14 14:42:22 -0700173/* GENI_CLK_SEL fields */
174#define CLK_SEL_MSK (GENMASK(2, 0))
175
Sagar Dharia7c927c02016-11-23 11:51:43 -0700176/* SE_GENI_DMA_MODE_EN */
177#define GENI_DMA_MODE_EN (BIT(0))
178
179/* GENI_M_CMD0 fields */
180#define M_OPCODE_MSK (GENMASK(31, 27))
181#define M_OPCODE_SHFT (27)
182#define M_PARAMS_MSK (GENMASK(26, 0))
183
184/* GENI_M_CMD_CTRL_REG */
185#define M_GENI_CMD_CANCEL BIT(2)
186#define M_GENI_CMD_ABORT BIT(1)
187#define M_GENI_DISABLE BIT(0)
188
189/* GENI_S_CMD0 fields */
190#define S_OPCODE_MSK (GENMASK(31, 27))
191#define S_OPCODE_SHFT (27)
192#define S_PARAMS_MSK (GENMASK(26, 0))
193
194/* GENI_S_CMD_CTRL_REG */
195#define S_GENI_CMD_CANCEL (BIT(2))
196#define S_GENI_CMD_ABORT (BIT(1))
197#define S_GENI_DISABLE (BIT(0))
198
199/* GENI_M_IRQ_EN fields */
200#define M_CMD_DONE_EN (BIT(0))
201#define M_CMD_OVERRUN_EN (BIT(1))
202#define M_ILLEGAL_CMD_EN (BIT(2))
203#define M_CMD_FAILURE_EN (BIT(3))
204#define M_CMD_CANCEL_EN (BIT(4))
205#define M_CMD_ABORT_EN (BIT(5))
206#define M_TIMESTAMP_EN (BIT(6))
207#define M_RX_IRQ_EN (BIT(7))
208#define M_GP_SYNC_IRQ_0_EN (BIT(8))
209#define M_GP_IRQ_0_EN (BIT(9))
210#define M_GP_IRQ_1_EN (BIT(10))
211#define M_GP_IRQ_2_EN (BIT(11))
212#define M_GP_IRQ_3_EN (BIT(12))
213#define M_GP_IRQ_4_EN (BIT(13))
214#define M_GP_IRQ_5_EN (BIT(14))
215#define M_IO_DATA_DEASSERT_EN (BIT(22))
216#define M_IO_DATA_ASSERT_EN (BIT(23))
217#define M_RX_FIFO_RD_ERR_EN (BIT(24))
218#define M_RX_FIFO_WR_ERR_EN (BIT(25))
219#define M_RX_FIFO_WATERMARK_EN (BIT(26))
220#define M_RX_FIFO_LAST_EN (BIT(27))
221#define M_TX_FIFO_RD_ERR_EN (BIT(28))
222#define M_TX_FIFO_WR_ERR_EN (BIT(29))
223#define M_TX_FIFO_WATERMARK_EN (BIT(30))
224#define M_SEC_IRQ_EN (BIT(31))
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600225#define M_COMMON_GENI_M_IRQ_EN (GENMASK(6, 1) | \
226 M_IO_DATA_DEASSERT_EN | \
Sagar Dharia7c927c02016-11-23 11:51:43 -0700227 M_IO_DATA_ASSERT_EN | M_RX_FIFO_RD_ERR_EN | \
228 M_RX_FIFO_WR_ERR_EN | M_TX_FIFO_RD_ERR_EN | \
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600229 M_TX_FIFO_WR_ERR_EN)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700230
231/* GENI_S_IRQ_EN fields */
232#define S_CMD_DONE_EN (BIT(0))
233#define S_CMD_OVERRUN_EN (BIT(1))
234#define S_ILLEGAL_CMD_EN (BIT(2))
235#define S_CMD_FAILURE_EN (BIT(3))
236#define S_CMD_CANCEL_EN (BIT(4))
237#define S_CMD_ABORT_EN (BIT(5))
238#define S_GP_SYNC_IRQ_0_EN (BIT(8))
239#define S_GP_IRQ_0_EN (BIT(9))
240#define S_GP_IRQ_1_EN (BIT(10))
241#define S_GP_IRQ_2_EN (BIT(11))
242#define S_GP_IRQ_3_EN (BIT(12))
243#define S_GP_IRQ_4_EN (BIT(13))
244#define S_GP_IRQ_5_EN (BIT(14))
245#define S_IO_DATA_DEASSERT_EN (BIT(22))
246#define S_IO_DATA_ASSERT_EN (BIT(23))
247#define S_RX_FIFO_RD_ERR_EN (BIT(24))
248#define S_RX_FIFO_WR_ERR_EN (BIT(25))
249#define S_RX_FIFO_WATERMARK_EN (BIT(26))
250#define S_RX_FIFO_LAST_EN (BIT(27))
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600251#define S_COMMON_GENI_S_IRQ_EN (GENMASK(5, 1) | GENMASK(13, 9) | \
Sagar Dharia7c927c02016-11-23 11:51:43 -0700252 S_RX_FIFO_RD_ERR_EN | S_RX_FIFO_WR_ERR_EN)
253
254/* GENI_/TX/RX/RX_RFR/_WATERMARK_REG fields */
255#define WATERMARK_MSK (GENMASK(5, 0))
256
257/* GENI_TX_FIFO_STATUS fields */
258#define TX_FIFO_WC (GENMASK(27, 0))
259
260/* GENI_RX_FIFO_STATUS fields */
261#define RX_LAST (BIT(31))
262#define RX_LAST_BYTE_VALID_MSK (GENMASK(30, 28))
263#define RX_LAST_BYTE_VALID_SHFT (28)
264#define RX_FIFO_WC_MSK (GENMASK(24, 0))
265
Girish Mahadevana95a3612017-04-19 11:49:24 -0600266/* SE_GSI_EVENT_EN fields */
267#define DMA_RX_EVENT_EN (BIT(0))
268#define DMA_TX_EVENT_EN (BIT(1))
269#define GENI_M_EVENT_EN (BIT(2))
270#define GENI_S_EVENT_EN (BIT(3))
271
Girish Mahadevan7115f4e2017-03-15 15:18:34 -0600272/* SE_GENI_IOS fields */
273#define IO2_DATA_IN (BIT(1))
274#define RX_DATA_IN (BIT(0))
275
Sagar Dharia7c927c02016-11-23 11:51:43 -0700276/* SE_IRQ_EN fields */
277#define DMA_RX_IRQ_EN (BIT(0))
278#define DMA_TX_IRQ_EN (BIT(1))
279#define GENI_M_IRQ_EN (BIT(2))
280#define GENI_S_IRQ_EN (BIT(3))
281
282/* SE_HW_PARAM_0 fields */
283#define TX_FIFO_WIDTH_MSK (GENMASK(29, 24))
284#define TX_FIFO_WIDTH_SHFT (24)
285#define TX_FIFO_DEPTH_MSK (GENMASK(21, 16))
286#define TX_FIFO_DEPTH_SHFT (16)
287
288/* SE_HW_PARAM_1 fields */
289#define RX_FIFO_WIDTH_MSK (GENMASK(29, 24))
290#define RX_FIFO_WIDTH_SHFT (24)
291#define RX_FIFO_DEPTH_MSK (GENMASK(21, 16))
292#define RX_FIFO_DEPTH_SHFT (16)
293
294/* SE_DMA_GENERAL_CFG */
295#define DMA_RX_CLK_CGC_ON (BIT(0))
296#define DMA_TX_CLK_CGC_ON (BIT(1))
297#define DMA_AHB_SLV_CFG_ON (BIT(2))
298#define AHB_SEC_SLV_CLK_CGC_ON (BIT(3))
299#define DUMMY_RX_NON_BUFFERABLE (BIT(4))
300#define RX_DMA_ZERO_PADDING_EN (BIT(5))
301#define RX_DMA_IRQ_DELAY_MSK (GENMASK(8, 6))
302#define RX_DMA_IRQ_DELAY_SHFT (6)
303
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600304#define SE_DMA_TX_PTR_L (0xC30)
305#define SE_DMA_TX_PTR_H (0xC34)
306#define SE_DMA_TX_ATTR (0xC38)
307#define SE_DMA_TX_LEN (0xC3C)
308#define SE_DMA_TX_IRQ_STAT (0xC40)
309#define SE_DMA_TX_IRQ_CLR (0xC44)
310#define SE_DMA_TX_IRQ_EN (0xC48)
311#define SE_DMA_TX_IRQ_EN_SET (0xC4C)
312#define SE_DMA_TX_IRQ_EN_CLR (0xC50)
313#define SE_DMA_TX_LEN_IN (0xC54)
314#define SE_DMA_TX_FSM_RST (0xC58)
315#define SE_DMA_TX_MAX_BURST (0xC5C)
316
317#define SE_DMA_RX_PTR_L (0xD30)
318#define SE_DMA_RX_PTR_H (0xD34)
319#define SE_DMA_RX_ATTR (0xD38)
320#define SE_DMA_RX_LEN (0xD3C)
321#define SE_DMA_RX_IRQ_STAT (0xD40)
322#define SE_DMA_RX_IRQ_CLR (0xD44)
323#define SE_DMA_RX_IRQ_EN (0xD48)
324#define SE_DMA_RX_IRQ_EN_SET (0xD4C)
325#define SE_DMA_RX_IRQ_EN_CLR (0xD50)
326#define SE_DMA_RX_LEN_IN (0xD54)
327#define SE_DMA_RX_FSM_RST (0xD58)
328#define SE_DMA_RX_MAX_BURST (0xD5C)
329#define SE_DMA_RX_FLUSH (0xD60)
330
Karthikeyan Ramasubramaniana5766572017-04-19 11:31:42 -0600331/* SE_DMA_TX_IRQ_STAT Register fields */
332#define TX_DMA_DONE (BIT(0))
333#define TX_EOT (BIT(1))
334#define TX_SBE (BIT(2))
335#define TX_RESET_DONE (BIT(3))
336
337/* SE_DMA_RX_IRQ_STAT Register fields */
338#define RX_DMA_DONE (BIT(0))
339#define RX_EOT (BIT(1))
340#define RX_SBE (BIT(2))
341#define RX_RESET_DONE (BIT(3))
342#define RX_FLUSH_DONE (BIT(4))
343#define RX_GENI_GP_IRQ (GENMASK(10, 5))
344#define RX_GENI_CANCEL_IRQ (BIT(11))
345#define RX_GENI_GP_IRQ_EXT (GENMASK(13, 12))
346
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600347#define DEFAULT_BUS_WIDTH (4)
348#define DEFAULT_SE_CLK (19200000)
349
Girish Mahadevanaf5f2bc2017-08-15 12:05:40 -0600350/* GSI TRE fields */
351/* Packing fields */
352#define GSI_TX_PACK_EN (BIT(0))
353#define GSI_RX_PACK_EN (BIT(1))
354#define GSI_PRESERVE_PACK (BIT(2))
355
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600356#define GENI_SE_ERR(log_ctx, print, dev, x...) do { \
357if (log_ctx) \
358 ipc_log_string(log_ctx, x); \
359if (print) { \
360 if (dev) \
361 dev_err((dev), x); \
362 else \
363 pr_err(x); \
364} \
365} while (0)
366
367#define GENI_SE_DBG(log_ctx, print, dev, x...) do { \
368if (log_ctx) \
369 ipc_log_string(log_ctx, x); \
370if (print) { \
371 if (dev) \
372 dev_dbg((dev), x); \
373 else \
374 pr_debug(x); \
375} \
376} while (0)
377
378
379#ifdef CONFIG_QCOM_GENI_SE
380/**
381 * geni_read_reg_nolog() - Helper function to read from a GENI register
382 * @base: Base address of the serial engine's register block.
383 * @offset: Offset within the serial engine's register block.
384 *
385 * Return: Return the contents of the register.
386 */
387unsigned int geni_read_reg_nolog(void __iomem *base, int offset);
388
389/**
390 * geni_write_reg_nolog() - Helper function to write into a GENI register
391 * @value: Value to be written into the register.
392 * @base: Base address of the serial engine's register block.
393 * @offset: Offset within the serial engine's register block.
394 */
395void geni_write_reg_nolog(unsigned int value, void __iomem *base, int offset);
396
397/**
398 * geni_read_reg() - Helper function to read from a GENI register
399 * @base: Base address of the serial engine's register block.
400 * @offset: Offset within the serial engine's register block.
401 *
402 * Return: Return the contents of the register.
403 */
404unsigned int geni_read_reg(void __iomem *base, int offset);
405
406/**
407 * geni_write_reg() - Helper function to write into a GENI register
408 * @value: Value to be written into the register.
409 * @base: Base address of the serial engine's register block.
410 * @offset: Offset within the serial engine's register block.
411 */
412void geni_write_reg(unsigned int value, void __iomem *base, int offset);
413
414/**
415 * get_se_proto() - Read the protocol configured for a serial engine
416 * @base: Base address of the serial engine's register block.
417 *
418 * Return: Protocol value as configured in the serial engine.
419 */
420int get_se_proto(void __iomem *base);
421
422/**
Mukesh Kumar Savaliya17692d92018-04-12 23:36:27 +0530423 * get_se_m_fw() - Read the Firmware ver for the Main seqeuncer engine
424 * @base: Base address of the serial engine's register block.
425 *
426 * Return: Firmware version for the Main seqeuncer engine
427 */
428int get_se_m_fw(void __iomem *base);
429
430/**
431 * get_se_s_fw() - Read the Firmware ver for the Secondry seqeuncer engine
432 * @base: Base address of the serial engine's register block.
433 *
434 * Return: Firmware version for the Secondry seqeuncer engine
435 */
436int get_se_s_fw(void __iomem *base);
437
438/**
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600439 * geni_se_init() - Initialize the GENI Serial Engine
440 * @base: Base address of the serial engine's register block.
441 * @rx_wm: Receive watermark to be configured.
442 * @rx_rfr_wm: Ready-for-receive watermark to be configured.
443 *
444 * This function is used to initialize the GENI serial engine, configure
445 * the transfer mode, receive watermark and ready-for-receive watermarks.
446 *
447 * Return: 0 on success, standard Linux error codes on failure/error.
448 */
449int geni_se_init(void __iomem *base, unsigned int rx_wm, unsigned int rx_rfr);
450
451/**
452 * geni_se_select_mode() - Select the serial engine transfer mode
453 * @base: Base address of the serial engine's register block.
454 * @mode: Transfer mode to be selected.
455 *
456 * Return: 0 on success, standard Linux error codes on failure.
457 */
458int geni_se_select_mode(void __iomem *base, int mode);
459
460/**
461 * geni_setup_m_cmd() - Setup the primary sequencer
462 * @base: Base address of the serial engine's register block.
463 * @cmd: Command/Operation to setup in the primary sequencer.
464 * @params: Parameter for the sequencer command.
465 *
466 * This function is used to configure the primary sequencer with the
467 * command and its assoicated parameters.
468 */
469void geni_setup_m_cmd(void __iomem *base, u32 cmd, u32 params);
470
471/**
472 * geni_setup_s_cmd() - Setup the secondary sequencer
473 * @base: Base address of the serial engine's register block.
474 * @cmd: Command/Operation to setup in the secondary sequencer.
475 * @params: Parameter for the sequencer command.
476 *
477 * This function is used to configure the secondary sequencer with the
478 * command and its assoicated parameters.
479 */
480void geni_setup_s_cmd(void __iomem *base, u32 cmd, u32 params);
481
482/**
483 * geni_cancel_m_cmd() - Cancel the command configured in the primary sequencer
484 * @base: Base address of the serial engine's register block.
485 *
486 * This function is used to cancel the currently configured command in the
487 * primary sequencer.
488 */
489void geni_cancel_m_cmd(void __iomem *base);
490
491/**
492 * geni_cancel_s_cmd() - Cancel the command configured in the secondary
493 * sequencer
494 * @base: Base address of the serial engine's register block.
495 *
496 * This function is used to cancel the currently configured command in the
497 * secondary sequencer.
498 */
499void geni_cancel_s_cmd(void __iomem *base);
500
501/**
502 * geni_abort_m_cmd() - Abort the command configured in the primary sequencer
503 * @base: Base address of the serial engine's register block.
504 *
505 * This function is used to force abort the currently configured command in the
506 * primary sequencer.
507 */
508void geni_abort_m_cmd(void __iomem *base);
509
510/**
511 * geni_abort_s_cmd() - Abort the command configured in the secondary
512 * sequencer
513 * @base: Base address of the serial engine's register block.
514 *
515 * This function is used to force abort the currently configured command in the
516 * secondary sequencer.
517 */
518void geni_abort_s_cmd(void __iomem *base);
519
520/**
521 * get_tx_fifo_depth() - Get the TX fifo depth of the serial engine
522 * @base: Base address of the serial engine's register block.
523 *
524 * This function is used to get the depth i.e. number of elements in the
525 * TX fifo of the serial engine.
526 *
527 * Return: TX fifo depth in units of FIFO words.
528 */
529int get_tx_fifo_depth(void __iomem *base);
530
531/**
532 * get_tx_fifo_width() - Get the TX fifo width of the serial engine
533 * @base: Base address of the serial engine's register block.
534 *
535 * This function is used to get the width i.e. word size per element in the
536 * TX fifo of the serial engine.
537 *
538 * Return: TX fifo width in bits.
539 */
540int get_tx_fifo_width(void __iomem *base);
541
542/**
543 * get_rx_fifo_depth() - Get the RX fifo depth of the serial engine
544 * @base: Base address of the serial engine's register block.
545 *
546 * This function is used to get the depth i.e. number of elements in the
547 * RX fifo of the serial engine.
548 *
549 * Return: RX fifo depth in units of FIFO words.
550 */
551int get_rx_fifo_depth(void __iomem *base);
552
553/**
554 * se_get_packing_config() - Get the packing configuration based on input
555 * @bpw: Bits of data per transfer word.
556 * @pack_words: Number of words per fifo element.
557 * @msb_to_lsb: Transfer from MSB to LSB or vice-versa.
558 * @cfg0: Output buffer to hold the first half of configuration.
559 * @cfg1: Output buffer to hold the second half of configuration.
560 *
561 * This function is used to calculate the packing configuration based on
562 * the input packing requirement and the configuration logic.
563 */
564void se_get_packing_config(int bpw, int pack_words, bool msb_to_lsb,
565 unsigned long *cfg0, unsigned long *cfg1);
566
567/**
568 * se_config_packing() - Packing configuration of the serial engine
569 * @base: Base address of the serial engine's register block.
570 * @bpw: Bits of data per transfer word.
571 * @pack_words: Number of words per fifo element.
572 * @msb_to_lsb: Transfer from MSB to LSB or vice-versa.
573 *
574 * This function is used to configure the packing rules for the current
575 * transfer.
576 */
577void se_config_packing(void __iomem *base, int bpw, int pack_words,
578 bool msb_to_lsb);
579
580/**
Karthikeyan Ramasubramanian383b41e2017-10-25 17:32:52 -0600581 * se_geni_clks_off() - Turn off clocks associated with the serial
582 * engine
583 * @rsc: Handle to resources associated with the serial engine.
584 *
585 * Return: 0 on success, standard Linux error codes on failure/error.
586 */
587int se_geni_clks_off(struct se_geni_rsc *rsc);
588
589/**
590 * se_geni_clks_on() - Turn on clocks associated with the serial
591 * engine
592 * @rsc: Handle to resources associated with the serial engine.
593 *
594 * Return: 0 on success, standard Linux error codes on failure/error.
595 */
596int se_geni_clks_on(struct se_geni_rsc *rsc);
597
598/**
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600599 * se_geni_resources_off() - Turn off resources associated with the serial
600 * engine
601 * @rsc: Handle to resources associated with the serial engine.
602 *
603 * Return: 0 on success, standard Linux error codes on failure/error.
604 */
605int se_geni_resources_off(struct se_geni_rsc *rsc);
606
607/**
608 * se_geni_resources_on() - Turn on resources associated with the serial
609 * engine
610 * @rsc: Handle to resources associated with the serial engine.
611 *
612 * Return: 0 on success, standard Linux error codes on failure/error.
613 */
614int se_geni_resources_on(struct se_geni_rsc *rsc);
615
616/**
617 * geni_se_resources_init() - Init the SE resource structure
618 * @rsc: SE resource structure to be initialized.
619 * @ab: Initial Average bus bandwidth request value.
620 * @ib: Initial Instantaneous bus bandwidth request value.
621 *
622 * Return: 0 on success, standard Linux error codes on failure.
623 */
624int geni_se_resources_init(struct se_geni_rsc *rsc,
625 unsigned long ab, unsigned long ib);
626
627/**
Karthikeyan Ramasubramanian8bef5ea2017-05-11 17:02:46 -0600628 * geni_se_clk_tbl_get() - Get the clock table to program DFS
629 * @rsc: Resource for which the clock table is requested.
630 * @tbl: Table in which the output is returned.
631 *
632 * This function is called by the protocol drivers to determine the different
633 * clock frequencies supported by Serail Engine Core Clock. The protocol
634 * drivers use the output to determine the clock frequency index to be
635 * programmed into DFS.
636 *
637 * Return: number of valid performance levels in the table on success,
638 * standard Linux error codes on failure.
639 */
640int geni_se_clk_tbl_get(struct se_geni_rsc *rsc, unsigned long **tbl);
641
642/**
643 * geni_se_clk_freq_match() - Get the matching or closest SE clock frequency
644 * @rsc: Resource for which the clock frequency is requested.
645 * @req_freq: Requested clock frequency.
646 * @index: Index of the resultant frequency in the table.
647 * @res_freq: Resultant frequency which matches or is closer to the
648 * requested frequency.
649 * @exact: Flag to indicate exact multiple requirement of the requested
650 * frequency .
651 *
652 * This function is called by the protocol drivers to determine the matching
653 * or closest frequency of the Serial Engine clock to be selected in order
654 * to meet the performance requirements.
655 *
656 * Return: 0 on success, standard Linux error codes on failure.
657 */
658int geni_se_clk_freq_match(struct se_geni_rsc *rsc, unsigned long req_freq,
659 unsigned int *index, unsigned long *res_freq,
660 bool exact);
661
662/**
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600663 * geni_se_tx_dma_prep() - Prepare the Serial Engine for TX DMA transfer
664 * @wrapper_dev: QUPv3 Wrapper Device to which the TX buffer is mapped.
665 * @base: Base address of the SE register block.
666 * @tx_buf: Pointer to the TX buffer.
667 * @tx_len: Length of the TX buffer.
668 * @tx_dma: Pointer to store the mapped DMA address.
669 *
670 * This function is used to prepare the buffers for DMA TX.
671 *
672 * Return: 0 on success, standard Linux error codes on error/failure.
673 */
674int geni_se_tx_dma_prep(struct device *wrapper_dev, void __iomem *base,
675 void *tx_buf, int tx_len, dma_addr_t *tx_dma);
676
677/**
678 * geni_se_rx_dma_prep() - Prepare the Serial Engine for RX DMA transfer
679 * @wrapper_dev: QUPv3 Wrapper Device to which the TX buffer is mapped.
680 * @base: Base address of the SE register block.
681 * @rx_buf: Pointer to the RX buffer.
682 * @rx_len: Length of the RX buffer.
683 * @rx_dma: Pointer to store the mapped DMA address.
684 *
685 * This function is used to prepare the buffers for DMA RX.
686 *
687 * Return: 0 on success, standard Linux error codes on error/failure.
688 */
689int geni_se_rx_dma_prep(struct device *wrapper_dev, void __iomem *base,
690 void *rx_buf, int rx_len, dma_addr_t *rx_dma);
691
692/**
693 * geni_se_tx_dma_unprep() - Unprepare the Serial Engine after TX DMA transfer
694 * @wrapper_dev: QUPv3 Wrapper Device to which the TX buffer is mapped.
695 * @tx_dma: DMA address of the TX buffer.
696 * @tx_len: Length of the TX buffer.
697 *
698 * This function is used to unprepare the DMA buffers after DMA TX.
699 */
700void geni_se_tx_dma_unprep(struct device *wrapper_dev,
701 dma_addr_t tx_dma, int tx_len);
702
703/**
704 * geni_se_rx_dma_unprep() - Unprepare the Serial Engine after RX DMA transfer
705 * @wrapper_dev: QUPv3 Wrapper Device to which the TX buffer is mapped.
706 * @rx_dma: DMA address of the RX buffer.
707 * @rx_len: Length of the RX buffer.
708 *
709 * This function is used to unprepare the DMA buffers after DMA RX.
710 */
711void geni_se_rx_dma_unprep(struct device *wrapper_dev,
712 dma_addr_t rx_dma, int rx_len);
713
714/**
715 * geni_se_qupv3_hw_version() - Read the QUPv3 Hardware version
716 * @wrapper_dev: Pointer to the corresponding QUPv3 wrapper core.
717 * @major: Buffer for Major Version field.
718 * @minor: Buffer for Minor Version field.
719 * @step: Buffer for Step Version field.
720 *
721 * Return: 0 on success, standard Linux error codes on failure/error.
722 */
723int geni_se_qupv3_hw_version(struct device *wrapper_dev, unsigned int *major,
724 unsigned int *minor, unsigned int *step);
725
726/**
727 * geni_se_iommu_map_buf() - Map a single buffer into QUPv3 context bank
728 * @wrapper_dev: Pointer to the corresponding QUPv3 wrapper core.
729 * @iova: Pointer in which the mapped virtual address is stored.
730 * @buf: Address of the buffer that needs to be mapped.
731 * @size: Size of the buffer.
732 * @dir: Direction of the DMA transfer.
733 *
734 * This function is used to map an already allocated buffer into the
735 * QUPv3 context bank device space.
736 *
737 * Return: 0 on success, standard Linux error codes on failure/error.
738 */
739int geni_se_iommu_map_buf(struct device *wrapper_dev, dma_addr_t *iova,
740 void *buf, size_t size, enum dma_data_direction dir);
741
742/**
743 * geni_se_iommu_alloc_buf() - Allocate & map a single buffer into QUPv3
744 * context bank
745 * @wrapper_dev: Pointer to the corresponding QUPv3 wrapper core.
746 * @iova: Pointer in which the mapped virtual address is stored.
747 * @size: Size of the buffer.
748 *
749 * This function is used to allocate a buffer and map it into the
750 * QUPv3 context bank device space.
751 *
752 * Return: address of the buffer on success, NULL or ERR_PTR on
753 * failure/error.
754 */
755void *geni_se_iommu_alloc_buf(struct device *wrapper_dev, dma_addr_t *iova,
756 size_t size);
757
758/**
759 * geni_se_iommu_unmap_buf() - Unmap a single buffer from QUPv3 context bank
760 * @wrapper_dev: Pointer to the corresponding QUPv3 wrapper core.
761 * @iova: Pointer in which the mapped virtual address is stored.
762 * @size: Size of the buffer.
763 * @dir: Direction of the DMA transfer.
764 *
765 * This function is used to unmap an already mapped buffer from the
766 * QUPv3 context bank device space.
767 *
768 * Return: 0 on success, standard Linux error codes on failure/error.
769 */
770int geni_se_iommu_unmap_buf(struct device *wrapper_dev, dma_addr_t *iova,
771 size_t size, enum dma_data_direction dir);
772
773/**
774 * geni_se_iommu_free_buf() - Unmap & free a single buffer from QUPv3
775 * context bank
776 * @wrapper_dev: Pointer to the corresponding QUPv3 wrapper core.
777 * @iova: Pointer in which the mapped virtual address is stored.
778 * @buf: Address of the buffer.
779 * @size: Size of the buffer.
780 *
781 * This function is used to unmap and free a buffer from the
782 * QUPv3 context bank device space.
783 *
784 * Return: 0 on success, standard Linux error codes on failure/error.
785 */
786int geni_se_iommu_free_buf(struct device *wrapper_dev, dma_addr_t *iova,
787 void *buf, size_t size);
788
Girish Mahadevan3b7e9742017-09-15 15:17:16 -0600789
790/**
791 * geni_se_dump_dbg_regs() - Print relevant registers that capture most
792 * accurately the state of an SE; meant to be called
793 * in case of errors to help debug.
794 * @_dev: Pointer to the SE's device.
795 * @iomem: Base address of the SE's register space.
796 * @ipc: IPC log context handle.
797 *
798 * This function is used to print out all the registers that capture the state
799 * of an SE to help debug any errors.
800 *
801 * Return: None
802 */
803void geni_se_dump_dbg_regs(struct se_geni_rsc *rsc, void __iomem *base,
804 void *ipc);
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600805#else
Girish Mahadevanbd9b44f2017-04-11 13:11:10 -0600806static inline unsigned int geni_read_reg_nolog(void __iomem *base, int offset)
807{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600808 return 0;
Girish Mahadevanbd9b44f2017-04-11 13:11:10 -0600809}
810
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600811static inline void geni_write_reg_nolog(unsigned int value,
812 void __iomem *base, int offset)
Girish Mahadevanbd9b44f2017-04-11 13:11:10 -0600813{
Girish Mahadevanbd9b44f2017-04-11 13:11:10 -0600814}
815
Sagar Dharia7c927c02016-11-23 11:51:43 -0700816static inline unsigned int geni_read_reg(void __iomem *base, int offset)
817{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600818 return 0;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700819}
820
821static inline void geni_write_reg(unsigned int value, void __iomem *base,
822 int offset)
823{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700824}
825
826static inline int get_se_proto(void __iomem *base)
827{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600828 return -ENXIO;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700829}
830
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600831static inline int geni_se_init(void __iomem *base,
Sagar Dharia7c927c02016-11-23 11:51:43 -0700832 unsigned int rx_wm, unsigned int rx_rfr)
833{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600834 return -ENXIO;
835}
Sagar Dharia7c927c02016-11-23 11:51:43 -0700836
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600837static inline int geni_se_select_mode(void __iomem *base, int mode)
838{
839 return -ENXIO;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700840}
841
842static inline void geni_setup_m_cmd(void __iomem *base, u32 cmd,
843 u32 params)
844{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700845}
846
847static inline void geni_setup_s_cmd(void __iomem *base, u32 cmd,
848 u32 params)
849{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700850}
851
852static inline void geni_cancel_m_cmd(void __iomem *base)
853{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700854}
855
856static inline void geni_cancel_s_cmd(void __iomem *base)
857{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700858}
859
860static inline void geni_abort_m_cmd(void __iomem *base)
861{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700862}
863
Girish Mahadevan24f56592017-04-15 17:35:05 -0600864static inline void geni_abort_s_cmd(void __iomem *base)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700865{
Sagar Dharia7c927c02016-11-23 11:51:43 -0700866}
867
868static inline int get_tx_fifo_depth(void __iomem *base)
869{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600870 return -ENXIO;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700871}
872
873static inline int get_tx_fifo_width(void __iomem *base)
874{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600875 return -ENXIO;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700876}
877
878static inline int get_rx_fifo_depth(void __iomem *base)
879{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600880 return -ENXIO;
Sagar Dharia7c927c02016-11-23 11:51:43 -0700881}
882
Girish Mahadevanb1ab1722017-04-27 16:39:11 -0600883static inline void se_get_packing_config(int bpw, int pack_words,
884 bool msb_to_lsb, unsigned long *cfg0,
885 unsigned long *cfg1)
Sagar Dharia7c927c02016-11-23 11:51:43 -0700886{
Girish Mahadevanb1ab1722017-04-27 16:39:11 -0600887}
888
889static inline void se_config_packing(void __iomem *base, int bpw,
890 int pack_words, bool msb_to_lsb)
891{
Girish Mahadevanebeed352016-11-23 10:59:29 -0700892}
893
Karthikeyan Ramasubramanian383b41e2017-10-25 17:32:52 -0600894static inline int se_geni_clks_on(struct se_geni_rsc *rsc)
895{
896 return -ENXIO;
897}
898
899static inline int se_geni_clks_off(struct se_geni_rsc *rsc)
900{
901 return -ENXIO;
902}
903
Girish Mahadevanebeed352016-11-23 10:59:29 -0700904static inline int se_geni_resources_on(struct se_geni_rsc *rsc)
905{
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600906 return -ENXIO;
Girish Mahadevanebeed352016-11-23 10:59:29 -0700907}
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600908
909static inline int se_geni_resources_off(struct se_geni_rsc *rsc)
910{
911 return -ENXIO;
912}
913
914static inline int geni_se_resources_init(struct se_geni_rsc *rsc,
915 unsigned long ab, unsigned long ib)
916{
917 return -ENXIO;
918}
919
Karthikeyan Ramasubramanian8bef5ea2017-05-11 17:02:46 -0600920static inline int geni_se_clk_tbl_get(struct se_geni_rsc *rsc,
921 unsigned long **tbl)
922{
923 return -ENXIO;
924}
925
926static inline int geni_se_clk_freq_match(struct se_geni_rsc *rsc,
927 unsigned long req_freq, unsigned int *index,
928 unsigned long *res_freq, bool exact)
929{
930 return -ENXIO;
931}
932
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600933static inline int geni_se_tx_dma_prep(struct device *wrapper_dev,
934 void __iomem *base, void *tx_buf, int tx_len, dma_addr_t *tx_dma)
935{
936 return -ENXIO;
937}
938
939static inline int geni_se_rx_dma_prep(struct device *wrapper_dev,
940 void __iomem *base, void *rx_buf, int rx_len, dma_addr_t *rx_dma)
941{
942 return -ENXIO;
943}
944
945static inline void geni_se_tx_dma_unprep(struct device *wrapper_dev,
946 dma_addr_t tx_dma, int tx_len)
947{
948}
949
950static inline void geni_se_rx_dma_unprep(struct device *wrapper_dev,
951 dma_addr_t rx_dma, int rx_len)
952{
953}
954
955static inline int geni_se_qupv3_hw_version(struct device *wrapper_dev,
956 unsigned int *major, unsigned int *minor, unsigned int *step)
957{
958 return -ENXIO;
959}
960
961static inline int geni_se_iommu_map_buf(struct device *wrapper_dev,
962 dma_addr_t *iova, void *buf, size_t size, enum dma_data_direction dir)
963{
964 return -ENXIO;
965}
966
967static inline void *geni_se_iommu_alloc_buf(struct device *wrapper_dev,
968 dma_addr_t *iova, size_t size)
969{
970 return NULL;
971}
972
973static inline int geni_se_iommu_unmap_buf(struct device *wrapper_dev,
974 dma_addr_t *iova, size_t size, enum dma_data_direction dir)
975{
976 return -ENXIO;
977
978}
979
980static inline int geni_se_iommu_free_buf(struct device *wrapper_dev,
981 dma_addr_t *iova, void *buf, size_t size)
982{
983 return -ENXIO;
984}
985
Maria Yuecc03d72017-09-25 16:52:15 +0800986static void geni_se_dump_dbg_regs(struct se_geni_rsc *rsc, void __iomem *base,
Girish Mahadevan3b7e9742017-09-15 15:17:16 -0600987 void *ipc)
988{
989}
990
Karthikeyan Ramasubramanian0d578b72017-04-26 10:44:02 -0600991#endif
Sagar Dharia7c927c02016-11-23 11:51:43 -0700992#endif