Skip to content

Commit aa67b62

Browse files
iavigorpecovnik
authored andcommitted
mvebu: edge → 6.18 LTS family-wide (followup to #9694)
#9694 split mvebu edge into per-board kernel versions: helios4 on 6.18 LTS, clearfogpro/clearfogbase on 6.15. Both share LINUXCONFIG=linux-mvebu-edge and ARMBIAN_KERNEL_DEB_NAME=mvebu-edge, so building both produced "Duplicate LINUXCONFIG's found!" — two source trees compete for the same package name. Per @igorpecovnik in #9694: "kernel can't be per board". Bump the rest of the mvebu (armhf) family to 6.18 too. mvebu64 and other families are untouched. The mvebu-6.18 patch directory is already in the tree from #9694, so the remaining boards (clearfogpro, clearfogbase) get the same patch set. Affected boards: clearfogpro, helios4, clearfogbase (csc). espressobin and macchiatobin (eos) are mvebu64, not affected. I do not have non-helios4 mvebu hardware; build verified, runtime not. Assisted-by: Claude:claude-opus-4-7
1 parent 5188ebe commit aa67b62

5 files changed

Lines changed: 385 additions & 5 deletions

File tree

config/sources/families/mvebu.conf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ case $BRANCH in
3131

3232
edge)
3333

34-
if [[ $BOARD == helios4 ]]; then
35-
declare -g KERNEL_MAJOR_MINOR="6.18" # helios4: 6.18 LTS, restore orphaned mvebu patches
36-
else
37-
declare -g KERNEL_MAJOR_MINOR="6.15" # Major and minor versions of this kernel.
38-
fi
34+
declare -g KERNEL_MAJOR_MINOR="6.18" # 6.18 LTS, restore orphaned mvebu patches
3935
;;
4036

4137
esac
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Igor Pecovnik <igor.pecovnik@gmail.com>
3+
Date: Fri, 8 Jan 2016 17:03:44 +0100
4+
Subject: [ARCHEOLOGY] Patches for Marvell Armada, kernel 4.3 and 4.4
5+
6+
> X-Git-Archeology: > recovered message: > Credits: Russell King http://www.home.arm.linux.org.uk/~rmk/clearfog/
7+
> X-Git-Archeology: - Revision 06fe0ffe8e197c58ca9d2d919b050311e6a05411: https://github.com/armbian/build/commit/06fe0ffe8e197c58ca9d2d919b050311e6a05411
8+
> X-Git-Archeology: Date: Fri, 08 Jan 2016 17:03:44 +0100
9+
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
10+
> X-Git-Archeology: Subject: Patches for Marvell Armada, kernel 4.3 and 4.4
11+
> X-Git-Archeology:
12+
> X-Git-Archeology: - Revision 68a6849497488aa8b9f1486c4f13ce4353c8cd53: https://github.com/armbian/build/commit/68a6849497488aa8b9f1486c4f13ce4353c8cd53
13+
> X-Git-Archeology: Date: Wed, 03 Feb 2016 20:54:28 +0100
14+
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
15+
> X-Git-Archeology: Subject: Marvel patches move from one dir to another, small fixes
16+
> X-Git-Archeology:
17+
> X-Git-Archeology: - Revision baab6587a50fbc75c7b593110db50796166d9648: https://github.com/armbian/build/commit/baab6587a50fbc75c7b593110db50796166d9648
18+
> X-Git-Archeology: Date: Fri, 09 Dec 2016 21:09:22 +0300
19+
> X-Git-Archeology: From: zador-blood-stained <zador-blood-stained@users.noreply.github.com>
20+
> X-Git-Archeology: Subject: Refactor Marvell kernel sources
21+
> X-Git-Archeology:
22+
> X-Git-Archeology: - Revision e31425190fa09431c96067ab7371d72a9852e282: https://github.com/armbian/build/commit/e31425190fa09431c96067ab7371d72a9852e282
23+
> X-Git-Archeology: Date: Fri, 17 Aug 2018 09:17:19 +0200
24+
> X-Git-Archeology: From: Igor Pecovnik <igor.pecovnik@gmail.com>
25+
> X-Git-Archeology: Subject: Move MVEBU, Clearfog & Helios4, DEVelopment branch to 4.18.y ... removed only obviously unneded patches, while the rest needs some/a lot of rework to meet current NEXT levels. http://ix.io/1kpE Tested also without our patchset - severe problems on network stack.
26+
> X-Git-Archeology:
27+
> X-Git-Archeology: - Revision e261c6f82835bd9b12e07ba837b55fbf1aaa4327: https://github.com/armbian/build/commit/e261c6f82835bd9b12e07ba837b55fbf1aaa4327
28+
> X-Git-Archeology: Date: Wed, 31 Jul 2019 12:51:00 +0200
29+
> X-Git-Archeology: From: Aditya Prayoga <aprayoga@users.noreply.github.com>
30+
> X-Git-Archeology: Subject: Move mvebu DEFAULT, NEXT and DEV branch to next kernel (LTS) and U-boot #1426 (#1487)
31+
> X-Git-Archeology:
32+
> X-Git-Archeology: - Revision 150ac0c2afa147d9e3b036c8ecd8238fe5648cf3: https://github.com/armbian/build/commit/150ac0c2afa147d9e3b036c8ecd8238fe5648cf3
33+
> X-Git-Archeology: Date: Tue, 19 Nov 2019 23:25:39 +0100
34+
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
35+
> X-Git-Archeology: Subject: Remove K<4, change branches, new features (#1586)
36+
> X-Git-Archeology:
37+
> X-Git-Archeology: - Revision aa3d60f57e84d02887c63cae176bdec96b560e38: https://github.com/armbian/build/commit/aa3d60f57e84d02887c63cae176bdec96b560e38
38+
> X-Git-Archeology: Date: Thu, 10 Dec 2020 11:47:33 +0100
39+
> X-Git-Archeology: From: Rosen Penev <rosenp@gmail.com>
40+
> X-Git-Archeology: Subject: refreshed mvebu with quilt (#2419)
41+
> X-Git-Archeology:
42+
> X-Git-Archeology: - Revision 0cdffb29b07305209efb12cf3b5ac6032d3a1153: https://github.com/armbian/build/commit/0cdffb29b07305209efb12cf3b5ac6032d3a1153
43+
> X-Git-Archeology: Date: Wed, 24 Mar 2021 19:01:53 +0100
44+
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
45+
> X-Git-Archeology: Subject: Renaming DEV branch to EDGE (#2704)
46+
> X-Git-Archeology:
47+
> X-Git-Archeology: - Revision 5b1c1c2897a570c173c40204e98257b2dd7a74c9: https://github.com/armbian/build/commit/5b1c1c2897a570c173c40204e98257b2dd7a74c9
48+
> X-Git-Archeology: Date: Thu, 04 Jan 2024 00:06:37 +0530
49+
> X-Git-Archeology: From: Lane Jennison <lane@lane-fu.com>
50+
> X-Git-Archeology: Subject: mvebu-edge: move to 6.6.y
51+
> X-Git-Archeology:
52+
---
53+
drivers/cpuidle/cpuidle-mvebu-v7.c | 6 +++++-
54+
1 file changed, 5 insertions(+), 1 deletion(-)
55+
56+
diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c
57+
index 111111111111..222222222222 100644
58+
--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
59+
+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
60+
@@ -42,8 +42,12 @@ static __cpuidle int mvebu_v7_enter_idle(struct cpuidle_device *dev,
61+
62+
cpu_pm_exit();
63+
64+
+ /*
65+
+ * If we failed to enter the desired state, indicate that we
66+
+ * slept lightly.
67+
+ */
68+
if (ret)
69+
- return ret;
70+
+ return 0;
71+
72+
return index;
73+
}
74+
--
75+
Armbian
76+
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Russell King <rmk+kernel@arm.linux.org.uk>
3+
Date: Tue, 29 Nov 2016 10:13:46 +0000
4+
Subject: mvebu/clearfog pcie updates
5+
6+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
7+
---
8+
drivers/pci/controller/pci-mvebu.c | 76 ++++++++++
9+
drivers/pci/pci-bridge-emul.c | 2 +
10+
drivers/pci/pcie/aspm.c | 6 +
11+
drivers/pci/pcie/portdrv.c | 2 +
12+
4 files changed, 86 insertions(+)
13+
14+
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
15+
index 111111111111..222222222222 100644
16+
--- a/drivers/pci/controller/pci-mvebu.c
17+
+++ b/drivers/pci/controller/pci-mvebu.c
18+
@@ -60,6 +60,12 @@
19+
#define PCIE_INT_INTX(i) BIT(24+i)
20+
#define PCIE_INT_PM_PME BIT(28)
21+
#define PCIE_INT_ALL_MASK GENMASK(31, 0)
22+
+#define PCIE_MASK_ERR_COR BIT(18)
23+
+#define PCIE_MASK_ERR_NONFATAL BIT(17)
24+
+#define PCIE_MASK_ERR_FATAL BIT(16)
25+
+#define PCIE_MASK_FERR_DET BIT(10)
26+
+#define PCIE_MASK_NFERR_DET BIT(9)
27+
+#define PCIE_MASK_CORERR_DET BIT(8)
28+
#define PCIE_CTRL_OFF 0x1a00
29+
#define PCIE_CTRL_X1_MODE 0x0001
30+
#define PCIE_CTRL_RC_MODE BIT(1)
31+
@@ -618,6 +624,54 @@ mvebu_pci_bridge_emul_base_conf_read(struct pci_bridge_emul *bridge,
32+
return PCI_BRIDGE_EMUL_HANDLED;
33+
}
34+
35+
+static void mvebu_pcie_handle_irq_change(struct mvebu_pcie_port *port)
36+
+{
37+
+ u32 reg, old;
38+
+ u16 devctl, rtctl;
39+
+
40+
+ /*
41+
+ * Errors from downstream devices:
42+
+ * bridge control register SERR: enables reception of errors
43+
+ * Errors from this device, or received errors:
44+
+ * command SERR: enables ERR_NONFATAL and ERR_FATAL messages
45+
+ * => when enabled, these conditions also flag SERR in status register
46+
+ * devctl CERE: enables ERR_CORR messages
47+
+ * devctl NFERE: enables ERR_NONFATAL messages
48+
+ * devctl FERE: enables ERR_FATAL messages
49+
+ * Enabled messages then have three paths:
50+
+ * 1. rtctl: enables system error indication
51+
+ * 2. root error status register updated
52+
+ * 3. root error command register: forwarding via MSI
53+
+ */
54+
+ old = mvebu_readl(port, PCIE_INT_UNMASK_OFF);
55+
+ reg = old & ~(PCIE_INT_PM_PME | PCIE_MASK_FERR_DET |
56+
+ PCIE_MASK_NFERR_DET | PCIE_MASK_CORERR_DET |
57+
+ PCIE_MASK_ERR_COR | PCIE_MASK_ERR_NONFATAL |
58+
+ PCIE_MASK_ERR_FATAL);
59+
+
60+
+ devctl = port->bridge.pcie_conf.devctl;
61+
+ if (devctl & PCI_EXP_DEVCTL_FERE)
62+
+ reg |= PCIE_MASK_FERR_DET | PCIE_MASK_ERR_FATAL;
63+
+ if (devctl & PCI_EXP_DEVCTL_NFERE)
64+
+ reg |= PCIE_MASK_NFERR_DET | PCIE_MASK_ERR_NONFATAL;
65+
+ if (devctl & PCI_EXP_DEVCTL_CERE)
66+
+ reg |= PCIE_MASK_CORERR_DET | PCIE_MASK_ERR_COR;
67+
+ if (port->bridge.conf.command & PCI_COMMAND_SERR)
68+
+ reg |= PCIE_MASK_FERR_DET | PCIE_MASK_NFERR_DET |
69+
+ PCIE_MASK_ERR_FATAL | PCIE_MASK_ERR_NONFATAL;
70+
+
71+
+ if (!(port->bridge.conf.bridgectrl & PCI_BRIDGE_CTL_SERR))
72+
+ reg &= ~(PCIE_MASK_ERR_COR | PCIE_MASK_ERR_NONFATAL |
73+
+ PCIE_MASK_ERR_FATAL);
74+
+
75+
+ rtctl = port->bridge.pcie_conf.rootctl;
76+
+ if (rtctl & PCI_EXP_RTCTL_PMEIE)
77+
+ reg |= PCIE_INT_PM_PME;
78+
+
79+
+ if (old != reg)
80+
+ mvebu_writel(port, reg, PCIE_INT_UNMASK_OFF);
81+
+}
82+
+
83+
static pci_bridge_emul_read_status_t
84+
mvebu_pci_bridge_emul_pcie_conf_read(struct pci_bridge_emul *bridge,
85+
int reg, u32 *value)
86+
@@ -734,6 +788,9 @@ mvebu_pci_bridge_emul_base_conf_write(struct pci_bridge_emul *bridge,
87+
switch (reg) {
88+
case PCI_COMMAND:
89+
mvebu_writel(port, new, PCIE_CMD_OFF);
90+
+
91+
+ if ((old ^ new) & PCI_COMMAND_SERR)
92+
+ mvebu_pcie_handle_irq_change(port);
93+
break;
94+
95+
case PCI_IO_BASE:
96+
@@ -775,6 +832,8 @@ mvebu_pci_bridge_emul_base_conf_write(struct pci_bridge_emul *bridge,
97+
break;
98+
99+
case PCI_INTERRUPT_LINE:
100+
+ if (((old ^ new) >> 16) & PCI_BRIDGE_CTL_SERR)
101+
+ mvebu_pcie_handle_irq_change(port);
102+
if (mask & (PCI_BRIDGE_CTL_BUS_RESET << 16)) {
103+
u32 ctrl = mvebu_readl(port, PCIE_CTRL_OFF);
104+
if (new & (PCI_BRIDGE_CTL_BUS_RESET << 16))
105+
@@ -798,7 +857,18 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
106+
107+
switch (reg) {
108+
case PCI_EXP_DEVCTL:
109+
+ /*
110+
+ * Armada370 data says these bits must always
111+
+ * be zero when in root complex mode.
112+
+ */
113+
+ new &= ~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE |
114+
+ PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE);
115+
+
116+
mvebu_writel(port, new, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL);
117+
+
118+
+ if ((new ^ old) & (PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_NFERE |
119+
+ PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_URRE))
120+
+ mvebu_pcie_handle_irq_change(port);
121+
break;
122+
123+
case PCI_EXP_LNKCTL:
124+
@@ -849,6 +919,12 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
125+
126+
default:
127+
break;
128+
+
129+
+ case PCI_EXP_RTCTL:
130+
+ if ((new ^ old) & (PCI_EXP_RTCTL_SECEE | PCI_EXP_RTCTL_SENFEE |
131+
+ PCI_EXP_RTCTL_SEFEE | PCI_EXP_RTCTL_PMEIE))
132+
+ mvebu_pcie_handle_irq_change(port);
133+
+ break;
134+
}
135+
}
136+
137+
diff --git a/drivers/pci/pci-bridge-emul.c b/drivers/pci/pci-bridge-emul.c
138+
index 111111111111..222222222222 100644
139+
--- a/drivers/pci/pci-bridge-emul.c
140+
+++ b/drivers/pci/pci-bridge-emul.c
141+
@@ -157,6 +157,7 @@ struct pci_bridge_reg_behavior pci_regs_behavior[PCI_STD_HEADER_SIZEOF / 4] = {
142+
.rw = (GENMASK(7, 0) |
143+
((PCI_BRIDGE_CTL_PARITY |
144+
PCI_BRIDGE_CTL_SERR |
145+
+ /* NOTE: PCIe does not allow ISA, VGA, MASTER_ABORT */
146+
PCI_BRIDGE_CTL_ISA |
147+
PCI_BRIDGE_CTL_VGA |
148+
PCI_BRIDGE_CTL_MASTER_ABORT |
149+
@@ -355,6 +356,7 @@ int pci_bridge_emul_init(struct pci_bridge_emul *bridge,
150+
bridge->conf.header_type = PCI_HEADER_TYPE_BRIDGE;
151+
bridge->conf.cache_line_size = 0x10;
152+
bridge->conf.status = cpu_to_le16(PCI_STATUS_CAP_LIST);
153+
+ bridge->conf.bridgectrl = cpu_to_le16(PCI_BRIDGE_CTL_SERR);
154+
bridge->pci_regs_behavior = kmemdup(pci_regs_behavior,
155+
sizeof(pci_regs_behavior),
156+
GFP_KERNEL);
157+
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
158+
index 111111111111..222222222222 100644
159+
--- a/drivers/pci/pcie/aspm.c
160+
+++ b/drivers/pci/pcie/aspm.c
161+
@@ -617,6 +617,12 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
162+
pcie_capability_read_dword(child, PCI_EXP_LNKCAP, &child_lnkcap);
163+
pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &parent_lnkctl);
164+
pcie_capability_read_word(child, PCI_EXP_LNKCTL, &child_lnkctl);
165+
+dev_info(&parent->dev, "up support %x enabled %x\n",
166+
+ (parent_lnkcap & PCI_EXP_LNKCAP_ASPMS) >> 10,
167+
+ !!(parent_lnkctl & PCI_EXP_LNKCTL_ASPMC));
168+
+dev_info(&parent->dev, "dn support %x enabled %x\n",
169+
+ (child_lnkcap & PCI_EXP_LNKCAP_ASPMS) >> 10,
170+
+ !!(child_lnkctl & PCI_EXP_LNKCTL_ASPMC));
171+
172+
/*
173+
* Setup L0s state
174+
diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
175+
index 111111111111..222222222222 100644
176+
--- a/drivers/pci/pcie/portdrv.c
177+
+++ b/drivers/pci/pcie/portdrv.c
178+
@@ -335,6 +335,7 @@ static int pcie_port_device_register(struct pci_dev *dev)
179+
180+
/* Get and check PCI Express port services */
181+
capabilities = get_port_device_capability(dev);
182+
+dev_info(&dev->dev, "PCIe capabilities: 0x%x\n", capabilities);
183+
if (!capabilities)
184+
return 0;
185+
186+
@@ -347,6 +348,7 @@ static int pcie_port_device_register(struct pci_dev *dev)
187+
* if that is to be used.
188+
*/
189+
status = pcie_init_service_irqs(dev, irqs, capabilities);
190+
+dev_info(&dev->dev, "init_service_irqs: %d\n", status);
191+
if (status) {
192+
capabilities &= PCIE_PORT_SERVICE_HP;
193+
if (!capabilities)
194+
--
195+
Armbian
196+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Russell King <rmk+kernel@arm.linux.org.uk>
3+
Date: Tue, 29 Nov 2016 10:13:48 +0000
4+
Subject: implement slot capabilities (SSPL)
5+
6+
---
7+
drivers/pci/controller/pci-mvebu.c | 20 ++++++++++
8+
1 file changed, 20 insertions(+)
9+
10+
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
11+
index 111111111111..222222222222 100644
12+
--- a/drivers/pci/controller/pci-mvebu.c
13+
+++ b/drivers/pci/controller/pci-mvebu.c
14+
@@ -79,6 +79,7 @@
15+
#define PCIE_SSPL_VALUE_MASK GENMASK(7, 0)
16+
#define PCIE_SSPL_SCALE_SHIFT 8
17+
#define PCIE_SSPL_SCALE_MASK GENMASK(9, 8)
18+
+#define PCIE_SSPL_MSGEN BIT(14)
19+
#define PCIE_SSPL_ENABLE BIT(16)
20+
#define PCIE_RC_RTSTA 0x1a14
21+
#define PCIE_DEBUG_CTRL 0x1a60
22+
@@ -705,6 +706,14 @@ mvebu_pci_bridge_emul_pcie_conf_read(struct pci_bridge_emul *bridge,
23+
(PCI_EXP_LNKSTA_DLLLA << 16) : 0);
24+
break;
25+
26+
+ case PCI_EXP_SLTCAP:
27+
+ {
28+
+ u32 tmp = mvebu_readl(port, PCIE_SSPL_OFF);
29+
+ *value = FIELD_GET(PCIE_SSPL_SCALE_MASK, tmp) << 15 |
30+
+ FIELD_GET(PCIE_SSPL_VALUE_MASK, tmp) << 7;
31+
+ break;
32+
+ }
33+
+
34+
case PCI_EXP_SLTCTL: {
35+
u16 slotctl = le16_to_cpu(bridge->pcie_conf.slotctl);
36+
u16 slotsta = le16_to_cpu(bridge->pcie_conf.slotsta);
37+
@@ -882,6 +891,17 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
38+
mvebu_writel(port, new, PCIE_CAP_PCIEXP + PCI_EXP_LNKCTL);
39+
break;
40+
41+
+ case PCI_EXP_SLTCAP:
42+
+ {
43+
+ u32 sspl = FIELD_PREP(PCIE_SSPL_VALUE_MASK,
44+
+ FIELD_GET(PCI_EXP_SLTCAP_SPLV, new)) |
45+
+ FIELD_PREP(PCIE_SSPL_SCALE_MASK,
46+
+ FIELD_GET(PCI_EXP_SLTCAP_SPLS, new)) |
47+
+ PCIE_SSPL_MSGEN;
48+
+ mvebu_writel(port, sspl, PCIE_SSPL_OFF);
49+
+ break;
50+
+ }
51+
+
52+
case PCI_EXP_SLTCTL:
53+
/*
54+
* Allow to change PCIE_SSPL_ENABLE bit only when slot power
55+
--
56+
Armbian
57+

0 commit comments

Comments
 (0)