core/linux-espressobin to 4.12.0-1

This commit is contained in:
Kevin Mihelich 2017-07-05 02:14:49 +00:00
parent 5ef139d3c9
commit d058f7aee5
12 changed files with 3403 additions and 1349 deletions

View file

@ -0,0 +1,42 @@
From 88b3509f36a458b882b895ecf9eb50e922ddb2e1 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Sat, 1 Jul 2017 15:16:33 +0100
Subject: [PATCH 1/8] ARM64: dts: marvell: armada37xx: Fix timer interrupt
specifiers
Contrary to popular belief, PPIs connected to a GICv3 to not have
an affinity field similar to that of GICv2. That is consistent
with the fact that GICv3 is designed to accomodate thousands of
CPUs, and fitting them as a bitmap in a byte is... difficult.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index 4d495ec39202..bc179efb10ef 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -75,14 +75,10 @@
timer {
compatible = "arm,armv8-timer";
- interrupts = <GIC_PPI 13
- (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
- <GIC_PPI 14
- (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
- <GIC_PPI 11
- (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
- <GIC_PPI 10
- (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
};
soc {
--
2.13.2

View file

@ -0,0 +1,33 @@
From e9fa04548195495c53ed7d13a7f6028f60b24fde Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Sat, 1 Jul 2017 15:16:34 +0100
Subject: [PATCH 2/8] ARM64: dts: marvell: armada37xx: Fix GIC maintenance
interrupt
The GIC-500 integrated in the Armada-37xx SoCs is compliant with
the GICv3 architecture, and thus provides a maintenance interrupt
that is required for hypervisors to function correctly.
With the interrupt provided in the DT, KVM now works as it should.
Tested on an Espressobin system.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index bc179efb10ef..592e95e5f633 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -312,6 +312,7 @@
interrupt-controller;
reg = <0x1d00000 0x10000>, /* GICD */
<0x1d40000 0x40000>; /* GICR */
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
};
};
--
2.13.2

View file

@ -0,0 +1,38 @@
From 4d36e9fbcde62f6312d0f3c573aa0bb9ee48c478 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Sat, 1 Jul 2017 15:16:35 +0100
Subject: [PATCH 3/8] ARM64: dts: marvell: armada37xx: Enable memory-mapped GIC
CPU interface
The Cortex-A53s that power the Armada-37xx SoCs are equipped with
a GIC CPU interface that gets enabled when coupled with a GICv3
interrupt controller, such as the GIC-500 on the this SoC.
Advertise the MMIO ranges provided by the CPUs, which enables
(among other things) GICv2 guests to run under a hypervisor such
as KVM.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index 592e95e5f633..fd26d31d2846 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -311,7 +311,10 @@
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x1d00000 0x10000>, /* GICD */
- <0x1d40000 0x40000>; /* GICR */
+ <0x1d40000 0x40000>, /* GICR */
+ <0x1d80000 0x2000>, /* GICC */
+ <0x1d90000 0x2000>, /* GICH */
+ <0x1da0000 0x20000>; /* GICV */
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
};
};
--
2.13.2

View file

@ -0,0 +1,35 @@
From 55f2b7a0efc914173368405d1399f31a4ca76566 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Sat, 1 Jul 2017 15:16:36 +0100
Subject: [PATCH 4/8] ARM64: dts: marvell: armada37xx: Wire PMUv3
The Cortex-A53s that power the Armada-37xx SoCs are equipped with
a PMUv3, just like most ARMv8 cores.
Advertise the PMUv3 presence in the device tree, and wire its
interrupt. This allows the perf subsystem to work correctly.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index fd26d31d2846..f4deb8cd11c6 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -81,6 +81,11 @@
<GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
};
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <2>;
--
2.13.2

View file

@ -0,0 +1,33 @@
From 8024835ce8bd95e953658bd3c83eadc3eaf4dec6 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Sat, 1 Jul 2017 15:16:37 +0100
Subject: [PATCH 5/8] ARM64: dts: marvell: armada37xx: Enable USB2 on
espressobin
The Espressobin SBC has a USB2 interface available on J8. Let's
enable it.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index e3a136ed77b0..b1af3f988b29 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -81,6 +81,11 @@
status = "okay";
};
+/* J8 */
+&usb2 {
+ status = "okay";
+};
+
&mdio {
switch0: switch0@1 {
compatible = "marvell,mv88e6085";
--
2.13.2

View file

@ -0,0 +1,72 @@
From 85348a90e9b2bc41164e51184bad445bdc4b777d Mon Sep 17 00:00:00 2001
From: Konstantin Porotchkin <kostap@marvell.com>
Date: Tue, 23 May 2017 16:11:40 +0300
Subject: [PATCH 6/8] arm64: dts: marvell: Enable second SDHCI controller in
Armada 37xx
The Armada 37xx SoCs has 2 SDHCI interfaces. This patch adds the second
one.
Moreover, the Armada 37xx DB v2 board populates the 2 SDHCI interfaces.
The second interface is using pluggable module that can either
have an SD connector or eMMC on it.
This patch adds support for SD module in the device DT.
[ gregory.clement@free-electrons.com:
- Add more detail in commit log
- Sort the dt node in address order
- Document the SD slot in the dts ]
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
arch/arm64/boot/dts/marvell/armada-3720-db.dts | 9 +++++++++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-db.dts b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
index a89855f57091..6a0abd7a5349 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
@@ -113,6 +113,15 @@
status = "okay";
};
+/* SD slot module on CON14(V2.0)/CON15(V1.4) */
+&sdhci1 {
+ wp-inverted;
+ cd-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
+ bus-width = <4>;
+ marvell,pad-type = "sd";
+ status = "okay";
+};
+
&spi0 {
status = "okay";
pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index f4deb8cd11c6..a78195b4ef7a 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -293,6 +293,17 @@
};
};
+ sdhci1: sdhci@d0000 {
+ compatible = "marvell,armada-3700-sdhci",
+ "marvell,sdhci-xenon";
+ reg = <0xd0000 0x300>,
+ <0x1e808 0x4>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&nb_periph_clk 0>;
+ clock-names = "core";
+ status = "disabled";
+ };
+
sdhci0: sdhci@d8000 {
compatible = "marvell,armada-3700-sdhci",
"marvell,sdhci-xenon";
--
2.13.2

View file

@ -0,0 +1,46 @@
From 191c274b6024a3b3055200e909d6ad68872fa976 Mon Sep 17 00:00:00 2001
From: Sean Nyekjaer <sean@nyekjaer.dk>
Date: Sun, 25 Jun 2017 21:20:05 +0200
Subject: [PATCH 7/8] arm64: dts: marvell: Add microsd card definition for the
ESPRESSObin
This defines and enables the microsd card on the
Marvell ESPRESSObin board.
Signed-off-by: Sean Nyekjaer <sean@nyekjaer.dk>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index b1af3f988b29..409385c4195a 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -45,6 +45,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "armada-372x.dtsi"
/ {
@@ -76,6 +77,16 @@
status = "okay";
};
+/* microsd slot */
+&sdhci1 {
+ wp-inverted;
+ bus-width = <4>;
+ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
+ no-1-8-v;
+ marvell,pad-type = "sd";
+ status = "okay";
+};
+
/* J7 */
&usb3 {
status = "okay";
--
2.13.2

View file

@ -0,0 +1,25 @@
From 10cb26081c87817aa037eb4151e42237d000da68 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 4 Jul 2017 19:25:28 -0600
Subject: [PATCH 8/8] arm64: marvell: armada37xx: Add eth0 alias
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
---
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index a78195b4ef7a..14248957b2dd 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -54,6 +54,7 @@
#size-cells = <2>;
aliases {
+ ethernet0 = &eth0;
serial0 = &uart0;
};
--
2.13.2

View file

@ -4,27 +4,56 @@
buildarch=8
pkgbase=linux-espressobin
_commit=96b436a66a296f7a6539a655ab9d3fdd84e9e3a7
_srcname=linux-espressobin-${_commit}
_srcname=linux-4.12
_kernelname=${pkgbase#linux}
_desc="Globalscale ESPRESSOBin"
pkgver=4.4.71
pkgver=4.12.0
pkgrel=1
arch=('aarch64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
options=('!strip')
source=("https://github.com/kmihelich/linux-espressobin/archive/${_commit}.tar.gz"
source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
#"http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
'0001-ARM64-dts-marvell-armada37xx-Fix-timer-interrupt-spe.patch'
'0002-ARM64-dts-marvell-armada37xx-Fix-GIC-maintenance-int.patch'
'0003-ARM64-dts-marvell-armada37xx-Enable-memory-mapped-GI.patch'
'0004-ARM64-dts-marvell-armada37xx-Wire-PMUv3.patch'
'0005-ARM64-dts-marvell-armada37xx-Enable-USB2-on-espresso.patch'
'0006-arm64-dts-marvell-Enable-second-SDHCI-controller-in-.patch'
'0007-arm64-dts-marvell-Add-microsd-card-definition-for-th.patch'
'0008-arm64-marvell-armada37xx-Add-eth0-alias.patch'
'config'
'linux.preset')
md5sums=('2dd69313c30aaa9570018b5600b35934'
'b357b234a97e2c716023fa3e5f0e7c35'
'c275a5855f013054b48083e9006949a4')
md5sums=('fc454157e2d024d401a60905d6481c6b'
'7b2bb6f5cfd91f1e0b98693b4c2be795'
'ad38796bd014a3a2f371cb705629391a'
'71e1896b02c2c36372b23c41f74bf3cc'
'3537c6f3729f2cb7e528eec15bec849b'
'b007cd30ca2261e9f7f7a14fadb5e999'
'19b64449ee336a42255411a0025fd5d1'
'a14447adca3b29fb28a30de451e39488'
'80a477685ba907e83b3b0c10a36bc5f0'
'aafe13461c5fed44285f685025ec610f'
'd8d30aa4a9d4c2b8d4ea53faf46ccf80')
prepare() {
cd "${srcdir}/${_srcname}"
# add upstream patch
#git apply --whitespace=nowarn ../patch-${pkgver}
# ALARM patches
git apply ../0001-ARM64-dts-marvell-armada37xx-Fix-timer-interrupt-spe.patch
git apply ../0002-ARM64-dts-marvell-armada37xx-Fix-GIC-maintenance-int.patch
git apply ../0003-ARM64-dts-marvell-armada37xx-Enable-memory-mapped-GI.patch
git apply ../0004-ARM64-dts-marvell-armada37xx-Wire-PMUv3.patch
git apply ../0005-ARM64-dts-marvell-armada37xx-Enable-USB2-on-espresso.patch
git apply ../0006-arm64-dts-marvell-Enable-second-SDHCI-controller-in-.patch
git apply ../0007-arm64-dts-marvell-Add-microsd-card-definition-for-th.patch
git apply ../0008-arm64-marvell-armada37xx-Add-eth0-alias.patch
cat "${srcdir}/config" > ./.config
# add pkgrel to extraversion
@ -62,14 +91,15 @@ build() {
# build!
unset LDFLAGS
make ${MAKEFLAGS} Image modules dtbs
make ${MAKEFLAGS} Image Image.gz modules dtbs
}
_package() {
pkgdesc="The Linux Kernel and modules - ${_desc}"
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'uboot-tools')
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' "linux=${pkgver}")
replaces=('linux-armv8')
conflicts=('linux')
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=${pkgname}.install
@ -86,7 +116,7 @@ _package() {
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
make INSTALL_MOD_PATH="${pkgdir}" modules_install
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
cp arch/$KARCH/boot/Image "${pkgdir}/boot"
cp arch/$KARCH/boot/Image{,.gz} "${pkgdir}/boot"
# set correct depmod command for install
sed \
@ -105,13 +135,11 @@ _package() {
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
# make room for external modules
ln -s "../extramodules-${_basekernel}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}/version"
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
# Now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver"
@ -127,6 +155,7 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
provides=("linux-headers=${pkgver}")
replaces=('linux-armv8-headers')
conflicts=('linux-headers')
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
@ -141,8 +170,8 @@ _package-headers() {
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
media net pcmcia scsi soc sound trace uapi video xen; do
for i in acpi asm-generic clocksource config crypto drm generated keys linux \
math-emu media net pcmcia scsi soc sound trace uapi video xen; do
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
done

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-espressobin
KERNEL_VERSION=4.4.45-1-ARCH
KERNEL_VERSION=4.12.0-1-ARCH
post_install () {
# updating module dependencies

View file

@ -1,7 +1,7 @@
# mkinitcpio preset file for the 'linux-espressobin' package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="4.4.45-1-ARCH"
ALL_kver="4.12.0-1-ARCH"
PRESETS=('default')