[oe-commits] org.oe.dev linux kernels: updated kernels plus patches for nylon/mtx

MartinDietze commit openembedded-commits at lists.openembedded.org
Fri Sep 8 12:46:55 UTC 2006


linux kernels: updated kernels plus patches for nylon/mtx
* linux-mtx-1-2.4.27: the standard kernel used for the 4G access cube
* linux-mtx-1u-2.4.27: the customized kernel for the 4G Surfbox I
* linux-mtx-2-2.4.27: the customized kernel for the 4G Surfbox II

Author: MartinDietze at openembedded.org
Branch: org.openembedded.dev
Revision: 9faa5f9bca0726d8c098e3f9aa7f0b947799029b
ViewMTN: http://monotone.openembedded.org/revision.psp?id=9faa5f9bca0726d8c098e3f9aa7f0b947799029b
Files:
1
packages/linux/linux-mtx-1-2.4.27/15-au1000-pci-fixup-non-coherent-pre-ac.diff
packages/linux/linux-mtx-2-2.4.27
packages/linux/linux-mtx-1-2.4.27/22-umts.diff
packages/linux/linux-mtx-1-2.4.27/28-idsel-cardbus.diff
packages/linux/linux-mtx-1-2.4.27/30-mtx-1-sysled.diff
packages/linux/linux-mtx-1-2.4.27/31-mtx-1u-led-init.diff
packages/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff
packages/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff
packages/linux/linux-mtx-1-2.4.27/39-mppe-mpc.patch
packages/linux/linux-mtx-1-2.4.27/40-option-hsdpa.patch
packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch
packages/linux/linux-mtx-1u_2.4.27.bb
packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
packages/linux/linux-mtx-2-2.4.27/01-mtd-mtx-2.diff
packages/linux/linux-mtx-2-2.4.27/03-mtd-erase-compiler-bug.diff
packages/linux/linux-mtx-2-2.4.27/04-mtd-yamonenv-readwrite.diff
packages/linux/linux-mtx-2-2.4.27/05-mtx-2-pci-irq.diff
packages/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch
packages/linux/linux-mtx-2-2.4.27/07-zboot-zimage-flash-bin.diff
packages/linux/linux-mtx-2-2.4.27/08-usb-nonpci-2.4.24.patch
packages/linux/linux-mtx-2-2.4.27/10-iw-max-spy-32.diff
packages/linux/linux-mtx-2-2.4.27/11-mtd-proc-partition-rw.diff
packages/linux/linux-mtx-2-2.4.27/12-openswan-2.2.0-nat-t.diff
packages/linux/linux-mtx-2-2.4.27/13-openswan-2.2.0.patch
packages/linux/linux-mtx-2-2.4.27/16-i2c.patch
packages/linux/linux-mtx-2-2.4.27/17-lmsensors.2.8.8.patch
packages/linux/linux-mtx-2-2.4.27/18-i2c-au1x00gpio.patch
packages/linux/linux-mtx-2-2.4.27/19-kernel-make-depend.diff
packages/linux/linux-mtx-2-2.4.27/22-umts.diff
packages/linux/linux-mtx-2-2.4.27/27-idsel-cardbus.diff
packages/linux/linux-mtx-2-2.4.27/28-surfbox2-idsel.diff
packages/linux/linux-mtx-2-2.4.27/29-au1000-pci-config-clear-errors.diff
packages/linux/linux-mtx-2-2.4.27/32-usbserial-stalled-hack.diff
packages/linux/linux-mtx-2-2.4.27/33-usbserial-bulk_in_size-4096.diff
packages/linux/linux-mtx-2-2.4.27/35-sb2-slic.patch
packages/linux/linux-mtx-2-2.4.27/36-sb2-lcd.patch
packages/linux/linux-mtx-2-2.4.27/37-sb2-sysbtn.patch
packages/linux/linux-mtx-2-2.4.27/39-mppe-mpc.patch
packages/linux/linux-mtx-2-2.4.27/40-option-hsdpa.patch
packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch
packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff
packages/linux/linux-mtx-2-2.4.27/44-dbdma-and-au1550_psc.diff
packages/linux/linux-mtx-2-2.4.27/45-acm-tty.patch
packages/linux/linux-mtx-2-2.4.27/defconfig-mtx-2
packages/linux/linux-mtx-2_2.4.27.bb
packages/linux/linux-mtx-1-2.4.27/defconfig-mtx-1
packages/linux/linux-mtx-1_2.4.27.bb
Diffs:

#
# mt diff -r53ac04f0525942efd10a525ff7cef88e45d66771 -r9faa5f9bca0726d8c098e3f9aa7f0b947799029b
#
# 
# 
# delete "packages/linux/linux-mtx-1-2.4.27/15-au1000-pci-fixup-non-coherent-pre-ac.diff"
# 
# add_dir "packages/linux/linux-mtx-2-2.4.27"
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/22-umts.diff"
#  content [ef216bc1c92358f3d1dea369337ab8d8d9ba3c5d]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/28-idsel-cardbus.diff"
#  content [f1e5c72f87f75931ee68a873515cbfacdee18ffb]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/30-mtx-1-sysled.diff"
#  content [a19434a26c3a8ff62a7ce4fb1f879c9beee5234f]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/31-mtx-1u-led-init.diff"
#  content [a206a80ec4df20f83674132cd11b1e148fd3db97]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff"
#  content [599c0aff0b605e33badd63caa06ec9136b57f2db]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff"
#  content [501f7dbb494df92b674246b035f7734cffc1d589]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/39-mppe-mpc.patch"
#  content [e1f8f956b568b3a038f9c6f8c46daaa59093b358]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/40-option-hsdpa.patch"
#  content [9417be9cf2a7acc59159e2c5e2aaf0084e731380]
# 
# add_file "packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch"
#  content [aa81da866e8a656338a98d83a4efa7eea5247a14]
# 
# add_file "packages/linux/linux-mtx-1u_2.4.27.bb"
#  content [e018240d451be23defeb68ea4e0cd80be22cd0ad]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff"
#  content [0a77d80a7cdf060af5eef77845396ae4d296c512]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/01-mtd-mtx-2.diff"
#  content [109ba65172f5ca2d4e9f4090de44e2f808508cd1]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/03-mtd-erase-compiler-bug.diff"
#  content [92d83eec6389f84274f6589935e1d247ad711095]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/04-mtd-yamonenv-readwrite.diff"
#  content [ad9c2f4d0c3730b678138f92252b94fdeb9ab416]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/05-mtx-2-pci-irq.diff"
#  content [eb856bbe7eb0b3328071f9bb3a7c7f4dc8cbf8d1]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch"
#  content [10ad24a5f2473e5cce3edf641fb7b508dbc2927f]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/07-zboot-zimage-flash-bin.diff"
#  content [6781186be384721ac03627790c27417ef77f4174]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/08-usb-nonpci-2.4.24.patch"
#  content [f9e84ec3a590b3ef65f4d6a7486a50bc899c3ea9]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/10-iw-max-spy-32.diff"
#  content [7416973811a7ea0a420dfa43cc1dcc25d104b530]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/11-mtd-proc-partition-rw.diff"
#  content [56d7594dc2927c6b8ef540d43fab63ddd1b564dd]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/12-openswan-2.2.0-nat-t.diff"
#  content [576a5480ee48d4602471b1cf6c8972487e7f05f6]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/13-openswan-2.2.0.patch"
#  content [c1f634a2e1237e92241038cbcfb11835d05b0032]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/16-i2c.patch"
#  content [5f970c74ccedd0e53b13eace5d21a241c6a7bd79]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/17-lmsensors.2.8.8.patch"
#  content [1e3d606c28e0bef10c94e2af2b796f3abb5440b8]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/18-i2c-au1x00gpio.patch"
#  content [08c545aa54f73f85dbb93aa3e7b77bce7e28051b]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/19-kernel-make-depend.diff"
#  content [1afa460ef44f7e280aadf4e81188b582b9956918]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/22-umts.diff"
#  content [23079d6dabf6ef6f38564845db6ce8f5f8d0e097]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/27-idsel-cardbus.diff"
#  content [77a86a3f2f8bb1bc74c9c9517dabe762795f39c3]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/28-surfbox2-idsel.diff"
#  content [384d2928e8e77c791660bcd64be832f1ed1a92af]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/29-au1000-pci-config-clear-errors.diff"
#  content [7aec88ab902b69f41934eb65b57ed203261ac308]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/32-usbserial-stalled-hack.diff"
#  content [25157b348edfc516d14103be71d03d133df31dae]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/33-usbserial-bulk_in_size-4096.diff"
#  content [501f7dbb494df92b674246b035f7734cffc1d589]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/35-sb2-slic.patch"
#  content [06bd98548392c90577bc384eccae1d1e2b7560a9]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/36-sb2-lcd.patch"
#  content [df236f67d6b4a0ccbed7c5b02ffdd63ec246c0a5]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/37-sb2-sysbtn.patch"
#  content [33f09d98fc96c46af9b4e8ba39d3b1516e589f68]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/39-mppe-mpc.patch"
#  content [e1f8f956b568b3a038f9c6f8c46daaa59093b358]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/40-option-hsdpa.patch"
#  content [9417be9cf2a7acc59159e2c5e2aaf0084e731380]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch"
#  content [aa81da866e8a656338a98d83a4efa7eea5247a14]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/43-usbserial-27-32-backport.diff"
#  content [6c79431dc8a81f20903e14c2cbe5917ca3264aff]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/44-dbdma-and-au1550_psc.diff"
#  content [34f8facfb584cbf0c61957b05bb2bce9d1a3a6b8]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/45-acm-tty.patch"
#  content [87a3136009c4eadb9fefdeb72b9a0b752da78101]
# 
# add_file "packages/linux/linux-mtx-2-2.4.27/defconfig-mtx-2"
#  content [c6c86b0c4e731eae020e2773223b002bd308b567]
# 
# add_file "packages/linux/linux-mtx-2_2.4.27.bb"
#  content [15a16e92369b5ac0b75fc07dd06bc721cf84530c]
# 
# patch "packages/linux/linux-mtx-1-2.4.27/defconfig-mtx-1"
#  from [bc091442caa9952b953f1698611427622dd732d8]
#    to [006b28cbc4061cb39cad6b124489cbd180c02c86]
# 
# patch "packages/linux/linux-mtx-1_2.4.27.bb"
#  from [a4254b7971205c1937c06fa05848d2b8c3394939]
#    to [022bf21bd5b29c0b3a874d215ae854d6ab087b3a]
# 
============================================================
--- packages/linux/linux-mtx-1-2.4.27/22-umts.diff	ef216bc1c92358f3d1dea369337ab8d8d9ba3c5d
+++ packages/linux/linux-mtx-1-2.4.27/22-umts.diff	ef216bc1c92358f3d1dea369337ab8d8d9ba3c5d
@@ -0,0 +1,28 @@
+diff -Nurb linux-2.4.27-mtx1/drivers/usb/serial/usbserial.c linux-2.4.27-mtx1-umts/drivers/usb/serial/usbserial.c
+--- linux-2.4.27-mtx1/drivers/usb/serial/usbserial.c	2004-08-14 20:38:57.000000000 +0200
++++ linux-2.4.27-mtx1-umts/drivers/usb/serial/usbserial.c	2005-06-07 10:53:03.000000000 +0200
+@@ -332,7 +332,7 @@
+ static __u16	vendor	= 0x05f9;
+ static __u16	product	= 0xffff;
+ 
+-static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
++static struct usb_device_id generic_device_ids[5]; /* Initially all zeroes. */
+ 
+ /* All of the device info needed for the Generic Serial Converter */
+ static struct usb_serial_device_type generic_device = {
+@@ -1773,6 +1773,15 @@
+ 	generic_device_ids[0].idVendor = vendor;
+ 	generic_device_ids[0].idProduct = product;
+ 	generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
++	generic_device_ids[1].idVendor = 0xaf0;
++	generic_device_ids[1].idProduct = 0x5000;
++	generic_device_ids[1].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
++	generic_device_ids[2].idVendor = 0xaf0;
++	generic_device_ids[2].idProduct = 0x6000;
++	generic_device_ids[2].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
++	generic_device_ids[3].idVendor = 0xaf0;
++	generic_device_ids[3].idProduct = 0x6300;
++	generic_device_ids[3].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
+ 	/* register our generic driver with ourselves */
+ 	usb_serial_register (&generic_device);
+ #endif
============================================================
--- packages/linux/linux-mtx-1-2.4.27/28-idsel-cardbus.diff	f1e5c72f87f75931ee68a873515cbfacdee18ffb
+++ packages/linux/linux-mtx-1-2.4.27/28-idsel-cardbus.diff	f1e5c72f87f75931ee68a873515cbfacdee18ffb
@@ -0,0 +1,67 @@
+diff -Nurb linux/arch/mips/au1000/mtx-1/board_setup.c /home/br1/linux-idsel/arch/mips/au1000/mtx-1/board_setup.c
+--- linux/arch/mips/au1000/mtx-1/board_setup.c	2005-08-18 18:23:59.000000000 +0200
++++ /home/br1/linux-idsel/arch/mips/au1000/mtx-1/board_setup.c	2005-08-18 18:19:48.000000000 +0200
+@@ -48,6 +48,10 @@
+ 
+ extern struct rtc_ops no_rtc_ops;
+ 
++extern int (*board_pci_idsel)(unsigned int devsel, int assert);
++int	mtx1_pci_idsel(unsigned int devsel, int assert);
++
++
+ void board_reset (void)
+ {
+ 	/* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
+@@ -85,11 +89,39 @@
+ 	au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
+ 	au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
+ 	au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
++	au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
+ 	au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF
+ 
+ 	// enable LED and set it to green
+ 	au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
+ 	au_writel( 0x18000800, GPIO2_OUTPUT );
+ 
++	board_pci_idsel = mtx1_pci_idsel;
++
+ 	printk("4G Systems MTX-1 Board\n");
+ }
++
++
++/* 
++ */
++int
++mtx1_pci_idsel(unsigned int devsel, int assert)
++{
++#define MTX_IDSEL_ONLY_0_AND_3 0
++#if MTX_IDSEL_ONLY_0_AND_3
++	if (devsel != 0 && devsel != 3) {
++		printk("*** not 0 or 3\n");
++		return 0;
++	}
++#endif
++
++	if (assert && devsel != 0) {
++		// supress signal to cardbus
++		au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF
++	}
++	else {
++		au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
++	}
++	au_sync_udelay(1);
++	return 1;
++}
+diff -Nurb linux/arch/mips/au1000/mtx-1/irqmap.c /home/br1/linux-idsel/arch/mips/au1000/mtx-1/irqmap.c
+--- linux/arch/mips/au1000/mtx-1/irqmap.c	2005-08-18 18:24:05.000000000 +0200
++++ /home/br1/linux-idsel/arch/mips/au1000/mtx-1/irqmap.c	2005-08-16 16:37:39.000000000 +0200
+@@ -73,7 +73,7 @@
+ 	 *	A       B       C       D
+ 	 */
+ 	{
+-		{INTA, INTB, INTX, INTX},   /* IDSEL 0 */
++		{INTA, INTA, INTX, INTX},   /* IDSEL 0 */
+ 		{INTB, INTA, INTX, INTX},   /* IDSEL 1 */
+ 		{INTC, INTD, INTX, INTX},   /* IDSEL 2 */
+ 		{INTD, INTC, INTX, INTX},   /* IDSEL 3 */
+
============================================================
--- packages/linux/linux-mtx-1-2.4.27/30-mtx-1-sysled.diff	a19434a26c3a8ff62a7ce4fb1f879c9beee5234f
+++ packages/linux/linux-mtx-1-2.4.27/30-mtx-1-sysled.diff	a19434a26c3a8ff62a7ce4fb1f879c9beee5234f
@@ -0,0 +1,446 @@
+--- /dev/null	1970-01-01 01:00:00.000000000 +0100
++++ linux/arch/mips/au1000/mtx-1/mtx-1_sysled.c	2005-08-27 15:30:51.000000000 +0200
+@@ -0,0 +1,398 @@
++/*
++ *      Driver for the MTX-1 System LEDs.
++ *
++ *      (c) Copyright 2005 4G Systems <info at 4g-systems.biz>, All Rights Reserved.
++ *                              http://www.4g-systems.biz
++ *
++ *      This program is free software; you can redistribute it and/or
++ *      modify it under the terms of the GNU General Public License
++ *      as published by the Free Software Foundation; either version
++ *      2 of the License, or (at your option) any later version.
++ *
++ *      Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
++ *      warranty for any of this software. This material is provided
++ *      "AS-IS" and at no charge.
++ *
++ *      (c) Copyright 2005    4G Systems <info at 4g-systems.biz>
++ *
++ *      Release 0.01.
++ *
++ *      Author: Michael Stickel  michael.stickel at 4g-systems.biz
++ *
++ *
++ *      After the module is loaded there will be a device /dev/misc/leds
++ *      that can be written to. There are two bits, each represents one LED
++ *
++ *
++ */
++
++static int errno;
++#define __KERNEL_SYSCALLS__
++
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/miscdevice.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/smp_lock.h>
++#include <asm/unistd.h>
++
++#include <asm/uaccess.h>
++
++#include <asm/au1000.h>
++
++#include <asm/io.h>
++
++
++#include "mtx-1_sysled.h"
++
++
++#ifndef FALSE
++# define FALSE (0)
++#endif
++
++#ifndef TRUE
++# define TRUE (!FALSE)
++#endif
++
++
++/* handle up_and_exit confusion */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,9)
++typedef struct semaphore            THREAD_SEM;
++#define THREAD_SEM_EXIT(c,l)        up_and_exit(c,l)
++#define THREAD_SEM_DECLARE(c)       DECLARE_MUTEX_LOCKED(c)
++#define THREAD_SEM_INIT(c)          init_MUTEX_LOCKED(c)
++#define THREAD_SEM_WAIT_COMPLETE(c) {down(c);up(c);}
++
++#else
++#include <linux/completion.h>
++typedef struct completion           THREAD_SEM;
++#define THREAD_SEM_EXIT(c,l)        complete_and_exit(c,l)
++#define THREAD_SEM_DECLARE(c)       DECLARE_COMPLETION(c)
++#define THREAD_SEM_INIT(c)          init_completion(c)
++#define THREAD_SEM_WAIT_COMPLETE(c) wait_for_completion(c)
++#endif
++
++
++//---------[ Hardware Functions ]-----------------
++
++
++
++static unsigned char sysled_gpios[10] =
++{
++  211,  // Power  = GPIO211
++  212,  // Status = GPIO212
++
++#if 1
++  12,   // LEDBar1 Blue = GPIO12 0
++  13,   // LEDBar1 Red  = GPIO13
++
++  26,   // LEDBar3 Blue = GPIO27 1
++  27,   // LEDBar3 Red  = GPIO26
++
++  10,   // LEDBar0 Blue = GPIO10 2
++  11,   // LEDBar0 Red  = GPIO11
++
++  14,   // LEDBar2 Blue = GPIO14 3
++  25,   // LEDBar2 Red  = GPIO28
++#else
++   7,    // IOCTRL0
++   8,    // IOCTRL1
++
++   15,   // IOCTRL2
++  205,   // IOCTRL3
++
++  206,   // IOCTRL4
++  208,   // LEDBar2 Blue = GPIO14
++
++  255,
++  255
++#endif
++};
++static int num_sysled_gpios = sizeof(sysled_gpios) / sizeof(sysled_gpios[0]);
++
++
++static void mtx1_setled (int ledno, char on)
++{
++  if (ledno >= 0 && ledno < num_sysled_gpios)
++    {
++      if (sysled_gpios[ledno] >= 200 && sysled_gpios[ledno] < 231)
++	{
++	  unsigned long pinmask = 1 << (sysled_gpios[ledno] - 200);
++	  au_writel((pinmask<<16) | (on ? pinmask : 0), GPIO2_OUTPUT);
++	}
++      else if (sysled_gpios[ledno] < 32)
++	{
++	  unsigned long pinmask = 1 << sysled_gpios[ledno];
++	  if (on)
++	    au_writel(pinmask, SYS_OUTPUTSET);
++	  else
++	    au_writel(pinmask, SYS_OUTPUTCLR);
++	}
++    }
++}
++
++
++//---------[ LED Precalculation ]-----------------
++
++typedef struct current_led_config_s
++{
++	unsigned char  period;
++	unsigned long  pattern[8]; /* bit-pattern: up to 3.2*8 seconds. 25.6 seconds at 10 Hz */
++	short          current_value;
++	unsigned char  led_state; /* 0 = off, 1 = on */
++} current_led_config_t;
++
++static current_led_config_t current_led_config[10];
++static THREAD_SEM           mtx1_ledthread_exited;
++static int                  mtx1_ledthread_pid;
++
++static int mtx1_led_thread (void *user_data)
++{
++	int last_jiffies = jiffies - HZ/10; /* initialize with meaningfull value */
++
++	lock_kernel();
++
++	daemonize ();
++	spin_lock_irq (&current->sigmask_lock);
++	sigemptyset (&current->blocked);
++	recalc_sigpending (current);
++	spin_unlock_irq (&current->sigmask_lock);
++
++	strncpy (current->comm, "mtx1led", sizeof(current->comm) - 1);
++	current->comm[sizeof(current->comm) - 1] = '\0';
++
++	do {
++		int i;
++
++		// missed_values = (jiffies - last_jiffies) / (HZ/10);
++		last_jiffies = jiffies;
++
++		// 1/10 second later.
++		for (i=0; i < num_sysled_gpios; i++)
++		{
++			int  index = current_led_config[i].current_value;
++			if (current_led_config[i].period > 0 && index < 256)
++			{
++				char led_on = (current_led_config[i].pattern[(index>>5)&7] >> (index&0x1f)) & 1;
++
++				if (led_on != current_led_config[i].led_state)
++					mtx1_setled (i, led_on);
++				current_led_config[i].led_state = led_on;
++
++				current_led_config[i].current_value++;
++				if (current_led_config[i].current_value > current_led_config[i].period)
++					current_led_config[i].current_value = 0;
++			}
++		}
++
++		current->state = TASK_INTERRUPTIBLE;
++        /* long timeout = */ schedule_timeout(HZ / 10);
++	} while (!signal_pending(current));
++
++  THREAD_SEM_EXIT (&mtx1_ledthread_exited, 0);
++  return 0;
++}
++
++
++static int mtx1_start_ledthread (void)
++{
++	THREAD_SEM_INIT (&mtx1_ledthread_exited);
++
++	printk ("starting mtx1 ledthread\n");
++	mtx1_ledthread_pid = kernel_thread(mtx1_led_thread,
++									   NULL,
++									 %s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list