blob: 118d9e605153ab8329583ba92b262043030ccf29 [file] [log] [blame]
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2019 Synaptics Incorporated */
#ifndef __API_AVIO_DHUB_H__
#define __API_AVIO_DHUB_H__
#include "acpuview_memmap.h"
#include "mipiSS_memmap.h"
#include "mipiSSDhub.h"
#include "api_dhub.h"
#define MIPISS_DHUB_BASE (MEMMAP_MIPISS_REG_BASE + MIPISS_MEMMAP_MIPISS128B_DHUB_REG_BASE + RA_mipiSS128bDhub_dHub0)
#define MIPISS_HBO_SRAM_BASE (MEMMAP_MIPISS_REG_BASE + MIPISS_MEMMAP_MIPISS128B_DHUB_REG_BASE + RA_mipiSS128bDhub_tcm0)
#define MIPISS_NUM_OF_CHANNELS (mipiSSDhubChMap_mipiSS128b_MV_R1+1)
#define MIPISS_DHUB_BANK0_START_ADDR mipiSSDhubTcmMap_mipiSS128bDhub_BANK0_START_ADDR
typedef struct DHUB_channel_config {
SIGN32 chanId;
UNSG32 chanCmdBase;
UNSG32 chanDataBase;
SIGN32 chanCmdSize;
SIGN32 chanDataSize;
SIGN32 chanMtuSize;
SIGN32 chanQos;
SIGN32 chanSelfLoop;
SIGN32 chanEnable;
} DHUB_channel_config;
typedef enum {
DHUB_TYPE_128BIT = 0
} DHUB_TYPE;
extern HDL_dhub2d MIPI_dhubHandle;
extern DHUB_channel_config MIPI_config[];
/******************************************************************************************************************
* Function: DhubInitialization
* Description: Initialize DHUB .
* Parameter : cpuId ------------- cpu ID
* dHubBaseAddr ------------- dHub Base address.
* hboSramAddr ----- Sram Address for HBO.
* pdhubHandle ----- pointer to 2D dhubHandle
* dhub_config ----- configuration of AG
* numOfChans ----- number of channels
* Return: void
******************************************************************************************************************/
void DhubInitialization(SIGN32 cpuId, UNSG32 dHubBaseAddr, UNSG32 hboSramAddr, HDL_dhub2d *pdhubHandle, DHUB_channel_config *dhub_config, SIGN32 numOfChans, DHUB_TYPE dHubType);
void DhubChannelClear(void *hdl, SIGN32 id, T64b cfgQ[]);
int getDhubChannelInfo(HDL_dhub2d *pdhubHandle, SIGN32 IChannel, T32dHubChannel_CFG *cfg);
#endif //__API_AVIO_DHUB_H__