aboutsummaryrefslogtreecommitdiffstats
path: root/packages/linux
diff options
context:
space:
mode:
authorFrederic Bompart <frederic@unknown.openembedded.org>2005-09-20 07:27:59 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-09-20 07:27:59 +0000
commit4d091ab7bcad9180be49ff4768602c05a2c6bfa7 (patch)
treedaa7a2c9d7df89e803dce51a58ab62b1e8dfca50 /packages/linux
parentdd088063c0542a8940f201b33ae6ce904198d9ea (diff)
parent656946b9536f23b212e6ef8111f0fbdbd2d7b446 (diff)
downloadopenembedded-4d091ab7bcad9180be49ff4768602c05a2c6bfa7.tar.gz
merge of 0f46196206904515c0939c84c80210e251c74960
and 5ec5f2c198db5c371a9cf2cada82144032025895
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux-wrt_2.4.30.bb8
-rw-r--r--packages/linux/nslu2-kernel/2.6.12/disk_led_blinking.patch127
-rw-r--r--packages/linux/nslu2-kernel_2.6.12.2.bb3
3 files changed, 133 insertions, 5 deletions
diff --git a/packages/linux/linux-wrt_2.4.30.bb b/packages/linux/linux-wrt_2.4.30.bb
index 444fb5b7ea..1676562a93 100644
--- a/packages/linux/linux-wrt_2.4.30.bb
+++ b/packages/linux/linux-wrt_2.4.30.bb
@@ -85,12 +85,12 @@ export CFLAGS_KERNEL="-fno-delayed-branch "
do_unpack_extra(){
# copy kernel source which is maintained in openwrt via cvs
- cp -a ${WORKDIR}/kernel-source/* ${S}
+ cp -pPR ${WORKDIR}/kernel-source/* ${S}
# copy binary wlan driver
- cp -a ${WORKDIR}/wl/*.o ${S}/drivers/net/wl
+ cp -pPR ${WORKDIR}/wl/*.o ${S}/drivers/net/wl
# copy proprietary et source
- cp -a ${WORKDIR}/et/* ${S}/drivers/net/et
- cp -a ${WORKDIR}/et/*.h ${S}/include/
+ cp -pPR ${WORKDIR}/et/* ${S}/drivers/net/et
+ cp -pPR ${WORKDIR}/et/*.h ${S}/include/
}
addtask unpack_extra after do_unpack before do_patch
diff --git a/packages/linux/nslu2-kernel/2.6.12/disk_led_blinking.patch b/packages/linux/nslu2-kernel/2.6.12/disk_led_blinking.patch
new file mode 100644
index 0000000000..7487cf3ee8
--- /dev/null
+++ b/packages/linux/nslu2-kernel/2.6.12/disk_led_blinking.patch
@@ -0,0 +1,127 @@
+--- linux-2.6.12.2/drivers/usb/core/hub.c.bak 2005-09-19 20:29:14.000000000 +0000
++++ linux-2.6.12.2/drivers/usb/core/hub.c 2005-09-19 20:30:44.000000000 +0000
+@@ -1026,6 +1026,19 @@
+
+ dev_info (&udev->dev, "USB disconnect, address %d\n", udev->devnum);
+
++ // --- Forward-Ported Linksys Disk 1 & Disk 2 LED Control (Port done 16.Sept.05 by Philipp Kirchhofer) ---
++ // Copy & paste from nslu2-io.c
++ #define DISK1_OFF 0x00000008 //0b0000 0000 0000 1000
++ #define DISK2_OFF 0x00000004 //0b0000 0000 0000 0100
++ // Copy & Paste end
++
++ if (*udev->devpath == 0x31) {
++ *IXP4XX_GPIO_GPOUTR |= DISK1_OFF;
++ } else if (*udev->devpath == 0x32) {
++ *IXP4XX_GPIO_GPOUTR |= DISK2_OFF;
++ }
++ // --- End LED Control ---
++
+ /* Free up all the children before we remove this device */
+ for (i = 0; i < USB_MAXCHILDREN; i++) {
+ if (udev->children[i])
+@@ -2175,6 +2188,19 @@
+ udev->bus->controller->driver->name,
+ udev->devnum);
+
++ // --- Start LED Control ---
++ // Copy & paste from nslu2-io.c
++ #define DISK1_ON 0xfffffff7 //0b1111 1111 1111 0111
++ #define DISK2_ON 0xfffffffb //0b1111 1111 1111 1011
++ // Copy & Paste end
++
++ if (*udev->devpath == 0x31) {
++ *IXP4XX_GPIO_GPOUTR &= DISK1_ON;
++ } else if (*udev->devpath == 0x32) {
++ *IXP4XX_GPIO_GPOUTR &= DISK2_ON;
++ }
++ // --- End LED Control ---
++
+ /* Set up TT records, if needed */
+ if (hdev->tt) {
+ udev->tt = hdev->tt;
+--- linux-2.6.12.2/drivers/usb/storage/transport.c.bak 2005-09-19 20:29:25.000000000 +0000
++++ linux-2.6.12.2/drivers/usb/storage/transport.c 2005-09-19 20:29:55.000000000 +0000
+@@ -60,6 +60,60 @@
+ #include "scsiglue.h"
+ #include "debug.h"
+
++// --- Forward-Ported Linksys Disk 1 & Disk 2 LED Activity Blinking Part 1 (Port done 16.Sept.05 by Philipp Kirchhofer) ---
++// Copy & Paste from nslu2-io.c
++#define DISK1_ON 0xfffffff7 //0b1111 1111 1111 0111
++#define DISK2_ON 0xfffffffb //0b1111 1111 1111 1011
++
++#define DISK1_OFF 0x00000008 //0b0000 0000 0000 1000
++#define DISK2_OFF 0x00000004 //0b0000 0000 0000 0100
++// Copy & Paste End
++
++#define JIFFIES_BLINKING_TIME 6
++#define ON_LED_INTERVAL 3
++unsigned long turn_on_time;
++
++static struct timer_list usb1_led_timer; /* ide led switch */
++static struct timer_list usb2_led_timer; /* ide led switch */
++
++// Turns on Disk 1 LED
++static void turn_on_led_usb1(unsigned long ptr) {
++ *IXP4XX_GPIO_GPOUTR &= DISK1_ON; // 0xfff7
++ return;
++}
++
++// Turns on Disk 2 LED
++static void turn_on_led_usb2(unsigned long ptr) {
++ *IXP4XX_GPIO_GPOUTR &= DISK2_ON; // 0xfffb
++ return;
++}
++
++// Turns on Disk 1 LED after ON_LED_INTERVAL jiffies
++static void usb_1_led_timer(void) {
++ usb1_led_timer.expires = jiffies + ON_LED_INTERVAL;
++ add_timer(&usb1_led_timer);
++ return;
++}
++
++// Turns on Disk 2 LED after ON_LED_INTERVAL jiffies
++static void usb_2_led_timer(void) {
++ usb2_led_timer.expires = jiffies + ON_LED_INTERVAL;
++ add_timer(&usb2_led_timer);
++ return;
++}
++
++// Initializes Timers
++unsigned long initialized_timers = 0;
++static void initializeTimers() {
++ if (initialized_timers != 1) {
++ init_timer(&usb1_led_timer);
++ usb1_led_timer.function = turn_on_led_usb1;
++ init_timer(&usb2_led_timer);
++ usb2_led_timer.function = turn_on_led_usb2;
++ initialized_timers = 1;
++ }
++}
++// --- End Disk LED Activity Blinking Part 1 ---
+
+ /***********************************************************************
+ * Data transfer routines
+@@ -499,6 +553,21 @@
+
+ /* are we scatter-gathering? */
+ if (use_sg) {
++ // --- Disk LED Activity Blinking Part 2 ---
++ initializeTimers();
++ if ((jiffies - turn_on_time) >= JIFFIES_BLINKING_TIME) {
++ if (*us->pusb_dev->devpath == 0x31) {
++ del_timer_sync(&usb1_led_timer);
++ *IXP4XX_GPIO_GPOUTR |= DISK1_OFF;
++ usb_1_led_timer();
++ } else if (*us->pusb_dev->devpath == 0x32) {
++ del_timer_sync(&usb2_led_timer);
++ *IXP4XX_GPIO_GPOUTR |= DISK2_OFF;
++ usb_2_led_timer();
++ }
++ turn_on_time = jiffies;
++ }
++ // --- End Disk LED Activity Blinking Part 2 ---
+ /* use the usb core scatter-gather primitives */
+ result = usb_stor_bulk_transfer_sglist(us, pipe,
+ (struct scatterlist *) buf, use_sg,
diff --git a/packages/linux/nslu2-kernel_2.6.12.2.bb b/packages/linux/nslu2-kernel_2.6.12.2.bb
index 41f35d77ea..6f0f400028 100644
--- a/packages/linux/nslu2-kernel_2.6.12.2.bb
+++ b/packages/linux/nslu2-kernel_2.6.12.2.bb
@@ -1,5 +1,5 @@
# Kernel for NSLU2
-PR = "r15"
+PR = "r16"
include nslu2-kernel.inc
# N2K_EXTRA_PATCHES - list of patches to apply (can include
@@ -24,4 +24,5 @@ N2K_PATCHES = "\
file://missing-exports.patch;patch=1 \
file://timer.patch;patch=1 \
file://nslu2-io_rpbutton.patch;patch=1 \
+ file://disk_led_blinking.patch;patch=1 \
"