mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
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:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
1091
drivers/pci/controller/dwc/pcie-dw-ep-rockchip.c
Normal file
1091
drivers/pci/controller/dwc/pcie-dw-ep-rockchip.c
Normal file
File diff suppressed because it is too large
Load Diff
26
include/uapi/linux/rk-pcie-ep.h
Normal file
26
include/uapi/linux/rk-pcie-ep.h
Normal 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
|
||||
Reference in New Issue
Block a user