* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. fff24766e384c0245f2c660a7e4a422db2ee6e7b
@ 2014-03-17 23:26 git
0 siblings, 0 replies; only message in thread
From: git @ 2014-03-17 23:26 UTC (permalink / raw)
To: ipfire-scm
[-- Attachment #1: Type: text/plain, Size: 11116 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via fff24766e384c0245f2c660a7e4a422db2ee6e7b (commit)
via 607c9d3ae05eaa5de02c51aa5923505f7c5026c3 (commit)
via e583643a25e2249bcc3583bdae9aed7b57663fbe (commit)
from da7a2208d3a3c4143ce9029665ad9d738e70d3b1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fff24766e384c0245f2c660a7e4a422db2ee6e7b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Tue Mar 18 00:25:08 2014 +0100
initskripts: add pcengines apu support to leds.
commit 607c9d3ae05eaa5de02c51aa5923505f7c5026c3
Merge: e583643 da7a220
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Tue Mar 18 00:22:24 2014 +0100
Merge branch 'next' of git.ipfire.org:/pub/git/ipfire-2.x into next
commit e583643a25e2249bcc3583bdae9aed7b57663fbe
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Tue Mar 18 00:21:38 2014 +0100
kernel: add pcengines apu led support.
-----------------------------------------------------------------------
Summary of changes:
config/kernel/kernel.config.i586-ipfire | 3 +-
config/kernel/kernel.config.i586-ipfire-pae | 3 +-
lfs/linux | 3 +
src/initscripts/init.d/leds | 11 ++
src/patches/linux-3.10-apu_leds.patch | 215 ++++++++++++++++++++++++++++
5 files changed, 233 insertions(+), 2 deletions(-)
create mode 100644 src/patches/linux-3.10-apu_leds.patch
Difference in files:
diff --git a/config/kernel/kernel.config.i586-ipfire b/config/kernel/kernel.config.i586-ipfire
index c7fdbd1..9ec9523 100644
--- a/config/kernel/kernel.config.i586-ipfire
+++ b/config/kernel/kernel.config.i586-ipfire
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 3.10.30-ipfire Kernel Configuration
+# Linux/x86 3.10.33 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -658,6 +658,7 @@ CONFIG_EISA_NAMES=y
CONFIG_SCx200=m
CONFIG_SCx200HR_TIMER=m
# CONFIG_OLPC is not set
+CONFIG_APULED=y
CONFIG_ALIX=y
CONFIG_NET5501=y
CONFIG_GEOS=y
diff --git a/config/kernel/kernel.config.i586-ipfire-pae b/config/kernel/kernel.config.i586-ipfire-pae
index 1480252..5fd7ab9 100644
--- a/config/kernel/kernel.config.i586-ipfire-pae
+++ b/config/kernel/kernel.config.i586-ipfire-pae
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 3.10.30-ipfire Kernel Configuration
+# Linux/x86 3.10.33 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -670,6 +670,7 @@ CONFIG_EISA_PCI_EISA=y
CONFIG_EISA_VIRTUAL_ROOT=y
CONFIG_EISA_NAMES=y
# CONFIG_SCx200 is not set
+CONFIG_APULED=y
# CONFIG_ALIX is not set
# CONFIG_NET5501 is not set
# CONFIG_GEOS is not set
diff --git a/lfs/linux b/lfs/linux
index 7ffb345..687de36 100644
--- a/lfs/linux
+++ b/lfs/linux
@@ -147,6 +147,9 @@ endif
# cs5535audio spams syslog if no ac97 was present (geos router)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.30_cs5535audio_fix_logspam_on_geos.patch
+ # Add PC Engines APU led support
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-apu_leds.patch
+
# Fix uevent PHYSDEVDRIVER
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.2.33_ipg-fix-driver-name.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_mcs7830-fix-driver-name.patch
diff --git a/src/initscripts/init.d/leds b/src/initscripts/init.d/leds
index 52ef270..d75a2e9 100644
--- a/src/initscripts/init.d/leds
+++ b/src/initscripts/init.d/leds
@@ -65,6 +65,11 @@ case "${1}" in
setup_netdev_trigger alix:2 ${RED_DEV} rx
setup_netdev_trigger alix:3 ${RED_DEV} tx
+ # Apu LED start
+ setup_heartbeat_trigger apu:1
+ setup_netdev_trigger apu:2 ${RED_DEV} rx
+ setup_netdev_trigger apu:3 ${RED_DEV} tx
+
# Geos LED start
setup_heartbeat_trigger geos:1
setup_netdev_trigger geos:2 ${RED_DEV} rx
@@ -97,6 +102,12 @@ case "${1}" in
disable_led_trigger alix:2
disable_led_trigger alix:3
+ # Apu LED stop
+ disable_led_trigger apu:1
+ enable_led apu:1
+ disable_led_trigger apu:2
+ disable_led_trigger apu:3
+
# Geos LED stop
disable_led_trigger geos:1
enable_led geos:1
diff --git a/src/patches/linux-3.10-apu_leds.patch b/src/patches/linux-3.10-apu_leds.patch
new file mode 100644
index 0000000..53d389a
--- /dev/null
+++ b/src/patches/linux-3.10-apu_leds.patch
@@ -0,0 +1,215 @@
+diff -Naur linux-3.10.33.org/arch/x86/Kconfig linux-3.10.33/arch/x86/Kconfig
+--- linux-3.10.33.org/arch/x86/Kconfig 2014-03-07 06:58:45.000000000 +0100
++++ linux-3.10.33/arch/x86/Kconfig 2014-03-17 17:02:46.703135023 +0100
+@@ -2199,6 +2199,12 @@
+ - AC adapter status updates
+ - Battery status updates
+
++config APULED
++ bool "PCEngines APU Led Support"
++ depends on DMI
++ ---help---
++ This option enables system support for the PCEngines APU.
++
+ config ALIX
+ bool "PCEngines ALIX System Support (LED setup)"
+ select GPIOLIB
+diff -Naur linux-3.10.33.org/arch/x86/platform/apu/apu-led.c linux-3.10.33/arch/x86/platform/apu/apu-led.c
+--- linux-3.10.33.org/arch/x86/platform/apu/apu-led.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.10.33/arch/x86/platform/apu/apu-led.c 2014-03-17 17:00:36.187188456 +0100
+@@ -0,0 +1,181 @@
++/*
++ * LEDs driver for PCEngines apu
++ *
++ * Copyright (C) 2013 Christian Herzog <daduke(a)daduke.org>, based on
++ * Petr Leibman's leds-alix
++ * Hardware presence check added by Arne Fitzenreiter <arne_f(a)ipfire.org>
++ * Based on leds-wrap.c
++ * Hardware info taken from http://www.dpie.com/manuals/miniboards/kontron/KTD-S0043-0_KTA55_SoftwareGuide.pdf
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <linux/err.h>
++#include <asm/io.h>
++#include <linux/dmi.h>
++
++#define DRVNAME "apu-led"
++#define BASEADDR (0xFED801BD)
++#define LEDON (0x8)
++#define LEDOFF (0xC8)
++
++static struct platform_device *pdev;
++unsigned int *p1;
++unsigned int *p2;
++unsigned int *p3;
++
++static void apu_led_set_1(struct led_classdev *led_cdev,
++ enum led_brightness value) {
++ if (value)
++ iowrite8(LEDON, p1);
++ else
++ iowrite8(LEDOFF, p1);
++}
++
++static void apu_led_set_2(struct led_classdev *led_cdev,
++ enum led_brightness value) {
++ if (value)
++ iowrite8(LEDON, p2);
++ else
++ iowrite8(LEDOFF, p2);
++}
++
++static void apu_led_set_3(struct led_classdev *led_cdev,
++ enum led_brightness value) {
++ if (value)
++ iowrite8(LEDON, p3);
++ else
++ iowrite8(LEDOFF, p3);
++}
++
++static struct led_classdev apu_led_1 = {
++ .name = "apu:1",
++ .brightness_set = apu_led_set_1,
++};
++
++static struct led_classdev apu_led_2 = {
++ .name = "apu:2",
++ .brightness_set = apu_led_set_2,
++};
++
++static struct led_classdev apu_led_3 = {
++ .name = "apu:3",
++ .brightness_set = apu_led_set_3,
++};
++
++
++#ifdef CONFIG_PM
++static int apu_led_suspend(struct platform_device *dev,
++ pm_message_t state)
++{
++ led_classdev_suspend(&apu_led_1);
++ led_classdev_suspend(&apu_led_2);
++ led_classdev_suspend(&apu_led_3);
++ return 0;
++}
++
++static int apu_led_resume(struct platform_device *dev)
++{
++ led_classdev_resume(&apu_led_1);
++ led_classdev_resume(&apu_led_2);
++ led_classdev_resume(&apu_led_3);
++ return 0;
++}
++#else
++#define apu_led_suspend NULL
++#define apu_led_resume NULL
++#endif
++
++static int apu_led_probe(struct platform_device *pdev)
++{
++ int ret;
++
++ ret = led_classdev_register(&pdev->dev, &apu_led_1);
++ if (ret == 0)
++ {
++ ret = led_classdev_register(&pdev->dev, &apu_led_2);
++ if (ret >= 0)
++ {
++ ret = led_classdev_register(&pdev->dev, &apu_led_3);
++ if (ret < 0)
++ led_classdev_unregister(&apu_led_2);
++ }
++ if (ret < 0)
++ led_classdev_unregister(&apu_led_1);
++ }
++ return ret;
++}
++
++static int apu_led_remove(struct platform_device *pdev)
++{
++ led_classdev_unregister(&apu_led_1);
++ led_classdev_unregister(&apu_led_2);
++ led_classdev_unregister(&apu_led_3);
++ return 0;
++}
++
++static struct platform_driver apu_led_driver = {
++ .probe = apu_led_probe,
++ .remove = apu_led_remove,
++ .suspend = apu_led_suspend,
++ .resume = apu_led_resume,
++ .driver = {
++ .name = DRVNAME,
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init apu_led_init(void)
++{
++ int ret=0;
++ const char *vendor, *product;
++
++ vendor = dmi_get_system_info(DMI_SYS_VENDOR);
++ if (!vendor || strcmp(vendor, "PC Engines"))
++ goto out;
++
++ product = dmi_get_system_info(DMI_PRODUCT_NAME);
++ if (!product || strcmp(product, "APU"))
++ goto out;
++
++ printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
++ KBUILD_MODNAME, vendor, product);
++
++ ret = platform_driver_register(&apu_led_driver);
++ if (ret < 0)
++ goto out;
++
++ pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0);
++ if (IS_ERR(pdev)) {
++ ret = PTR_ERR(pdev);
++ platform_driver_unregister(&apu_led_driver);
++ goto out;
++ }
++
++ p1 = ioremap(BASEADDR, 1);
++ p2 = ioremap(BASEADDR+1, 1);
++ p3 = ioremap(BASEADDR+2, 1);
++
++out:
++ return ret;
++}
++
++static void __exit apu_led_exit(void)
++{
++ platform_device_unregister(pdev);
++ platform_driver_unregister(&apu_led_driver);
++}
++
++module_init(apu_led_init);
++module_exit(apu_led_exit);
++
++MODULE_AUTHOR("Christian Herzog");
++MODULE_DESCRIPTION("PCEngines apu LED driver");
++MODULE_LICENSE("GPL");
+diff -Naur linux-3.10.33.org/arch/x86/platform/apu/Makefile linux-3.10.33/arch/x86/platform/apu/Makefile
+--- linux-3.10.33.org/arch/x86/platform/apu/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.10.33/arch/x86/platform/apu/Makefile 2014-03-17 17:05:19.245651480 +0100
+@@ -0,0 +1 @@
++obj-$(CONFIG_APULED) += apu-led.o
+diff -Naur linux-3.10.33.org/arch/x86/platform/Makefile linux-3.10.33/arch/x86/platform/Makefile
+--- linux-3.10.33.org/arch/x86/platform/Makefile 2014-03-07 06:58:45.000000000 +0100
++++ linux-3.10.33/arch/x86/platform/Makefile 2014-03-17 14:53:15.078571307 +0100
+@@ -1,4 +1,5 @@
+ # Platform specific code goes here
++obj-y += apu/
+ obj-y += ce4100/
+ obj-y += efi/
+ obj-y += geode/
hooks/post-receive
--
IPFire 2.x development tree
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-17 23:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 23:26 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. fff24766e384c0245f2c660a7e4a422db2ee6e7b git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox