RTEMS 6.1-rc5
Loading...
Searching...
No Matches
xqspipsu_control.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (C) 2020 - 2022 Xilinx, Inc. All rights reserved.
3* SPDX-License-Identifier: MIT
4******************************************************************************/
5
6
7/*****************************************************************************/
37#ifndef XQSPIPSU_CONTROL_H_
38#define XQSPIPSU_CONTROL_H_
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/***************************** Include Files *********************************/
45
46#include "xqspipsu.h"
47
48/**************************** Type Definitions *******************************/
49
50/***************** Macros (Inline Functions) Definitions *********************/
51
52#if defined (ARMR5) || defined (__aarch64__) || defined (__MICROBLAZE__)
53#define TAPDLY_BYPASS_VALVE_40MHZ 0x01U
54#define TAPDLY_BYPASS_VALVE_100MHZ 0x01U
55#define USE_DLY_LPBK 0x01U
56#define USE_DATA_DLY_ADJ 0x01U
57#define DATA_DLY_ADJ_DLY 0X02U
58#define LPBK_DLY_ADJ_DLY0 0X02U
59#define LPBK_DLY_ADJ_DLY1 0X02U
60#endif
61
62#ifdef __MICROBLAZE__
63#define XPS_SYS_CTRL_BASEADDR 0xFF180000U
64#endif
65/************************** Function Prototypes ******************************/
66void XQspiPsu_GenFifoEntryData(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg);
67u32 XQspiPsu_SetIOMode(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg);
68void XQspiPsu_IORead(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg,
69 u32 StatusReg);
70void XQspiPsu_PollDataConfig(XQspiPsu *InstancePtr, XQspiPsu_Msg *FlashMsg);
71void XQspiPsu_TXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg);
72void XQspiPsu_SetupRxDma(const XQspiPsu *InstancePtr,
73 XQspiPsu_Msg *Msg);
74void XQspiPsu_Setup64BRxDma(const XQspiPsu *InstancePtr,
75 XQspiPsu_Msg *Msg);
76void XQspiPsu_RXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg);
77void XQspiPsu_TXRXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg,
78 u32 *GenFifoEntry);
80 u32 *GenFifoEntry);
81u32 XQspiPsu_CreatePollDataConfig(const XQspiPsu *InstancePtr,
82 const XQspiPsu_Msg *FlashMsg);
83void XQspiPsu_PollDataHandler(XQspiPsu *InstancePtr, u32 StatusReg);
84u32 XQspiPsu_SelectSpiMode(u8 SpiMode);
85void XQspiPsu_SetDefaultConfig(XQspiPsu *InstancePtr);
86void XQspiPsu_FillTxFifo(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 Size);
87void XQspiPsu_ReadRxFifo(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, s32 Size);
88
89#if defined (ARMR5) || defined (__aarch64__) || defined (__MICROBLAZE__)
90s32 XQspipsu_Set_TapDelay(const XQspiPsu *InstancePtr, u32 TapdelayBypass,
91 u32 LPBKDelay, u32 Datadelay);
92s32 XQspipsu_Calculate_Tapdelay(const XQspiPsu *InstancePtr, u8 Prescaler);
93#endif
94
95#ifdef __cplusplus
96}
97#endif
98
99
100#endif /* XQSPIPSU_CONTROL_H_ */
u32 XQspiPsu_SetIOMode(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_hw.c:263
void XQspiPsu_Setup64BRxDma(const XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_hw.c:209
void XQspiPsu_SetupRxDma(const XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_hw.c:151
void XQspiPsu_GenFifoEntryData(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_control.c:63
void XQspiPsu_TXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_hw.c:124
void XQspiPsu_PollDataHandler(XQspiPsu *InstancePtr, u32 StatusReg)
Definition: xqspipsu.c:393
u32 XQspiPsu_CreatePollDataConfig(const XQspiPsu *InstancePtr, const XQspiPsu_Msg *FlashMsg)
Definition: xqspipsu_hw.c:488
void XQspiPsu_GenFifoEntryDataLen(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 *GenFifoEntry)
Definition: xqspipsu_hw.c:418
void XQspiPsu_TXRXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 *GenFifoEntry)
Definition: xqspipsu_hw.c:336
void XQspiPsu_ReadRxFifo(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, s32 Size)
Definition: xqspipsu_hw.c:637
void XQspiPsu_RXSetup(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg)
Definition: xqspipsu_hw.c:300
void XQspiPsu_PollDataConfig(XQspiPsu *InstancePtr, XQspiPsu_Msg *FlashMsg)
Definition: xqspipsu_control.c:129
void XQspiPsu_SetDefaultConfig(XQspiPsu *InstancePtr)
Definition: xqspipsu_hw.c:569
void XQspiPsu_IORead(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 StatusReg)
Definition: xqspipsu_hw.c:685
u32 XQspiPsu_SelectSpiMode(u8 SpiMode)
Definition: xqspipsu_hw.c:527
void XQspiPsu_FillTxFifo(XQspiPsu *InstancePtr, XQspiPsu_Msg *Msg, u32 Size)
Definition: xqspipsu_hw.c:73
Definition: xqspipsu.h:223
Definition: xqspipsu.h:257