mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-28 11:50:38 +02:00
17c7b6c3fd
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
84 lines
2.2 KiB
Diff
84 lines
2.2 KiB
Diff
--- linux-2.6.19.2.orig/drivers/serial/crisv10.c 2007-05-26 18:12:33.000000000 +0200
|
|
+++ linux-2.6.19.2/drivers/serial/crisv10.c 2007-05-26 19:24:56.000000000 +0200
|
|
@@ -442,6 +442,7 @@
|
|
#include <asm/uaccess.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/mutex.h>
|
|
+#include <linux/miscdevice.h>
|
|
|
|
#include <asm/io.h>
|
|
#include <asm/irq.h>
|
|
@@ -4822,6 +4823,12 @@
|
|
.tiocmset = rs_tiocmset
|
|
};
|
|
|
|
+#define CONFIG_ETRAX_SYSFS_NODES
|
|
+#ifdef CONFIG_ETRAX_SYSFS_NODES
|
|
+static struct class *mem_class;
|
|
+#endif
|
|
+
|
|
+static struct class *rs_class;
|
|
static int __init
|
|
rs_init(void)
|
|
{
|
|
@@ -4948,6 +4955,30 @@
|
|
#endif
|
|
#endif /* CONFIG_SVINTO_SIM */
|
|
|
|
+#ifdef CONFIG_ETRAX_SYSFS_NODES
|
|
+
|
|
+ rs_class = class_create(THIS_MODULE, "rs_tty");
|
|
+#ifdef CONFIG_ETRAX_SERIAL_PORT0
|
|
+ class_device_create(rs_class, NULL,
|
|
+ MKDEV(TTY_MAJOR, 64),
|
|
+ NULL, "ttyS0");
|
|
+#endif
|
|
+#ifdef CONFIG_ETRAX_SERIAL_PORT1
|
|
+ class_device_create(rs_class, NULL,
|
|
+ MKDEV(TTY_MAJOR, 65),
|
|
+ NULL, "ttyS1");
|
|
+#endif
|
|
+#ifdef CONFIG_ETRAX_SERIAL_PORT2
|
|
+ class_device_create(rs_class, NULL,
|
|
+ MKDEV(TTY_MAJOR, 66),
|
|
+ NULL, "ttyS2");
|
|
+#endif
|
|
+#ifdef CONFIG_ETRAX_SERIAL_PORT3
|
|
+ class_device_create(rs_class, NULL,
|
|
+ MKDEV(TTY_MAJOR, 67),
|
|
+ NULL, "ttyS3");
|
|
+#endif
|
|
+#endif
|
|
return 0;
|
|
}
|
|
|
|
--- linux-2.6.19.2.orig/arch/cris/arch-v10/drivers/Kconfig 2007-05-26 18:12:22.000000000 +0200
|
|
+++ linux-2.6.19.2/arch/cris/arch-v10/drivers/Kconfig 2007-05-26 19:26:06.000000000 +0200
|
|
@@ -900,3 +900,9 @@
|
|
1 = 2kohm, 2 = 4kohm, 3 = 4kohm
|
|
4 = 1 diode, 8 = 2 diodes
|
|
Allowed values are (increasing current): 0, 11, 10, 9, 7, 6, 5
|
|
+
|
|
+config ETRAX_SYSFS_NODES
|
|
+ bool "Create device nodes using sysfs for builtin devices"
|
|
+ default n
|
|
+ help
|
|
+ Creates device nodes inside the rootfs dynamically for all the builtin devices
|
|
--- linux-2.6.19.2.orig/drivers/serial/crisv10.c 2007-05-28 20:37:56.000000000 +0200
|
|
+++ linux-2.6.19.2/drivers/serial/crisv10.c 2007-05-28 20:39:07.000000000 +0200
|
|
@@ -4823,12 +4823,11 @@
|
|
.tiocmset = rs_tiocmset
|
|
};
|
|
|
|
-#define CONFIG_ETRAX_SYSFS_NODES
|
|
#ifdef CONFIG_ETRAX_SYSFS_NODES
|
|
-static struct class *mem_class;
|
|
+static struct class *rs_class;
|
|
#endif
|
|
|
|
-static struct class *rs_class;
|
|
+
|
|
static int __init
|
|
rs_init(void)
|
|
{
|