linux/drivers/spi/spi-loongson.h

/* SPDX-License-Identifier: GPL-2.0+ */
/* Header File for Loongson SPI Driver. */
/* Copyright (C) 2023 Loongson Technology Corporation Limited */

#ifndef __LINUX_SPI_LOONGSON_H
#define __LINUX_SPI_LOONGSON_H

#include <linux/bits.h>
#include <linux/pm.h>
#include <linux/types.h>

#define LOONGSON_SPI_SPCR_REG
#define LOONGSON_SPI_SPSR_REG
#define LOONGSON_SPI_FIFO_REG
#define LOONGSON_SPI_SPER_REG
#define LOONGSON_SPI_PARA_REG
#define LOONGSON_SPI_SFCS_REG
#define LOONGSON_SPI_TIMI_REG

/* Bits definition for Loongson SPI register */
#define LOONGSON_SPI_PARA_MEM_EN
#define LOONGSON_SPI_SPCR_CPHA
#define LOONGSON_SPI_SPCR_CPOL
#define LOONGSON_SPI_SPCR_SPE
#define LOONGSON_SPI_SPSR_RFEMPTY
#define LOONGSON_SPI_SPSR_WCOL
#define LOONGSON_SPI_SPSR_SPIF

struct device;
struct spi_controller;

struct loongson_spi {};

int loongson_spi_init_controller(struct device *dev, void __iomem *reg);
extern const struct dev_pm_ops loongson_spi_dev_pm_ops;
#endif /* __LINUX_SPI_LOONGSON_H */