Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8_cs5535audio_fix_logspam_on_geos.patch
# Add PC Engines APU led support
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8_cs5535audio_fix_logspam_on_geos.patch
# Add PC Engines APU led support
- cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.9.8-apu_leds.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-4.14-apu_leds.patch
# Fix uevent PHYSDEVDRIVER
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-2.6.32.27_mcs7830-fix-driver-name.patch
# Fix uevent PHYSDEVDRIVER
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-2.6.32.27_mcs7830-fix-driver-name.patch
-diff -Naur linux-4.9.8.org/arch/x86/Kconfig linux-4.9.8/arch/x86/Kconfig
---- linux-4.9.8.org/arch/x86/Kconfig 2017-02-04 09:47:29.000000000 +0100
-+++ linux-4.9.8/arch/x86/Kconfig 2017-02-09 19:29:59.244945360 +0100
-@@ -2604,6 +2604,7 @@
+diff -Naur linux-4.14.101.org/arch/x86/Kconfig linux-4.14.101/arch/x86/Kconfig
+--- linux-4.14.101.org/arch/x86/Kconfig 2019-02-15 09:08:56.000000000 +0100
++++ linux-4.14.101/arch/x86/Kconfig 2019-02-18 22:24:00.682722072 +0100
+@@ -2715,6 +2715,7 @@
- AC adapter status updates
- Battery status updates
- AC adapter status updates
- Battery status updates
config ALIX
bool "PCEngines ALIX System Support (LED setup)"
select GPIOLIB
config ALIX
bool "PCEngines ALIX System Support (LED setup)"
select GPIOLIB
+ This option enables system support for the PCEngines APU1.
+
+config APU2LED
+ This option enables system support for the PCEngines APU1.
+
+config APU2LED
-+ bool "PCEngines APU2 Led Support"
++ bool "PCEngines APU2/3/4 Led Support"
+ depends on DMI
+ ---help---
+ depends on DMI
+ ---help---
-+ This option enables system support for the PCEngines APU2.
++ This option enables system support for the PCEngines APU2/3/4.
+
config AMD_NB
def_bool y
depends on CPU_SUP_AMD && PCI
+
config AMD_NB
def_bool y
depends on CPU_SUP_AMD && PCI
-diff -Naur linux-4.9.8.org/arch/x86/platform/apu/apu2-led.c linux-4.9.8/arch/x86/platform/apu/apu2-led.c
---- linux-4.9.8.org/arch/x86/platform/apu/apu2-led.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.9.8/arch/x86/platform/apu/apu2-led.c 2017-02-09 19:29:59.244945360 +0100
-@@ -0,0 +1,180 @@
+diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c linux-4.14.101/arch/x86/platform/apu/apu2-led.c
+--- linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.101/arch/x86/platform/apu/apu2-led.c 2019-02-18 22:30:08.503059825 +0100
+@@ -0,0 +1,183 @@
-+ * LEDs driver for PCEngines apu2
++ * LEDs driver for PCEngines apu2/3/4
+ *
+ * this basic driver only set the output, configuration
+ * has already done by bios/coreboot.
+ *
+ * this basic driver only set the output, configuration
+ * has already done by bios/coreboot.
+ goto out;
+
+ product = dmi_get_system_info(DMI_PRODUCT_NAME);
+ goto out;
+
+ product = dmi_get_system_info(DMI_PRODUCT_NAME);
-+ if (!product || (strcmp(product, "PC Engines apu2") && strcmp(product, "apu2")) )
++ if (!product || ( strcmp(product, "PC Engines apu2") &&
++ strcmp(product, "PC Engines apu3") &&
++ strcmp(product, "PC Engines apu4") &&
++ strcmp(product, "apu2") ) ) // apu2 on early bios relases
+ goto out;
+
+ printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
+ goto out;
+
+ printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
+module_exit(apu2_led_exit);
+
+MODULE_AUTHOR("Arne Fitzenreiter");
+module_exit(apu2_led_exit);
+
+MODULE_AUTHOR("Arne Fitzenreiter");
-+MODULE_DESCRIPTION("PCEngines apu2 LED driver");
++MODULE_DESCRIPTION("PCEngines apu2/3/4 LED driver");
-diff -Naur linux-4.9.8.org/arch/x86/platform/apu/apu-led.c linux-4.9.8/arch/x86/platform/apu/apu-led.c
---- linux-4.9.8.org/arch/x86/platform/apu/apu-led.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.9.8/arch/x86/platform/apu/apu-led.c 2017-02-09 19:29:59.244945360 +0100
+diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu-led.c linux-4.14.101/arch/x86/platform/apu/apu-led.c
+--- linux-4.14.101.org/arch/x86/platform/apu/apu-led.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.101/arch/x86/platform/apu/apu-led.c 2019-02-18 22:24:00.686721439 +0100
@@ -0,0 +1,181 @@
+/*
+ * LEDs driver for PCEngines apu
@@ -0,0 +1,181 @@
+/*
+ * LEDs driver for PCEngines apu
+MODULE_AUTHOR("Christian Herzog");
+MODULE_DESCRIPTION("PCEngines apu LED driver");
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Herzog");
+MODULE_DESCRIPTION("PCEngines apu LED driver");
+MODULE_LICENSE("GPL");
-diff -Naur linux-4.9.8.org/arch/x86/platform/apu/Makefile linux-4.9.8/arch/x86/platform/apu/Makefile
---- linux-4.9.8.org/arch/x86/platform/apu/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.9.8/arch/x86/platform/apu/Makefile 2017-02-09 19:29:59.244945360 +0100
+diff -Naur linux-4.14.101.org/arch/x86/platform/apu/Makefile linux-4.14.101/arch/x86/platform/apu/Makefile
+--- linux-4.14.101.org/arch/x86/platform/apu/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.101/arch/x86/platform/apu/Makefile 2019-02-18 22:24:00.686721439 +0100
@@ -0,0 +1,2 @@
+obj-$(CONFIG_APULED) += apu-led.o
+obj-$(CONFIG_APU2LED) += apu2-led.o
@@ -0,0 +1,2 @@
+obj-$(CONFIG_APULED) += apu-led.o
+obj-$(CONFIG_APU2LED) += apu2-led.o
-diff -Naur linux-4.9.8.org/arch/x86/platform/Makefile linux-4.9.8/arch/x86/platform/Makefile
---- linux-4.9.8.org/arch/x86/platform/Makefile 2017-02-04 09:47:29.000000000 +0100
-+++ linux-4.9.8/arch/x86/platform/Makefile 2017-02-09 19:32:31.768269470 +0100
-@@ -1,4 +1,5 @@
+diff -Naur linux-4.14.101.org/arch/x86/platform/Makefile linux-4.14.101/arch/x86/platform/Makefile
+--- linux-4.14.101.org/arch/x86/platform/Makefile 2019-02-15 09:08:56.000000000 +0100
++++ linux-4.14.101/arch/x86/platform/Makefile 2019-02-18 22:24:00.686721439 +0100
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
# Platform specific code goes here
+obj-y += apu/
obj-y += atom/
# Platform specific code goes here
+obj-y += apu/
obj-y += atom/