linux/sound/pci/mixart/mixart_hwdep.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for Digigram miXart soundcards
 *
 * definitions and makros for basic card access
 *
 * Copyright (c) 2003 by Digigram <[email protected]>
 */

#ifndef __SOUND_MIXART_HWDEP_H
#define __SOUND_MIXART_HWDEP_H

#include <sound/hwdep.h>

#ifndef readl_be
#define readl_be(x)
#endif

#ifndef writel_be
#define writel_be(data,addr)
#endif

#ifndef readl_le
#define readl_le(x)
#endif

#ifndef writel_le
#define writel_le(data,addr)
#endif

#define MIXART_MEM(mgr,x)
#define MIXART_REG(mgr,x)


/* Daughter board Type */
#define DAUGHTER_TYPE_MASK 
#define DAUGHTER_VER_MASK 
#define DAUGHTER_TYPEVER_MASK
 
#define MIXART_DAUGHTER_TYPE_NONE 
#define MIXART_DAUGHTER_TYPE_COBRANET 
#define MIXART_DAUGHTER_TYPE_AES



#define MIXART_BA0_SIZE
#define MIXART_BA1_SIZE

/*
 * -----------BAR 0 --------------------------------------------------------------------------------------------------------
 */
#define MIXART_PSEUDOREG

#define MIXART_PSEUDOREG_BOARDNUMBER

/* perfmeter (available when elf loaded)*/
#define MIXART_PSEUDOREG_PERF_STREAM_LOAD_OFFSET
#define MIXART_PSEUDOREG_PERF_SYSTEM_LOAD_OFFSET
#define MIXART_PSEUDOREG_PERF_MAILBX_LOAD_OFFSET
#define MIXART_PSEUDOREG_PERF_INTERR_LOAD_OFFSET

/* motherboard xilinx loader info */
#define MIXART_PSEUDOREG_MXLX_BASE_ADDR_OFFSET 
#define MIXART_PSEUDOREG_MXLX_SIZE_OFFSET 
#define MIXART_PSEUDOREG_MXLX_STATUS_OFFSET 

/* elf loader info */
#define MIXART_PSEUDOREG_ELF_STATUS_OFFSET 

/* 
*  after the elf code is loaded, and the flowtable info was passed to it,
*  the driver polls on this address, until it shows 1 (presence) or 2 (absence)
*  once it is non-zero, the daughter board type may be read
*/
#define MIXART_PSEUDOREG_DBRD_PRESENCE_OFFSET   

/* Global info structure */
#define MIXART_PSEUDOREG_DBRD_TYPE_OFFSET


/* daughterboard xilinx loader info */
#define MIXART_PSEUDOREG_DXLX_BASE_ADDR_OFFSET 
#define MIXART_PSEUDOREG_DXLX_SIZE_OFFSET 
#define MIXART_PSEUDOREG_DXLX_STATUS_OFFSET 

/*  */
#define MIXART_FLOWTABLE_PTR

/* mailbox addresses  */

/* message DRV -> EMB */
#define MSG_INBOUND_POST_HEAD
#define MSG_INBOUND_POST_TAIL
/* message EMB -> DRV */
#define MSG_OUTBOUND_POST_TAIL
#define MSG_OUTBOUND_POST_HEAD
/* Get Free Frames */
#define MSG_INBOUND_FREE_TAIL
#define MSG_OUTBOUND_FREE_TAIL
/* Put Free Frames */
#define MSG_OUTBOUND_FREE_HEAD
#define MSG_INBOUND_FREE_HEAD

/* firmware addresses of the message fifos */
#define MSG_BOUND_STACK_SIZE
/* posted messages */
#define MSG_OUTBOUND_POST_STACK
#define MSG_INBOUND_POST_STACK
/* available empty messages */
#define MSG_OUTBOUND_FREE_STACK
#define MSG_INBOUND_FREE_STACK


/* defines for mailbox message frames */
#define MSG_FRAME_OFFSET
#define MSG_FRAME_SIZE
#define MSG_FRAME_NUMBER
#define MSG_FROM_AGENT_ITMF_OFFSET
#define MSG_TO_AGENT_ITMF_OFFSET
#define MSG_HOST_RSC_PROTECTION
#define MSG_AGENT_RSC_PROTECTION


/*
 * -----------BAR 1 --------------------------------------------------------------------------------------------------------
 */

/* interrupt addresses and constants */
#define MIXART_PCI_OMIMR_OFFSET
#define MIXART_PCI_OMISR_OFFSET
#define MIXART_PCI_ODBR_OFFSET

#define MIXART_BA1_BRUTAL_RESET_OFFSET

#define MIXART_HOST_ALL_INTERRUPT_MASKED
#define MIXART_ALLOW_OUTBOUND_DOORBELL
#define MIXART_OIDI


int snd_mixart_setup_firmware(struct mixart_mgr *mgr);

#endif /* __SOUND_MIXART_HWDEP_H */