mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 21:39:02 +00:00
AR-1 - Adding support category for distributions AR-4 - Remove Allwinner legacy AR-5 - Drop Udoo family and move Udoo board into newly created imx6 family AR-9 - Rename sunxi-next to sunxi-legacy AR-10 - Rename sunxi-dev to sunxi-current AR-11 - Adding Radxa Rockpi S support AR-13 - Rename rockchip64-default to rockchip64-legacy AR-14 - Add rockchip64-current as mainline source AR-15 - Drop Rockchip 4.19.y NEXT, current become 5.3.y AR-16 - Rename RK3399 default to legacy AR-17 - Rename Odroid XU4 next and default to legacy 4.14.y, add DEV 5.4.y AR-18 - Add Odroid N2 current mainline AR-19 - Move Odroid C1 to meson family AR-20 - Rename mvebu64-default to mvebu64-legacy AR-21 - Rename mvebu-default to mvebu-legacy AR-22 - Rename mvebu-next to mvebu-current AR-23 - Drop meson64 default and next, current becomes former DEV 5.3.y AR-24 - Drop cubox family and move Cubox/Hummingboard boards under imx6 AR-26 - Adjust motd AR-27 - Enabling distribution release status AR-28 - Added new GCC compilers AR-29 - Implementing Ubuntu Eoan AR-30 - Add desktop packages per board or family AR-31 - Remove (Ubuntu/Debian) distribution name from image filename AR-32 - Move arch configs from configuration.sh to separate arm64 and armhf config files AR-33 - Revision numbers for beta builds changed to day_in_the_year AR-34 - Patches support linked patches AR-35 - Break meson64 family into gxbb and gxl AR-36 - Add Nanopineo2 Black AR-38 - Upgrade option from old branches to new one via armbian-config AR-41 - Show full timezone info AR-43 - Merge Odroid N2 to meson64 AR-44 - Enable FORCE_BOOTSCRIPT_UPDATE for all builds
67 lines
2 KiB
Diff
67 lines
2 KiB
Diff
From ae07b208fe4e228068282ad76cfd69ab9e96dc9f Mon Sep 17 00:00:00 2001
|
|
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
Date: Mon, 28 Dec 2015 13:55:13 +0100
|
|
Subject: [PATCH] implement slot capabilities (SSPL)
|
|
|
|
---
|
|
drivers/pci/controller/pci-mvebu.c | 22 ++++++++++++++++++++--
|
|
1 file changed, 20 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
|
|
index 7980be0..0e9b820 100644
|
|
--- a/drivers/pci/controller/pci-mvebu.c
|
|
+++ b/drivers/pci/controller/pci-mvebu.c
|
|
@@ -65,6 +65,12 @@
|
|
#define PCIE_STAT_BUS 0xff00
|
|
#define PCIE_STAT_DEV 0x1f0000
|
|
#define PCIE_STAT_LINK_DOWN BIT(0)
|
|
+#define PCIE_SSPL 0x1a0c
|
|
+#define PCIE_SSPL_MSGEN BIT(14)
|
|
+#define PCIE_SSPL_SPLS(x) (((x) & 3) << 8)
|
|
+#define PCIE_SSPL_SPLS_VAL(x) (((x) >> 8) & 3)
|
|
+#define PCIE_SSPL_SPLV(x) ((x) & 0xff)
|
|
+#define PCIE_SSPL_SPLV_VAL(x) ((x) & 0xff)
|
|
#define PCIE_RC_RTSTA 0x1a14
|
|
#define PCIE_DEBUG_CTRL 0x1a60
|
|
#define PCIE_DEBUG_SOFT_RESET BIT(20)
|
|
@@ -119,7 +125,6 @@ struct mvebu_sw_pci_bridge {
|
|
u16 bridgectrl;
|
|
|
|
/* PCI express capability */
|
|
- u32 pcie_sltcap;
|
|
u16 pcie_devctl;
|
|
u16 pcie_rtctl;
|
|
};
|
|
@@ -640,8 +645,12 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
|
|
break;
|
|
|
|
case PCISWCAP_EXP_SLTCAP:
|
|
- *value = bridge->pcie_sltcap;
|
|
+ {
|
|
+ u32 tmp = mvebu_readl(port, PCIE_SSPL);
|
|
+ *value = PCIE_SSPL_SPLS_VAL(tmp) << 15 |
|
|
+ PCIE_SSPL_SPLV_VAL(tmp) << 7;
|
|
break;
|
|
+ }
|
|
|
|
case PCISWCAP_EXP_SLTCTL:
|
|
*value = PCI_EXP_SLTSTA_PDS << 16;
|
|
@@ -824,6 +833,15 @@ static int mvebu_sw_pci_bridge_write(struct mvebu_pcie_port *port,
|
|
mvebu_writel(port, value, PCIE_CAP_PCIEXP + PCI_EXP_LNKCTL);
|
|
break;
|
|
|
|
+ case PCISWCAP_EXP_SLTCAP:
|
|
+ {
|
|
+ u32 sspl = PCIE_SSPL_SPLV((value & PCI_EXP_SLTCAP_SPLV) >> 7) |
|
|
+ PCIE_SSPL_SPLS((value & PCI_EXP_SLTCAP_SPLS) >> 15) |
|
|
+ PCIE_SSPL_MSGEN;
|
|
+ mvebu_writel(port, sspl, PCIE_SSPL);
|
|
+ break;
|
|
+ }
|
|
+
|
|
case PCISWCAP_EXP_RTCTL:
|
|
old = bridge->pcie_rtctl;
|
|
bridge->pcie_rtctl = value & (PCI_EXP_RTCTL_SECEE |
|
|
--
|
|
1.9.1
|
|
|