linux/drivers/staging/rtl8712/rtl871x_io.h

/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
 *
 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
 *
 * Modifications for inclusion into the Linux staging tree are
 * Copyright(c) 2010 Larry Finger. All rights reserved.
 *
 * Contact information:
 * WLAN FAE <[email protected]>
 * Larry Finger <[email protected]>
 *
 ******************************************************************************/
#ifndef _RTL871X_IO_H_
#define _RTL871X_IO_H_

#include "osdep_service.h"
#include "osdep_intf.h"

#define NUM_IOREQ

#define MAX_PROT_SZ

#define _IOREADY
#define _IO_WAIT_COMPLETE
#define _IO_WAIT_RSP

/* IO COMMAND TYPE */
#define _IOSZ_MASK_
#define _IO_WRITE_
#define _IO_FIXED_
#define _IO_BURST_
#define _IO_BYTE_
#define _IO_HW_
#define _IO_WORD_
#define _IO_SYNC_
#define _IO_CMDMASK_

/*
 *	For prompt mode accessing, caller shall free io_req
 *	Otherwise, io_handler will free io_req
 */
/* IO STATUS TYPE */
#define _IO_ERR_
#define _IO_SUCCESS_
#define _IO_DONE_
#define IO_RD32
#define IO_RD16
#define IO_RD8
#define IO_RD32_ASYNC
#define IO_RD16_ASYNC
#define IO_RD8_ASYNC
#define IO_WR32
#define IO_WR16
#define IO_WR8
#define IO_WR32_ASYNC
#define IO_WR16_ASYNC
#define IO_WR8_ASYNC
/*
 *	Only Sync. burst accessing is provided.
 */
#define IO_WR_BURST(x)
#define IO_RD_BURST(x)
/*below is for the intf_option bit definition...*/
#define _INTF_ASYNC_
struct intf_priv;
struct	intf_hdl;
struct io_queue;
struct	_io_ops {};

struct io_req {};

struct	intf_hdl {};

struct reg_protocol_rd {};

struct reg_protocol_wt {};

/*
 * Below is the data structure used by _io_handler
 */

struct io_queue {};

u8 r8712_read8(struct _adapter *adapter, u32 addr);
u16 r8712_read16(struct _adapter *adapter, u32 addr);
u32 r8712_read32(struct _adapter *adapter, u32 addr);
void r8712_read_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
void r8712_read_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
void r8712_write8(struct _adapter *adapter, u32 addr, u8 val);
void r8712_write16(struct _adapter *adapter, u32 addr, u16 val);
void r8712_write32(struct _adapter *adapter, u32 addr, u32 val);
void r8712_write_mem(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
void r8712_write_port(struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
/*ioreq */
uint r8712_alloc_io_queue(struct _adapter *adapter);
void r8712_free_io_queue(struct _adapter *adapter);

#endif	/*_RTL871X_IO_H_*/