RTEMS 6.1-rc5
Loading...
Searching...
No Matches
xilinx-axi-spi-regs.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * Copyright (C) 2021 Jan Sommer, German Aerospace Center (DLR)
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#ifndef LIBBSP_ARM_XILINX_AXI_SPI_REGS_H
29#define LIBBSP_ARM_XILINX_AXI_SPI_REGS_H
30
31#include <bsp/utility.h>
32
33typedef struct {
34 uint32_t reserved1[7];
35 uint32_t globalirq;
36#define XILINX_AXI_SPI_GLOBAL_IRQ_ENABLE BSP_BIT32(31)
37 uint32_t irqstatus;
38 uint32_t reserved2;
39 uint32_t irqenable;
40#define XILINX_AXI_SPI_IRQ_CMD_ERR BSP_BIT32(13)
41#define XILINX_AXI_SPI_IRQ_LOOP_ERR BSP_BIT32(12)
42#define XILINX_AXI_SPI_IRQ_MSB_ERR BSP_BIT32(11)
43#define XILINX_AXI_SPI_IRQ_SLV_ERR BSP_BIT32(10)
44#define XILINX_AXI_SPI_IRQ_CPOL_CPHA_ERR BSP_BIT32(9)
45#define XILINX_AXI_SPI_IRQ_RXNEMPTY BSP_BIT32(8)
46#define XILINX_AXI_SPI_IRQ_CS_MODE BSP_BIT32(7)
47#define XILINX_AXI_SPI_IRQ_TXHALF BSP_BIT32(6)
48#define XILINX_AXI_SPI_IRQ_RXOVR BSP_BIT32(5)
49#define XILINX_AXI_SPI_IRQ_RXFULL BSP_BIT32(4)
50#define XILINX_AXI_SPI_IRQ_TXUF BSP_BIT32(3)
51#define XILINX_AXI_SPI_IRQ_TXEMPTY BSP_BIT32(2)
52#define XILINX_AXI_SPI_IRQ_SLV_MODF BSP_BIT32(1)
53#define XILINX_AXI_SPI_IRQ_MODF BSP_BIT32(0)
54 uint32_t reserved3[5];
55 uint32_t reset;
56#define XILINX_AXI_SPI_RESET 0x0000000a
57 uint32_t reserved4[7];
58 uint32_t control;
59#define XILINX_AXI_SPI_CONTROL_LSBFIRST BSP_BIT32(9)
60#define XILINX_AXI_SPI_CONTROL_MST_TRANS_INHIBIT BSP_BIT32(8)
61#define XILINX_AXI_SPI_CONTROL_MANUAL_CS BSP_BIT32(7)
62#define XILINX_AXI_SPI_CONTROL_RX_FIFO_RESET BSP_BIT32(6)
63#define XILINX_AXI_SPI_CONTROL_TX_FIFO_RESET BSP_BIT32(5)
64#define XILINX_AXI_SPI_CONTROL_CPHA BSP_BIT32(4)
65#define XILINX_AXI_SPI_CONTROL_CPOL BSP_BIT32(3)
66#define XILINX_AXI_SPI_CONTROL_MSTREN BSP_BIT32(2)
67#define XILINX_AXI_SPI_CONTROL_SPIEN BSP_BIT32(1)
68#define XILINX_AXI_SPI_CONTROL_LOOP BSP_BIT32(0)
69 uint32_t status;
70#define XILINX_AXI_SPI_STATUS_CMD_ERR BSP_BIT32(10)
71#define XILINX_AXI_SPI_STATUS_LOOP_ERR BSP_BIT32(9)
72#define XILINX_AXI_SPI_STATUS_MSB_ERR BSP_BIT32(8)
73#define XILINX_AXI_SPI_STATUS_SLV_ERR BSP_BIT32(7)
74#define XILINX_AXI_SPI_STATUS_CPOL_CPHA_ERR BSP_BIT32(6)
75#define XILINX_AXI_SPI_STATUS_SLV_MODE BSP_BIT32(5)
76#define XILINX_AXI_SPI_STATUS_MODF BSP_BIT32(4)
77#define XILINX_AXI_SPI_STATUS_TXFULL BSP_BIT32(3)
78#define XILINX_AXI_SPI_STATUS_TXEMPTY BSP_BIT32(2)
79#define XILINX_AXI_SPI_STATUS_RXFULL BSP_BIT32(1)
80#define XILINX_AXI_SPI_STATUS_RXEMPTY BSP_BIT32(0)
81 uint32_t txdata;
82 uint32_t rxdata;
83 uint32_t cs;
84 uint32_t tx_fifo_len;
85 uint32_t rx_fifo_len;
87
88#endif /* LIBBSP_ARM_XILINX_AXI_SPI_REGS_H */
This header file provides utility macros for BSPs.
Definition: intercom.c:87
Definition: xilinx-axi-spi-regs.h:33