PCI: rockchip: dw: add standard ep mode driver

Change-Id: Id365b71acaa1db846b619fedd7397a9256d8e13f
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Simon Xue
2021-01-26 18:26:26 +08:00
committed by Tao Huang
parent 92574a636c
commit da4d118936
4 changed files with 1126 additions and 0 deletions

View File

@@ -105,6 +105,14 @@ config PCIE_DW_DMATEST
help
Enables support for the DW PCIe controller DMA test.
config PCIE_DW_ROCKCHIP_EP
bool "Rockchip DesignWare PCIe EP controller"
select PCIE_DW
depends on ARCH_ROCKCHIP
depends on OF
help
Enables support for the DW PCIe controller in the Rockchip SoC.
config PCI_EXYNOS
bool "Samsung Exynos PCIe controller"
depends on SOC_EXYNOS5440 || COMPILE_TEST

View File

@@ -22,6 +22,7 @@ obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.o
obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o
obj-$(CONFIG_PCIE_DW_ROCKCHIP) += pcie-dw-rockchip.o
obj-$(CONFIG_PCIE_DW_DMATEST) += pcie-dw-dmatest.o
obj-$(CONFIG_PCIE_DW_ROCKCHIP_EP) += pcie-dw-ep-rockchip.o
# The following drivers are for devices that use the generic ACPI
# pci_root.c driver but don't support standard ECAM config access.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
*/
#ifndef _UAPI__RK_PCIE_EP_H__
#define _UAPI__RK_PCIE_EP_H__
#include <linux/types.h>
struct pcie_ep_user_data {
__u32 elbi_app_user[11];
};
struct pcie_ep_dma_cache_cfg {
__u64 addr;
__u32 size;
};
#define PCIE_BASE 'P'
#define PCIE_DMA_GET_ELBI_DATA _IOR(PCIE_BASE, 0, struct pcie_ep_user_data)
#define PCIE_DMA_CACHE_INVALIDE _IOW(PCIE_BASE, 1, struct pcie_ep_dma_cache_cfg)
#define PCIE_DMA_CACHE_FLUSH _IOW(PCIE_BASE, 2, struct pcie_ep_dma_cache_cfg)
#define PCIE_DMA_IRQ_MASK_ALL _IOW(PCIE_BASE, 3, int)
#endif