From: <ow...@us...> - 2008-12-09 20:32:55
|
Revision: 2172 http://ipcop.svn.sourceforge.net/ipcop/?rev=2172&view=rev Author: owes Date: 2008-12-09 20:32:52 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Use linux kernel 2.6.27 and bump to 1.9.4 Temporarily remove the things that no longer compile. kernel/drivers/base has disappeared. Slightly rearrange the strip in lfs/cdrom and disable strip of etc/Conexant. Modified Paths: -------------- ipcop/trunk/lfs/cdrom ipcop/trunk/lfs/initramfs ipcop/trunk/lfs/linux ipcop/trunk/lfs/linux-headers ipcop/trunk/make.sh Added Paths: ----------- ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup_SKIP ipcop/trunk/config/rootfiles/arch_i486/CnxADSL_SKIP ipcop/trunk/config/rootfiles/common/3cp4218_SKIP ipcop/trunk/config/rootfiles/common/amedyn2_SKIP ipcop/trunk/src/patches/linux-2.6.27-leds-alix.patch Removed Paths: ------------- ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup ipcop/trunk/config/rootfiles/arch_i486/CnxADSL ipcop/trunk/config/rootfiles/common/3cp4218 ipcop/trunk/config/rootfiles/common/amedyn2 ipcop/trunk/src/patches/linux-2.6.25-leds-alix.patch Deleted: ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup =================================================================== --- ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup 2008-12-09 20:32:52 UTC (rev 2172) @@ -1,3 +0,0 @@ -## 3c5x9setup-1.00 -## -usr/sbin/3c5x9setup Copied: ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup_SKIP (from rev 2160, ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup) =================================================================== --- ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup_SKIP (rev 0) +++ ipcop/trunk/config/rootfiles/arch_i486/3c5x9setup_SKIP 2008-12-09 20:32:52 UTC (rev 2172) @@ -0,0 +1,3 @@ +## 3c5x9setup-1.00 +## +usr/sbin/3c5x9setup Deleted: ipcop/trunk/config/rootfiles/arch_i486/CnxADSL =================================================================== --- ipcop/trunk/config/rootfiles/arch_i486/CnxADSL 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/config/rootfiles/arch_i486/CnxADSL 2008-12-09 20:32:52 UTC (rev 2172) @@ -1,9 +0,0 @@ -#etc/Conexant -etc/Conexant/CnxTgF.hex -etc/Conexant/cnxadsl.conf -etc/Conexant/cnxadslload -#lib/modules/KVER/extra -lib/modules/KVER/extra/CnxADSL.ko -#usr/sbin/cnxadslautolog -usr/sbin/cnxadslconfig -usr/sbin/cnxadslstatus Copied: ipcop/trunk/config/rootfiles/arch_i486/CnxADSL_SKIP (from rev 2160, ipcop/trunk/config/rootfiles/arch_i486/CnxADSL) =================================================================== --- ipcop/trunk/config/rootfiles/arch_i486/CnxADSL_SKIP (rev 0) +++ ipcop/trunk/config/rootfiles/arch_i486/CnxADSL_SKIP 2008-12-09 20:32:52 UTC (rev 2172) @@ -0,0 +1,9 @@ +#etc/Conexant +etc/Conexant/CnxTgF.hex +etc/Conexant/cnxadsl.conf +etc/Conexant/cnxadslload +#lib/modules/KVER/extra +lib/modules/KVER/extra/CnxADSL.ko +#usr/sbin/cnxadslautolog +usr/sbin/cnxadslconfig +usr/sbin/cnxadslstatus Deleted: ipcop/trunk/config/rootfiles/common/3cp4218 =================================================================== --- ipcop/trunk/config/rootfiles/common/3cp4218 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/config/rootfiles/common/3cp4218 2008-12-09 20:32:52 UTC (rev 2172) @@ -1,8 +0,0 @@ -## 3cp4218-2003-10-22 -## -usr/sbin/3cextract -usr/sbin/3cload -usr/sbin/3cioctl -#usr/share/locale/es/LC_MESSAGES/3cioctl.mo -#usr/share/locale/es/LC_MESSAGES/3cload.mo -#lib/modules/KVER/kernel/drivers/usb/3cp4218.ko Copied: ipcop/trunk/config/rootfiles/common/3cp4218_SKIP (from rev 2160, ipcop/trunk/config/rootfiles/common/3cp4218) =================================================================== --- ipcop/trunk/config/rootfiles/common/3cp4218_SKIP (rev 0) +++ ipcop/trunk/config/rootfiles/common/3cp4218_SKIP 2008-12-09 20:32:52 UTC (rev 2172) @@ -0,0 +1,8 @@ +## 3cp4218-2003-10-22 +## +usr/sbin/3cextract +usr/sbin/3cload +usr/sbin/3cioctl +#usr/share/locale/es/LC_MESSAGES/3cioctl.mo +#usr/share/locale/es/LC_MESSAGES/3cload.mo +#lib/modules/KVER/kernel/drivers/usb/3cp4218.ko Deleted: ipcop/trunk/config/rootfiles/common/amedyn2 =================================================================== --- ipcop/trunk/config/rootfiles/common/amedyn2 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/config/rootfiles/common/amedyn2 2008-12-09 20:32:52 UTC (rev 2172) @@ -1,3 +0,0 @@ -## amedyn2-2006-09-28 -## -lib/modules/KVER/extra/amedyn2.ko Copied: ipcop/trunk/config/rootfiles/common/amedyn2_SKIP (from rev 2160, ipcop/trunk/config/rootfiles/common/amedyn2) =================================================================== --- ipcop/trunk/config/rootfiles/common/amedyn2_SKIP (rev 0) +++ ipcop/trunk/config/rootfiles/common/amedyn2_SKIP 2008-12-09 20:32:52 UTC (rev 2172) @@ -0,0 +1,3 @@ +## amedyn2-2006-09-28 +## +lib/modules/KVER/extra/amedyn2.ko Modified: ipcop/trunk/lfs/cdrom =================================================================== --- ipcop/trunk/lfs/cdrom 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/lfs/cdrom 2008-12-09 20:32:52 UTC (rev 2172) @@ -132,16 +132,13 @@ # Instead we strip all binaries and libraries as we create the ISO. It's quite safe to do strip --strip-all # on libraries if they will not be used for development. # Just be very careful not to strip the kernel modules!!! - cd /tmp && find ./bin -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - + cd /tmp && find ./{bin,sbin} -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + cd /tmp && find ./lib/{.,iptables,udev} -maxdepth 1 -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + cd /tmp && find ./usr/{bin,lib,libexec,local,sbin} -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' ifeq "$(MACHINE)" "i486" - cd /tmp && find ./etc/Conexant -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + #cd /tmp && find ./etc/Conexant -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' endif - cd /tmp && find ./lib/{.,iptables,udev} -maxdepth 1 -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - cd /tmp && find ./sbin -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - cd /tmp && find ./usr/{bin,lib,libexec,local,sbin} -type f -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - # Create a tarball with /var/ipcop cd /tmp && tar -czf /$(INSTALLER_DIR)/cdrom/$(SNAME)-$(VERSION)-config.tar.gz var/ipcop/* cd /tmp && rm -rf var/ipcop/* Modified: ipcop/trunk/lfs/initramfs =================================================================== --- ipcop/trunk/lfs/initramfs 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/lfs/initramfs 2008-12-09 20:32:52 UTC (rev 2172) @@ -226,7 +226,6 @@ # For SCSI disks cp -af /lib/modules/$(KVER)/kernel/drivers/scsi \ /lib/modules/$(KVER)/kernel/drivers/message \ - /lib/modules/$(KVER)/kernel/drivers/base \ $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers ifeq "$(MACHINE)" "i486" @@ -555,8 +554,8 @@ mkdir -p $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers # Copy the BASE kernel modules - cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/base \ - $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/ + #cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/base \ + # $(FLOPPY_ROOT_DIR)/lib/modules/$(KVER)/kernel/drivers/ # Copy the BLOCK kernel modules cp -a $(INITRAMFS_DIR)/lib/modules/$(KVER)/kernel/drivers/block \ Modified: ipcop/trunk/lfs/linux =================================================================== --- ipcop/trunk/lfs/linux 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/lfs/linux 2008-12-09 20:32:52 UTC (rev 2172) @@ -33,8 +33,8 @@ include Config PKG_NAME = linux -VER = 2.6.25 -PATCHLEVEL = 2.6.25.20 +VER = 2.6.27 +PATCHLEVEL = 2.6.27.8 HOST_ARCH = all OTHER_SRC = yes @@ -63,8 +63,8 @@ $(OPENSWAN).tar.gz = http://www.openswan.org/download/$(OPENSWAN).tar.gz openswan-2.4.x.kernel-2.6.23-natt.patch = http://www.openswan.org/download/openswan-2.4.x.kernel-2.6.23-natt.patch -$(DL_FILE)_MD5 = db95a49a656a3247d4995a797d333153 -patch-$(PATCHLEVEL).bz2_MD5 = 9d870b9947ce0618cf18445e4be33e15 +$(DL_FILE)_MD5 = b3e78977aa79d3754cb7f8143d7ddabd +patch-$(PATCHLEVEL).bz2_MD5 = ec23e3dce22b23ca681199fe515f10fb grsecurity-2.1.10-2.6.19.2-200701222307.patch.gz_MD5 = 718ccce29ce12064673dbe8eb4752696 # match _MD5, first or second line, after the space $(OPENSWAN).tar.gz_MD5 = $(shell sed -ne '/_MD5.*/p' openswan | sed -e '1!d' | cut -d ' ' -f 2) Modified: ipcop/trunk/lfs/linux-headers =================================================================== --- ipcop/trunk/lfs/linux-headers 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/lfs/linux-headers 2008-12-09 20:32:52 UTC (rev 2172) @@ -41,8 +41,8 @@ # you have to recompile _every_ single package in all stages # Also keep in mind that once we release ipcop-2.0, there can be # NO UPGRADING of this package. You can still upgrade lfs/linux though -VER = 2.6.25 -PATCHLEVEL = 2.6.25.20 +VER = 2.6.27 +PATCHLEVEL = 2.6.27.8 HOST_ARCH = all OTHER_SRC = yes @@ -63,8 +63,8 @@ $(DL_FILE) = $(DL_FROM)/$(DL_FILE) patch-$(PATCHLEVEL).bz2 = $(DL_FROM)/patch-$(PATCHLEVEL).bz2 -$(DL_FILE)_MD5 = db95a49a656a3247d4995a797d333153 -patch-$(PATCHLEVEL).bz2_MD5 = 9d870b9947ce0618cf18445e4be33e15 +$(DL_FILE)_MD5 = b3e78977aa79d3754cb7f8143d7ddabd +patch-$(PATCHLEVEL).bz2_MD5 = ec23e3dce22b23ca681199fe515f10fb install : $(TARGET) Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/make.sh 2008-12-09 20:32:52 UTC (rev 2172) @@ -50,13 +50,13 @@ SNAME="ipcop" # This is the IPCop internal version number. May or may not be the version released eventually. -VERSION=1.9.3 +VERSION=1.9.4 # This is the last official IPCop version number. Meaningless in SVN HEAD. #PREVIOUSTAG=IPCOP_v1_4_4_FINAL # Just an arbitrary name for the downloadable, prebuilt toolchain (if you want to save time compiling). -TOOLCHAINVERSION=1.9.3 +TOOLCHAINVERSION=1.9.4 # A collection of all the external software needed to build, install, and run ipcop. This is for GPL compliance. OTHERSRC=${SNAME}-${VERSION}-othersrc.tar.bz2 @@ -1740,13 +1740,13 @@ chroot_make gcc-cross-compile chroot_make linux chroot_make binary-firmware-all - chroot_make 3cp4218 - chroot_make amedyn2 - chroot_make CnxADSL # DEBUG -- driver warn to not be SMP safe but CHANGELOG say this is fixed + #chroot_make 3cp4218 # DEBUG -- broken with kernel 2.6.27 + #chroot_make amedyn2 # DEBUG -- broken with kernel 2.6.27 + #chroot_make CnxADSL # DEBUG -- driver warn to not be SMP safe but CHANGELOG say this is fixed #chroot_make wanpipe # DEBUG -- broken with kernel 2.6.25 - chroot_make fcdsl - chroot_make fcdsl2 - chroot_make fcdslsl + #chroot_make fcdsl # DEBUG -- broken with kernel 2.6.27 + #chroot_make fcdsl2 # DEBUG -- broken with kernel 2.6.27 + #chroot_make fcdslsl # DEBUG -- broken with kernel 2.6.27 chroot_make pulsar chroot_make pcmciautils chroot_make eciadsl-usermode Deleted: ipcop/trunk/src/patches/linux-2.6.25-leds-alix.patch =================================================================== --- ipcop/trunk/src/patches/linux-2.6.25-leds-alix.patch 2008-12-09 20:21:48 UTC (rev 2171) +++ ipcop/trunk/src/patches/linux-2.6.25-leds-alix.patch 2008-12-09 20:32:52 UTC (rev 2172) @@ -1,203 +0,0 @@ -diff -Nur linux-2.6.24.old/drivers/leds/Kconfig linux-2.6.24/drivers/leds/Kconfig ---- linux-2.6.24.old/drivers/leds/Kconfig 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/leds/Kconfig 2008-05-24 09:32:18.000000000 +0200 -@@ -81,6 +81,12 @@ - help - This option enables support for the PCEngines WRAP programmable LEDs. - -+config LEDS_ALIX -+ tristate "LED Support for the ALIX 2/3 boards" -+ depends on LEDS_CLASS -+ help -+ This option enables support for the three LEDs on the PCEngines ALIX 2/3 boards. -+ - config LEDS_H1940 - tristate "LED Support for iPAQ H1940 device" - depends on LEDS_CLASS && ARCH_H1940 -diff -Nur linux-2.6.24.old/drivers/leds/leds-alix.c linux-2.6.24/drivers/leds/leds-alix.c ---- linux-2.6.24.old/drivers/leds/leds-alix.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.24/drivers/leds/leds-alix.c 2008-05-24 09:32:18.000000000 +0200 -@@ -0,0 +1,172 @@ -+/* -+ * LEDs driver for PCEngines ALIX 2/3 series -+ * -+ * Copyright (C) 2007 Petr Liebman -+ * -+ * Based on leds-wrap.c -+ * -+ * 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/init.h> -+#include <linux/platform_device.h> -+#include <linux/leds.h> -+#include <linux/err.h> -+#include <asm/io.h> -+ -+#define DRVNAME "alix-led" -+ -+#define ALIX_LED1_PORT (0x6100) -+#define ALIX_LED1_ON (1<<22) -+#define ALIX_LED1_OFF (1<<6) -+ -+#define ALIX_LED2_PORT (0x6180) -+#define ALIX_LED2_ON (1<<25) -+#define ALIX_LED2_OFF (1<<9) -+ -+#define ALIX_LED3_PORT (0x6180) -+#define ALIX_LED3_ON (1<<27) -+#define ALIX_LED3_OFF (1<<11) -+ -+ -+static struct platform_device *pdev; -+ -+static void alix_led_set_1(struct led_classdev *led_cdev, -+ enum led_brightness value) -+{ -+ if (value) -+ outl(ALIX_LED1_ON, ALIX_LED1_PORT); -+ else -+ outl(ALIX_LED1_OFF, ALIX_LED1_PORT); -+} -+ -+static void alix_led_set_2(struct led_classdev *led_cdev, -+ enum led_brightness value) -+{ -+ if (value) -+ outl(ALIX_LED2_ON, ALIX_LED2_PORT); -+ else -+ outl(ALIX_LED2_OFF, ALIX_LED2_PORT); -+} -+ -+static void alix_led_set_3(struct led_classdev *led_cdev, -+ enum led_brightness value) -+{ -+ if (value) -+ outl(ALIX_LED3_ON, ALIX_LED3_PORT); -+ else -+ outl(ALIX_LED3_OFF, ALIX_LED3_PORT); -+} -+ -+static struct led_classdev alix_led_1 = { -+ .name = "alix:1", -+ .brightness_set = alix_led_set_1, -+}; -+ -+static struct led_classdev alix_led_2 = { -+ .name = "alix:2", -+ .brightness_set = alix_led_set_2, -+}; -+ -+static struct led_classdev alix_led_3 = { -+ .name = "alix:3", -+ .brightness_set = alix_led_set_3, -+}; -+ -+ -+#ifdef CONFIG_PM -+static int alix_led_suspend(struct platform_device *dev, -+ pm_message_t state) -+{ -+ led_classdev_suspend(&alix_led_1); -+ led_classdev_suspend(&alix_led_2); -+ led_classdev_suspend(&alix_led_3); -+ return 0; -+} -+ -+static int alix_led_resume(struct platform_device *dev) -+{ -+ led_classdev_resume(&alix_led_1); -+ led_classdev_resume(&alix_led_2); -+ led_classdev_resume(&alix_led_3); -+ return 0; -+} -+#else -+#define alix_led_suspend NULL -+#define alix_led_resume NULL -+#endif -+ -+static int alix_led_probe(struct platform_device *pdev) -+{ -+ int ret; -+ -+ ret = led_classdev_register(&pdev->dev, &alix_led_1); -+ if (ret >= 0) -+ { -+ ret = led_classdev_register(&pdev->dev, &alix_led_2); -+ if (ret >= 0) -+ { -+ ret = led_classdev_register(&pdev->dev, &alix_led_3); -+ if (ret < 0) -+ led_classdev_unregister(&alix_led_2); -+ } -+ if (ret < 0) -+ led_classdev_unregister(&alix_led_1); -+ } -+ return ret; -+} -+ -+static int alix_led_remove(struct platform_device *pdev) -+{ -+ led_classdev_unregister(&alix_led_1); -+ led_classdev_unregister(&alix_led_2); -+ led_classdev_unregister(&alix_led_3); -+ return 0; -+} -+ -+static struct platform_driver alix_led_driver = { -+ .probe = alix_led_probe, -+ .remove = alix_led_remove, -+ .suspend = alix_led_suspend, -+ .resume = alix_led_resume, -+ .driver = { -+ .name = DRVNAME, -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init alix_led_init(void) -+{ -+ int ret; -+ -+ ret = platform_driver_register(&alix_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(&alix_led_driver); -+ goto out; -+ } -+ -+out: -+ return ret; -+} -+ -+static void __exit alix_led_exit(void) -+{ -+ platform_device_unregister(pdev); -+ platform_driver_unregister(&alix_led_driver); -+} -+ -+module_init(alix_led_init); -+module_exit(alix_led_exit); -+ -+MODULE_AUTHOR("Petr Liebman"); -+MODULE_DESCRIPTION("PCEngines ALIX LED driver"); -+MODULE_LICENSE("GPL"); -+ -diff -Nur linux-2.6.24.old/drivers/leds/Makefile linux-2.6.24/drivers/leds/Makefile ---- linux-2.6.24.old/drivers/leds/Makefile 2008-01-24 23:58:37.000000000 +0100 -+++ linux-2.6.24/drivers/leds/Makefile 2008-05-24 08:34:40.000000000 +0200 -@@ -14,6 +14,7 @@ - obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o - obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o - obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o -+obj-$(CONFIG_LEDS_ALIX) += leds-alix.o - obj-$(CONFIG_LEDS_H1940) += leds-h1940.o - obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o - obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o Copied: ipcop/trunk/src/patches/linux-2.6.27-leds-alix.patch (from rev 2160, ipcop/trunk/src/patches/linux-2.6.25-leds-alix.patch) =================================================================== --- ipcop/trunk/src/patches/linux-2.6.27-leds-alix.patch (rev 0) +++ ipcop/trunk/src/patches/linux-2.6.27-leds-alix.patch 2008-12-09 20:32:52 UTC (rev 2172) @@ -0,0 +1,203 @@ +diff -Nur linux-2.6.24.old/drivers/leds/Kconfig linux-2.6.24/drivers/leds/Kconfig +--- linux-2.6.24.old/drivers/leds/Kconfig 2008-01-24 23:58:37.000000000 +0100 ++++ linux-2.6.24/drivers/leds/Kconfig 2008-05-24 09:32:18.000000000 +0200 +@@ -81,6 +81,12 @@ + help + This option enables support for the PCEngines WRAP programmable LEDs. + ++config LEDS_ALIX ++ tristate "LED Support for the ALIX 2/3 boards" ++ depends on LEDS_CLASS ++ help ++ This option enables support for the three LEDs on the PCEngines ALIX 2/3 boards. ++ + config LEDS_H1940 + tristate "LED Support for iPAQ H1940 device" + depends on LEDS_CLASS && ARCH_H1940 +diff -Nur linux-2.6.24.old/drivers/leds/leds-alix.c linux-2.6.24/drivers/leds/leds-alix.c +--- linux-2.6.24.old/drivers/leds/leds-alix.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.24/drivers/leds/leds-alix.c 2008-05-24 09:32:18.000000000 +0200 +@@ -0,0 +1,172 @@ ++/* ++ * LEDs driver for PCEngines ALIX 2/3 series ++ * ++ * Copyright (C) 2007 Petr Liebman ++ * ++ * Based on leds-wrap.c ++ * ++ * 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/init.h> ++#include <linux/platform_device.h> ++#include <linux/leds.h> ++#include <linux/err.h> ++#include <asm/io.h> ++ ++#define DRVNAME "alix-led" ++ ++#define ALIX_LED1_PORT (0x6100) ++#define ALIX_LED1_ON (1<<22) ++#define ALIX_LED1_OFF (1<<6) ++ ++#define ALIX_LED2_PORT (0x6180) ++#define ALIX_LED2_ON (1<<25) ++#define ALIX_LED2_OFF (1<<9) ++ ++#define ALIX_LED3_PORT (0x6180) ++#define ALIX_LED3_ON (1<<27) ++#define ALIX_LED3_OFF (1<<11) ++ ++ ++static struct platform_device *pdev; ++ ++static void alix_led_set_1(struct led_classdev *led_cdev, ++ enum led_brightness value) ++{ ++ if (value) ++ outl(ALIX_LED1_ON, ALIX_LED1_PORT); ++ else ++ outl(ALIX_LED1_OFF, ALIX_LED1_PORT); ++} ++ ++static void alix_led_set_2(struct led_classdev *led_cdev, ++ enum led_brightness value) ++{ ++ if (value) ++ outl(ALIX_LED2_ON, ALIX_LED2_PORT); ++ else ++ outl(ALIX_LED2_OFF, ALIX_LED2_PORT); ++} ++ ++static void alix_led_set_3(struct led_classdev *led_cdev, ++ enum led_brightness value) ++{ ++ if (value) ++ outl(ALIX_LED3_ON, ALIX_LED3_PORT); ++ else ++ outl(ALIX_LED3_OFF, ALIX_LED3_PORT); ++} ++ ++static struct led_classdev alix_led_1 = { ++ .name = "alix:1", ++ .brightness_set = alix_led_set_1, ++}; ++ ++static struct led_classdev alix_led_2 = { ++ .name = "alix:2", ++ .brightness_set = alix_led_set_2, ++}; ++ ++static struct led_classdev alix_led_3 = { ++ .name = "alix:3", ++ .brightness_set = alix_led_set_3, ++}; ++ ++ ++#ifdef CONFIG_PM ++static int alix_led_suspend(struct platform_device *dev, ++ pm_message_t state) ++{ ++ led_classdev_suspend(&alix_led_1); ++ led_classdev_suspend(&alix_led_2); ++ led_classdev_suspend(&alix_led_3); ++ return 0; ++} ++ ++static int alix_led_resume(struct platform_device *dev) ++{ ++ led_classdev_resume(&alix_led_1); ++ led_classdev_resume(&alix_led_2); ++ led_classdev_resume(&alix_led_3); ++ return 0; ++} ++#else ++#define alix_led_suspend NULL ++#define alix_led_resume NULL ++#endif ++ ++static int alix_led_probe(struct platform_device *pdev) ++{ ++ int ret; ++ ++ ret = led_classdev_register(&pdev->dev, &alix_led_1); ++ if (ret >= 0) ++ { ++ ret = led_classdev_register(&pdev->dev, &alix_led_2); ++ if (ret >= 0) ++ { ++ ret = led_classdev_register(&pdev->dev, &alix_led_3); ++ if (ret < 0) ++ led_classdev_unregister(&alix_led_2); ++ } ++ if (ret < 0) ++ led_classdev_unregister(&alix_led_1); ++ } ++ return ret; ++} ++ ++static int alix_led_remove(struct platform_device *pdev) ++{ ++ led_classdev_unregister(&alix_led_1); ++ led_classdev_unregister(&alix_led_2); ++ led_classdev_unregister(&alix_led_3); ++ return 0; ++} ++ ++static struct platform_driver alix_led_driver = { ++ .probe = alix_led_probe, ++ .remove = alix_led_remove, ++ .suspend = alix_led_suspend, ++ .resume = alix_led_resume, ++ .driver = { ++ .name = DRVNAME, ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init alix_led_init(void) ++{ ++ int ret; ++ ++ ret = platform_driver_register(&alix_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(&alix_led_driver); ++ goto out; ++ } ++ ++out: ++ return ret; ++} ++ ++static void __exit alix_led_exit(void) ++{ ++ platform_device_unregister(pdev); ++ platform_driver_unregister(&alix_led_driver); ++} ++ ++module_init(alix_led_init); ++module_exit(alix_led_exit); ++ ++MODULE_AUTHOR("Petr Liebman"); ++MODULE_DESCRIPTION("PCEngines ALIX LED driver"); ++MODULE_LICENSE("GPL"); ++ +diff -Nur linux-2.6.24.old/drivers/leds/Makefile linux-2.6.24/drivers/leds/Makefile +--- linux-2.6.24.old/drivers/leds/Makefile 2008-01-24 23:58:37.000000000 +0100 ++++ linux-2.6.24/drivers/leds/Makefile 2008-05-24 08:34:40.000000000 +0200 +@@ -14,6 +14,7 @@ + obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o + obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o + obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o ++obj-$(CONFIG_LEDS_ALIX) += leds-alix.o + obj-$(CONFIG_LEDS_H1940) += leds-h1940.o + obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o + obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |