summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-03-29 14:41:34 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-03-29 14:41:34 +0000
commit27c1c1ba6614531c676d84f5f5cd0aeeb3031eaa (patch)
treed02025494ecc66c61ae6e075f5c712edffde78a0
parent61b67f62993f35584f36b413cb271e0947d84a36 (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/03/29 16:09:43+02:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/03/29 16:09:27+02:00 uni-frankfurt.de!mickeyl wlan-ng: fix S 2005/03/29 14:03:30+02:00 mn-solutions.de!schurig add serial_cs & bluez to MNCI "Ramses" kernel BKrev: 4249691eWc46O2knhl17RCokRw2zRw
-rw-r--r--packages/linux/mnci-ramses-2.4.21-rmk2-pxa1/mnci-combined.patch1086
-rw-r--r--packages/linux/mnci-ramses_2.4.21-rmk2-pxa1.bb2
-rw-r--r--packages/wlan-ng/wlan-ng-modules_0.2.1-pre23.bb79
3 files changed, 553 insertions, 614 deletions
diff --git a/packages/linux/mnci-ramses-2.4.21-rmk2-pxa1/mnci-combined.patch b/packages/linux/mnci-ramses-2.4.21-rmk2-pxa1/mnci-combined.patch
index 8299c9d3dc..2f80d090a2 100644
--- a/packages/linux/mnci-ramses-2.4.21-rmk2-pxa1/mnci-combined.patch
+++ b/packages/linux/mnci-ramses-2.4.21-rmk2-pxa1/mnci-combined.patch
@@ -1783,7 +1783,7 @@
--- /dev/null
+++ linux-2.4.21/arch/arm/def-configs/ramses
-@@ -0,0 +1,1159 @@
+@@ -0,0 +1,1174 @@
+#
+# Automatically generated by make menuconfig: don't edit
+#
@@ -2831,7 +2831,6 @@
+CONFIG_USB_SL811HS_ALT=m
+CONFIG_USB_AUDIO=m
+CONFIG_USB_EMI26=m
-+# CONFIG_USB_BLUETOOTH is not set
+CONFIG_USB_MIDI=m
+CONFIG_USB_STORAGE=m
+CONFIG_USB_STORAGE_DEBUG=y
@@ -2910,16 +2909,32 @@
+#
+# Bluetooth support
+#
-+CONFIG_BLUEZ=y
++CONFIG_BLUEZ=m
+CONFIG_BLUEZ_L2CAP=m
+CONFIG_BLUEZ_SCO=m
+CONFIG_BLUEZ_RFCOMM=m
-+CONFIG_BLUEZ_RFCOMM_TTY=y
++# CONFIG_BLUEZ_RFCOMM_TTY is not set
+CONFIG_BLUEZ_BNEP=m
-+# CONFIG_BLUEZ_BNEP_MC_FILTER is not set
++CONFIG_BLUEZ_BNEP_MC_FILTER=y
+# CONFIG_BLUEZ_BNEP_PROTO_FILTER is not set
+
+#
++# Bluetooth device drivers
++#
++CONFIG_BLUEZ_HCIUSB=m
++CONFIG_BLUEZ_USB_SCO=y
++CONFIG_BLUEZ_USB_ZERO_PACKET=y
++CONFIG_BLUEZ_HCIUART=m
++CONFIG_BLUEZ_HCIUART_H4=y
++CONFIG_BLUEZ_HCIUART_BCSP=y
++CONFIG_BLUEZ_HCIUART_BCSP_TXCRC=y
++CONFIG_BLUEZ_HCIDTL1=m
++CONFIG_BLUEZ_HCIBT3C=m
++CONFIG_BLUEZ_HCIBLUECARD=m
++CONFIG_BLUEZ_HCIBTUART=m
++# CONFIG_BLUEZ_HCIVHCI is not set
++
++#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
@@ -4060,7 +4075,7 @@
+#endif
+#define USE_UCB
+//#define PFI_LED
-+#define PFI_TURNOFF
++//#define PFI_TURNOFF
+
+#include <asm/types.h>
+#include <asm/setup.h>
@@ -6721,7 +6736,7 @@
static void change_speed(struct async_struct *info, struct termios *old);
static void rs_wait_until_sent(struct tty_struct *tty, int timeout);
-@@ -325,46 +165,74 @@
+@@ -325,46 +165,82 @@
{ 0, 0}
};
@@ -6803,6 +6818,14 @@
+ io_type: SERIAL_IO_MEM,
+ irq: IRQ_GPIO(26),
+ flags: ASYNC_SKIP_TEST,
++ }, {
++ type: PORT_UNKNOWN,
++ }, {
++ type: PORT_UNKNOWN,
++ }, {
++ type: PORT_UNKNOWN,
++ }, {
++ type: PORT_UNKNOWN,
+ }
};
@@ -6833,7 +6856,7 @@
#ifndef PREPARE_FUNC
#define PREPARE_FUNC(dev) (dev->prepare)
-@@ -403,39 +271,21 @@
+@@ -403,39 +279,21 @@
#endif
@@ -6882,7 +6905,7 @@
return readl((unsigned long) info->iomem_base +
(offset<<info->iomem_reg_shift));
default:
-@@ -447,17 +297,14 @@
+@@ -447,17 +305,14 @@
int value)
{
switch (info->io_type) {
@@ -6903,7 +6926,7 @@
writel(value, (unsigned long) info->iomem_base +
(offset<<info->iomem_reg_shift));
break;
-@@ -509,9 +356,6 @@
+@@ -509,9 +364,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -6913,7 +6936,7 @@
save_flags(flags); cli();
if (info->IER & UART_IER_THRI) {
info->IER &= ~UART_IER_THRI;
-@@ -529,9 +373,6 @@
+@@ -529,9 +381,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -6923,7 +6946,7 @@
save_flags(flags); cli();
if (info->xmit.head != info->xmit.tail
&& info->xmit.buf
-@@ -689,11 +530,7 @@
+@@ -689,11 +538,7 @@
#endif
*status = serial_inp(info, UART_LSR);
} while ((*status & UART_LSR_DR) && (max_count-- > 0));
@@ -6935,7 +6958,7 @@
}
static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done)
-@@ -758,11 +595,6 @@
+@@ -758,11 +603,6 @@
icount->dsr++;
if (status & UART_MSR_DDCD) {
icount->dcd++;
@@ -6947,7 +6970,7 @@
}
if (status & UART_MSR_DCTS)
icount->cts++;
-@@ -810,120 +642,23 @@
+@@ -810,120 +650,23 @@
}
}
@@ -7069,7 +7092,7 @@
do {
status = serial_inp(info, UART_LSR);
#ifdef SERIAL_DEBUG_INTR
-@@ -932,120 +667,23 @@
+@@ -932,120 +675,23 @@
if (status & UART_LSR_DR)
receive_chars(info, &status, regs);
check_modem_status(info);
@@ -7194,7 +7217,7 @@
/*
* -------------------------------------------------------------------
-@@ -1107,22 +745,6 @@
+@@ -1107,22 +753,6 @@
if (!info)
continue;
save_flags(flags); cli();
@@ -7217,7 +7240,7 @@
rs_interrupt_single(i, NULL, NULL);
restore_flags(flags);
}
-@@ -1132,11 +754,7 @@
+@@ -1132,11 +762,7 @@
if (IRQ_ports[0]) {
save_flags(flags); cli();
@@ -7229,7 +7252,7 @@
restore_flags(flags);
mod_timer(&serial_timer, jiffies + IRQ_timeout[0]);
-@@ -1177,50 +795,6 @@
+@@ -1177,50 +803,6 @@
IRQ_timeout[irq] = (timeout > 3) ? timeout-2 : 1;
}
@@ -7280,7 +7303,7 @@
static int startup(struct async_struct * info)
{
unsigned long flags;
-@@ -1228,9 +802,6 @@
+@@ -1228,9 +810,6 @@
void (*handler)(int, void *, struct pt_regs *);
struct serial_state *state= info->state;
unsigned long page;
@@ -7290,7 +7313,7 @@
page = get_zeroed_page(GFP_KERNEL);
if (!page)
-@@ -1258,6 +829,22 @@
+@@ -1258,6 +837,22 @@
printk("starting up ttys%d (irq %d)...", info->line, state->irq);
#endif
@@ -7313,7 +7336,7 @@
if (uart_config[state->type].flags & UART_STARTECH) {
/* Wake up UART */
serial_outp(info, UART_LCR, 0xBF);
-@@ -1305,25 +892,12 @@
+@@ -1305,25 +900,12 @@
serial_outp(info, UART_LCR, 0);
}
@@ -7340,7 +7363,7 @@
case (long)&STUART: CKEN |= CKEN5_STUART; break;
}
}
-@@ -1344,6 +918,7 @@
+@@ -1344,6 +926,7 @@
/*
* Clear the interrupt registers.
*/
@@ -7348,7 +7371,7 @@
(void) serial_inp(info, UART_LSR);
(void) serial_inp(info, UART_RX);
(void) serial_inp(info, UART_IIR);
-@@ -1371,18 +946,8 @@
+@@ -1371,18 +954,8 @@
if (state->irq && (!IRQ_ports[state->irq] ||
!IRQ_ports[state->irq]->next_port)) {
if (IRQ_ports[state->irq]) {
@@ -7367,7 +7390,7 @@
} else
handler = rs_interrupt_single;
-@@ -1417,12 +982,6 @@
+@@ -1417,12 +990,6 @@
info->MCR = 0;
if (info->tty->termios->c_cflag & CBAUD)
info->MCR = UART_MCR_DTR | UART_MCR_RTS;
@@ -7380,7 +7403,7 @@
{
if (state->irq != 0)
info->MCR |= UART_MCR_OUT2;
-@@ -1437,18 +996,9 @@
+@@ -1437,18 +1004,9 @@
*/
info->IER = UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI;
if (pxa_port(state->type))
@@ -7400,7 +7423,7 @@
/*
* And clear the interrupt registers again for luck.
*/
-@@ -1469,7 +1019,6 @@
+@@ -1469,7 +1027,6 @@
/*
* Set up the tty->alt_speed kludge
*/
@@ -7408,7 +7431,7 @@
if (info->tty) {
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
info->tty->alt_speed = 57600;
-@@ -1480,7 +1029,6 @@
+@@ -1480,7 +1037,6 @@
if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
info->tty->alt_speed = 460800;
}
@@ -7416,7 +7439,7 @@
/*
* and set the speed of the serial port
-@@ -1516,6 +1064,30 @@
+@@ -1516,6 +1072,30 @@
state->irq);
#endif
@@ -7447,7 +7470,7 @@
save_flags(flags); cli(); /* Disable interrupts */
/*
-@@ -1561,13 +1133,6 @@
+@@ -1561,13 +1141,6 @@
info->IER = 0;
serial_outp(info, UART_IER, 0x00); /* disable all intrs */
@@ -7461,7 +7484,7 @@
info->MCR &= ~UART_MCR_OUT2;
if (pxa_buggy_port(state->type))
info->MCR ^= UART_MCR_OUT2;
-@@ -1586,16 +1151,6 @@
+@@ -1586,16 +1159,6 @@
UART_FCR_CLEAR_XMIT));
serial_outp(info, UART_FCR, 0);
@@ -7478,7 +7501,7 @@
#ifdef CONFIG_ARCH_PXA
if (state->type == PORT_PXA
#ifdef CONFIG_SERIAL_CONSOLE
-@@ -1634,37 +1189,6 @@
+@@ -1634,37 +1197,6 @@
restore_flags(flags);
}
@@ -7516,7 +7539,7 @@
/*
* This routine is called to set the UART divisor registers to match
* the specified baud rate for a serial port.
-@@ -1711,12 +1235,6 @@
+@@ -1711,12 +1243,6 @@
baud = tty_get_baud_rate(info->tty);
if (!baud)
baud = 9600; /* B0 transition handled in rs_set_termios */
@@ -7529,7 +7552,7 @@
baud_base = info->state->baud_base;
if (info->state->type == PORT_16C950) {
if (baud <= baud_base)
-@@ -1778,10 +1296,6 @@
+@@ -1778,10 +1304,6 @@
if (uart_config[info->state->type].flags & UART_USE_FIFO) {
if ((info->state->baud_base / quot) < 2400)
fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
@@ -7540,7 +7563,7 @@
else
fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_8;
}
-@@ -1864,9 +1378,6 @@
+@@ -1864,9 +1386,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -7550,7 +7573,7 @@
if (!tty || !info->xmit.buf)
return;
-@@ -1888,9 +1399,6 @@
+@@ -1888,9 +1407,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -7560,7 +7583,7 @@
if (info->xmit.head == info->xmit.tail
|| tty->stopped
|| tty->hw_stopped
-@@ -1900,8 +1408,6 @@
+@@ -1900,8 +1416,6 @@
save_flags(flags); cli();
info->IER |= UART_IER_THRI;
serial_out(info, UART_IER, info->IER);
@@ -7569,7 +7592,7 @@
restore_flags(flags);
}
-@@ -1912,9 +1418,6 @@
+@@ -1912,9 +1426,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -7579,7 +7602,7 @@
if (!tty || !info->xmit.buf || !tmp_buf)
return 0;
-@@ -1978,11 +1481,6 @@
+@@ -1978,11 +1489,6 @@
&& !(info->IER & UART_IER_THRI)) {
info->IER |= UART_IER_THRI;
serial_out(info, UART_IER, info->IER);
@@ -7591,7 +7614,7 @@
}
return ret;
}
-@@ -1991,8 +1489,6 @@
+@@ -1991,8 +1497,6 @@
{
struct async_struct *info = (struct async_struct *)tty->driver_data;
@@ -7600,7 +7623,7 @@
return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
}
-@@ -2000,8 +1496,6 @@
+@@ -2000,8 +1504,6 @@
{
struct async_struct *info = (struct async_struct *)tty->driver_data;
@@ -7609,7 +7632,7 @@
return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE);
}
-@@ -2010,8 +1504,6 @@
+@@ -2010,8 +1512,6 @@
struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags;
@@ -7618,7 +7641,7 @@
save_flags(flags); cli();
info->xmit.head = info->xmit.tail = 0;
restore_flags(flags);
-@@ -2032,16 +1524,11 @@
+@@ -2032,16 +1532,11 @@
{
struct async_struct *info = (struct async_struct *)tty->driver_data;
@@ -7635,7 +7658,7 @@
}
}
-@@ -2064,9 +1551,6 @@
+@@ -2064,9 +1559,6 @@
tty->ldisc.chars_in_buffer(tty));
#endif
@@ -7645,7 +7668,7 @@
if (I_IXOFF(tty))
rs_send_xchar(tty, STOP_CHAR(tty));
-@@ -2089,9 +1573,6 @@
+@@ -2089,9 +1581,6 @@
tty->ldisc.chars_in_buffer(tty));
#endif
@@ -7655,7 +7678,7 @@
if (I_IXOFF(tty)) {
if (info->x_char)
info->x_char = 0;
-@@ -2134,7 +1615,6 @@
+@@ -2134,7 +1623,6 @@
tmp.close_delay = state->close_delay;
tmp.closing_wait = state->closing_wait;
tmp.custom_divisor = state->custom_divisor;
@@ -7663,7 +7686,7 @@
tmp.io_type = state->io_type;
if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
return -EFAULT;
-@@ -2160,8 +1640,7 @@
+@@ -2160,8 +1648,7 @@
new_port += (unsigned long) new_serial.port_high << HIGH_BITS_OFFSET;
change_irq = new_serial.irq != state->irq;
@@ -7673,7 +7696,7 @@
if (!capable(CAP_SYS_ADMIN)) {
if (change_irq || change_port ||
-@@ -2198,7 +1677,6 @@
+@@ -2198,7 +1685,6 @@
if (new_serial.type) {
for (i = 0 ; i < NR_PORTS; i++)
if ((state != &rs_table[i]) &&
@@ -7681,7 +7704,7 @@
(rs_table[i].port == new_port) &&
rs_table[i].type)
return -EADDRINUSE;
-@@ -2220,18 +1698,11 @@
+@@ -2220,18 +1706,11 @@
state->custom_divisor = new_serial.custom_divisor;
state->close_delay = new_serial.close_delay * HZ/100;
state->closing_wait = new_serial.closing_wait * HZ/100;
@@ -7700,7 +7723,7 @@
release_region(state->port,8);
}
state->type = new_serial.type;
-@@ -2243,31 +1714,19 @@
+@@ -2243,31 +1722,19 @@
shutdown(info);
state->irq = new_serial.irq;
info->port = state->port = new_port;
@@ -7733,7 +7756,7 @@
if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
info->tty->alt_speed = 57600;
if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
-@@ -2276,7 +1735,6 @@
+@@ -2276,7 +1743,6 @@
info->tty->alt_speed = 230400;
if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
info->tty->alt_speed = 460800;
@@ -7741,7 +7764,7 @@
change_speed(info, 0);
}
} else
-@@ -2414,60 +1872,14 @@
+@@ -2414,60 +1880,14 @@
return 0;
}
@@ -7802,7 +7825,7 @@
if (!CONFIGURED_SERIAL_PORT(info))
return;
save_flags(flags); cli();
-@@ -2478,121 +1890,6 @@
+@@ -2478,121 +1898,6 @@
serial_out(info, UART_LCR, info->LCR);
restore_flags(flags);
}
@@ -7924,7 +7947,7 @@
static int rs_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg)
-@@ -2601,12 +1898,6 @@
+@@ -2601,12 +1906,6 @@
struct async_icount cprev, cnow; /* kernel counter temps */
struct serial_icounter_struct icount;
unsigned long flags;
@@ -7937,7 +7960,7 @@
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
-@@ -2616,45 +1907,6 @@
+@@ -2616,45 +1915,6 @@
}
switch (cmd) {
@@ -7983,7 +8006,7 @@
case TIOCMGET:
return get_modem_info(info, (unsigned int *) arg);
case TIOCMBIS:
-@@ -2667,9 +1919,6 @@
+@@ -2667,9 +1927,6 @@
case TIOCSSERIAL:
return set_serial_info(info,
(struct serial_struct *) arg);
@@ -7993,7 +8016,7 @@
case TIOCSERGETLSR: /* Get line status register */
return get_lsr_info(info, (unsigned int *) arg);
-@@ -2679,15 +1928,6 @@
+@@ -2679,15 +1936,6 @@
return -EFAULT;
return 0;
@@ -8009,7 +8032,7 @@
/*
* Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
* - mask passed in arg for lines of interest
-@@ -2754,6 +1994,39 @@
+@@ -2754,6 +2002,39 @@
printk ("TIOCSER?WILD ioctl obsolete, ignored.\n");
return 0;
@@ -8049,7 +8072,7 @@
default:
return -ENOIOCTLCMD;
}
-@@ -2801,18 +2074,6 @@
+@@ -2801,18 +2082,6 @@
tty->hw_stopped = 0;
rs_start(tty);
}
@@ -8068,7 +8091,7 @@
}
/*
-@@ -2831,9 +2092,6 @@
+@@ -2831,9 +2100,6 @@
struct serial_state *state;
unsigned long flags;
@@ -8078,7 +8101,7 @@
state = info->state;
save_flags(flags); cli();
-@@ -2933,10 +2191,7 @@
+@@ -2933,10 +2199,7 @@
{
struct async_struct * info = (struct async_struct *)tty->driver_data;
unsigned long orig_jiffies, char_time;
@@ -8090,7 +8113,7 @@
if (info->state->type == PORT_UNKNOWN)
return;
-@@ -2974,9 +2229,11 @@
+@@ -2974,9 +2237,11 @@
printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
printk("jiff=%lu...", jiffies);
#endif
@@ -8103,7 +8126,7 @@
#endif
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(char_time);
-@@ -2986,8 +2243,9 @@
+@@ -2986,8 +2251,9 @@
break;
}
#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
@@ -8114,7 +8137,7 @@
}
/*
-@@ -2998,9 +2256,6 @@
+@@ -2998,9 +2264,6 @@
struct async_struct * info = (struct async_struct *)tty->driver_data;
struct serial_state *state = info->state;
@@ -8124,7 +8147,7 @@
state = info->state;
rs_flush_buffer(tty);
-@@ -3036,12 +2291,8 @@
+@@ -3036,12 +2299,8 @@
(info->flags & ASYNC_CLOSING)) {
if (info->flags & ASYNC_CLOSING)
interruptible_sleep_on(&info->close_wait);
@@ -8137,7 +8160,7 @@
}
/*
-@@ -3114,14 +2365,10 @@
+@@ -3114,14 +2373,10 @@
set_current_state(TASK_INTERRUPTIBLE);
if (tty_hung_up_p(filp) ||
!(info->flags & ASYNC_INITIALIZED)) {
@@ -8152,7 +8175,7 @@
break;
}
if (!(info->flags & ASYNC_CALLOUT_ACTIVE) &&
-@@ -3223,16 +2470,12 @@
+@@ -3223,16 +2478,12 @@
}
tty->driver_data = info;
info->tty = tty;
@@ -8169,7 +8192,7 @@
/*
* This relies on lock_kernel() stuff so wants tidying for 2.5
-@@ -3254,12 +2497,8 @@
+@@ -3254,12 +2505,8 @@
(info->flags & ASYNC_CLOSING)) {
if (info->flags & ASYNC_CLOSING)
interruptible_sleep_on(&info->close_wait);
@@ -8182,7 +8205,7 @@
}
/*
-@@ -3313,17 +2552,14 @@
+@@ -3313,17 +2560,14 @@
int ret;
unsigned long flags;
@@ -8206,7 +8229,7 @@
/*
* Figure out the current RS-232 lines
-@@ -3334,7 +2570,6 @@
+@@ -3334,7 +2578,6 @@
info->magic = SERIAL_MAGIC;
info->port = state->port;
info->flags = state->flags;
@@ -8214,7 +8237,7 @@
info->io_type = state->io_type;
info->iomem_base = state->iomem_base;
info->iomem_reg_shift = state->iomem_reg_shift;
-@@ -3389,13 +2624,13 @@
+@@ -3389,13 +2632,13 @@
}
static int rs_read_proc(char *page, char **start, off_t off, int count,
@@ -8231,14 +8254,15 @@
for (i = 0; i < NR_PORTS && len < 4000; i++) {
l = line_info(page + len, &rs_table[i]);
len += l;
-@@ -3423,2038 +2658,63 @@
+@@ -3423,125 +2666,212 @@
*/
/*
- * This routine prints out the appropriate serial driver version
- * number, and identifies which options were configured into this
- * driver.
-- */
++ * The serial driver boot-time initialization code!
+ */
-static char serial_options[] __initdata =
-#ifdef CONFIG_HUB6
- " HUB-6"
@@ -8267,34 +8291,205 @@
-#ifdef ENABLE_SERIAL_PNP
- " ISAPNP"
-#define SERIAL_OPT
--#endif
++static int __init rs_init(void)
++{
++ int i;
++ struct serial_state * state;
++
++ printk("pxa & ti16c754b serial driver\n");
++ set_GPIO_IRQ_edge(7, GPIO_RISING_EDGE);
++ set_GPIO_IRQ_edge(24, GPIO_RISING_EDGE);
++ set_GPIO_IRQ_edge(25, GPIO_RISING_EDGE);
++ set_GPIO_IRQ_edge(26, GPIO_RISING_EDGE);
++
++ if (!request_mem_region(RAMSES_UARTA_PHYS, 16*4, "Ramses UART A"))
++ printk(KERN_ERR "unable to reserve region\n");
++ else {
++ ramses_uarta = ioremap_nocache(RAMSES_UARTA_PHYS, 16*4);
++ if (!ramses_uarta)
++ printk(KERN_ERR "unable to map region\n");
++ else {
++ //printk("ramses_uarta cookie is: %08x\n", (unsigned int) ramses_uarta);
++ rs_table[3].iomem_base = ramses_uarta;
++ }
++ }
++ if (!request_mem_region(RAMSES_UARTB_PHYS, 16*4, "Ramses UART B"))
++ printk(KERN_ERR "unable to reserve region\n");
++ else {
++ ramses_uartb = ioremap_nocache(RAMSES_UARTB_PHYS, 16*4);
++ if (!ramses_uartb)
++ printk(KERN_ERR "unable to map region\n");
++ else {
++ //printk("ramses_uartb cookie is: %08x\n", (unsigned int) ramses_uartb);
++ rs_table[4].iomem_base = ramses_uartb;
++ }
++ }
++ if (!request_mem_region(RAMSES_UARTC_PHYS, 16*4, "Ramses UART C"))
++ printk(KERN_ERR "unable to reserve region\n");
++ else {
++ ramses_uartc = ioremap_nocache(RAMSES_UARTC_PHYS, 16*4);
++ if (!ramses_uartc)
++ printk(KERN_ERR "unable to map region\n");
++ else {
++ //printk("ramses_uartc cookie is: %08x\n", (unsigned int) ramses_uartc);
++ rs_table[5].iomem_base = ramses_uartc;
++ }
++ }
++ if (!request_mem_region(RAMSES_UARTD_PHYS, 16*4, "Ramses UART D"))
++ printk(KERN_ERR "unable to reserve region\n");
++ else {
++ ramses_uartd = ioremap_nocache(RAMSES_UARTD_PHYS, 16*4);
++ if (!ramses_uartd)
++ printk(KERN_ERR "unable to map region\n");
++ else {
++ //printk("ramses_uartd cookie is: %08x\n", (unsigned int) ramses_uartd);
++ rs_table[6].iomem_base = ramses_uartd;
++ }
++ }
++ init_bh(SERIAL_BH, do_serial_bh);
++ init_timer(&serial_timer);
++ serial_timer.function = rs_timer;
++ mod_timer(&serial_timer, jiffies + RS_STROBE_TIME);
++
++ for (i = 0; i < NR_IRQS; i++) {
++ IRQ_ports[i] = 0;
++ IRQ_timeout[i] = 0;
++ }
++#ifdef CONFIG_SERIAL_CONSOLE
++ /*
++ * The interrupt of the serial console port
++ * can't be shared.
++ */
++ if (sercons.flags & CON_CONSDEV) {
++ for(i = 0; i < NR_PORTS; i++)
++ if (i != sercons.index &&
++ rs_table[i].irq == rs_table[sercons.index].irq)
++ rs_table[i].irq = 0;
++ }
+ #endif
-#ifdef ENABLE_SERIAL_ACPI
- " SERIAL_ACPI"
-#define SERIAL_OPT
--#endif
++ /* Initialize the tty_driver structure */
++
++ memset(&serial_driver, 0, sizeof(struct tty_driver));
++ serial_driver.magic = TTY_DRIVER_MAGIC;
++ serial_driver.driver_name = "serial";
++#if defined(CONFIG_DEVFS_FS)
++ serial_driver.name = "tts/%d";
++#else
++ serial_driver.name = "ttyS";
+ #endif
-#ifdef SERIAL_OPT
- " enabled\n";
--#else
++ serial_driver.major = TTY_MAJOR;
++ serial_driver.minor_start = 64;
++ serial_driver.name_base = 0;
++ serial_driver.num = NR_PORTS;
++ serial_driver.type = TTY_DRIVER_TYPE_SERIAL;
++ serial_driver.subtype = SERIAL_TYPE_NORMAL;
++ serial_driver.init_termios = tty_std_termios;
++ serial_driver.init_termios.c_cflag =
++ B115200 | CS8 | CREAD | HUPCL | CLOCAL;
++ serial_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
++ serial_driver.refcount = &serial_refcount;
++ serial_driver.table = serial_table;
++ serial_driver.termios = serial_termios;
++ serial_driver.termios_locked = serial_termios_locked;
++
++ serial_driver.open = rs_open;
++ serial_driver.close = rs_close;
++ serial_driver.write = rs_write;
++ serial_driver.put_char = rs_put_char;
++ serial_driver.flush_chars = rs_flush_chars;
++ serial_driver.write_room = rs_write_room;
++ serial_driver.chars_in_buffer = rs_chars_in_buffer;
++ serial_driver.flush_buffer = rs_flush_buffer;
++ serial_driver.ioctl = rs_ioctl;
++ serial_driver.throttle = rs_throttle;
++ serial_driver.unthrottle = rs_unthrottle;
++ serial_driver.set_termios = rs_set_termios;
++ serial_driver.stop = rs_stop;
++ serial_driver.start = rs_start;
++ serial_driver.hangup = rs_hangup;
++ serial_driver.break_ctl = rs_break;
++ serial_driver.send_xchar = rs_send_xchar;
++ serial_driver.wait_until_sent = rs_wait_until_sent;
++ serial_driver.read_proc = rs_read_proc;
++
++ /*
++ * The callout device is just like normal device except for
++ * major number and the subtype code.
++ */
++ callout_driver = serial_driver;
++#if defined(CONFIG_DEVFS_FS)
++ callout_driver.name = "cua/%d";
+ #else
- " no serial options enabled\n";
--#endif
++ callout_driver.name = "cua";
+ #endif
-#undef SERIAL_OPT
--
++ callout_driver.major = TTYAUX_MAJOR;
++ callout_driver.subtype = SERIAL_TYPE_CALLOUT;
++ callout_driver.read_proc = 0;
++ callout_driver.proc_entry = 0;
+
-static _INLINE_ void show_serial_version(void)
-{
- printk(KERN_INFO "%s version %s%s (%s) with%s", serial_name,
- serial_version, LOCAL_VERSTRING, serial_revdate,
- serial_options);
--}
--
--/*
++ if (tty_register_driver(&serial_driver))
++ panic("Couldn't register serial driver\n");
++ if (tty_register_driver(&callout_driver))
++ panic("Couldn't register callout driver\n");
++
++ for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {
++ state->magic = SSTATE_MAGIC;
++ state->line = i;
++ state->custom_divisor = 0;
++ state->close_delay = 5*HZ/10;
++ state->closing_wait = 30*HZ;
++ state->callout_termios = callout_driver.init_termios;
++ state->normal_termios = serial_driver.init_termios;
++ state->icount.cts = state->icount.dsr =
++ state->icount.rng = state->icount.dcd = 0;
++ state->icount.rx = state->icount.tx = 0;
++ state->icount.frame = state->icount.parity = 0;
++ state->icount.overrun = state->icount.brk = 0;
++ state->irq = irq_cannonicalize(state->irq);
++ if (state->port && check_region(state->port,8)) {
++ state->type = PORT_UNKNOWN;
++ continue;
++ }
++ }
++ for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {
++ if (state->type == PORT_UNKNOWN)
++ continue;
++ printk(KERN_INFO"tts/%d at irq %d is a %s\n",
++ state->line,
++ state->irq,
++ uart_config[state->type].name);
++ tty_register_devfs(&serial_driver, 0,
++ serial_driver.minor_start + state->line);
++ tty_register_devfs(&callout_driver, 0,
++ callout_driver.minor_start + state->line);
++ }
++ return 0;
+ }
+
+ /*
- * This routine detect the IRQ of a serial port by clearing OUT2 when
- * no UART interrupt are requested (IER = 0) (*GPL*). This seems to work at
- * each time, as long as no other device permanently request the IRQ.
- * If no IRQ is detected, or multiple IRQ appear, this function returns 0.
- * The variable "state" and the field "state->port" should not be null.
-- */
++ * This is for use by architectures that know their serial console
++ * attributes only at run time. Not to be invoked after rs_init().
+ */
-static unsigned detect_uart_irq (struct serial_state * state)
--{
++int __init early_serial_setup(struct serial_struct *req)
+ {
- int irq;
- unsigned long irqs;
- unsigned char save_mcr, save_ier;
@@ -8321,7 +8516,8 @@
- scr_info.io_type = state->io_type;
- scr_info.iomem_base = state->iomem_base;
- scr_info.iomem_reg_shift = state->iomem_reg_shift;
--
++ int i = req->line;
+
- /* forget possible initially masked and pending IRQ */
- probe_irq_off(probe_irq_on());
- save_mcr = serial_inp(&scr_info, UART_MCR);
@@ -8346,7 +8542,8 @@
- serial_outp(&scr_info, UART_TX, 0xFF);
- udelay (20);
- irq = probe_irq_off(irqs);
--
++ printk("%s\n", __FUNCTION__);
+
- serial_outp(&scr_info, UART_MCR, save_mcr);
- serial_outp(&scr_info, UART_IER, save_ier);
-#ifdef CONFIG_SERIAL_MANY_PORTS
@@ -8354,358 +8551,32 @@
- outb_p(save_ICP, ICP);
-#endif
- return (irq > 0)? irq : 0;
--}
--
--/*
-- * This is a quickie test to see how big the FIFO is.
-- * It doesn't work at all the time, more's the pity.
-- */
--static int size_fifo(struct async_struct *info)
--{
-- unsigned char old_fcr, old_mcr, old_dll, old_dlm;
-- int count;
--
-- old_fcr = serial_inp(info, UART_FCR);
-- old_mcr = serial_inp(info, UART_MCR);
-- serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO |
-- UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
-- serial_outp(info, UART_MCR, UART_MCR_LOOP);
-- serial_outp(info, UART_LCR, UART_LCR_DLAB);
-- old_dll = serial_inp(info, UART_DLL);
-- old_dlm = serial_inp(info, UART_DLM);
-- serial_outp(info, UART_DLL, 0x01);
-- serial_outp(info, UART_DLM, 0x00);
-- serial_outp(info, UART_LCR, 0x03);
-- for (count = 0; count < 256; count++)
-- serial_outp(info, UART_TX, count);
-- mdelay(20);
-- for (count = 0; (serial_inp(info, UART_LSR) & UART_LSR_DR) &&
-- (count < 256); count++)
-- serial_inp(info, UART_RX);
-- serial_outp(info, UART_FCR, old_fcr);
-- serial_outp(info, UART_MCR, old_mcr);
-- serial_outp(info, UART_LCR, UART_LCR_DLAB);
-- serial_outp(info, UART_DLL, old_dll);
-- serial_outp(info, UART_DLM, old_dlm);
--
-- return count;
--}
--
--/*
-- * This is a helper routine to autodetect StarTech/Exar/Oxsemi UART's.
-- * When this function is called we know it is at least a StarTech
-- * 16650 V2, but it might be one of several StarTech UARTs, or one of
-- * its clones. (We treat the broken original StarTech 16650 V1 as a
-- * 16550, and why not? Startech doesn't seem to even acknowledge its
-- * existence.)
-- *
-- * What evil have men's minds wrought...
-- */
--static void autoconfig_startech_uarts(struct async_struct *info,
-- struct serial_state *state,
-- unsigned long flags)
--{
-- unsigned char scratch, scratch2, scratch3, scratch4;
--
-- /*
-- * First we check to see if it's an Oxford Semiconductor UART.
-- *
-- * If we have to do this here because some non-National
-- * Semiconductor clone chips lock up if you try writing to the
-- * LSR register (which serial_icr_read does)
-- */
-- if (state->type == PORT_16550A) {
-- /*
-- * EFR [4] must be set else this test fails
-- *
-- * This shouldn't be necessary, but Mike Hudson
-- * (Exoray@isys.ca) claims that it's needed for 952
-- * dual UART's (which are not recommended for new designs).
-- */
-- info->ACR = 0;
-- serial_out(info, UART_LCR, 0xBF);
-- serial_out(info, UART_EFR, 0x10);
-- serial_out(info, UART_LCR, 0x00);
-- /* Check for Oxford Semiconductor 16C950 */
-- scratch = serial_icr_read(info, UART_ID1);
-- scratch2 = serial_icr_read(info, UART_ID2);
-- scratch3 = serial_icr_read(info, UART_ID3);
--
-- if (scratch == 0x16 && scratch2 == 0xC9 &&
-- (scratch3 == 0x50 || scratch3 == 0x52 ||
-- scratch3 == 0x54)) {
-- state->type = PORT_16C950;
-- state->revision = serial_icr_read(info, UART_REV) |
-- (scratch3 << 8);
-- return;
-- }
-- }
--
-- /*
-- * We check for a XR16C850 by setting DLL and DLM to 0, and
-- * then reading back DLL and DLM. If DLM reads back 0x10,
-- * then the UART is a XR16C850 and the DLL contains the chip
-- * revision. If DLM reads back 0x14, then the UART is a
-- * XR16C854.
-- *
-- */
--
-- /* Save the DLL and DLM */
--
-- serial_outp(info, UART_LCR, UART_LCR_DLAB);
-- scratch3 = serial_inp(info, UART_DLL);
-- scratch4 = serial_inp(info, UART_DLM);
--
-- serial_outp(info, UART_DLL, 0);
-- serial_outp(info, UART_DLM, 0);
-- scratch2 = serial_inp(info, UART_DLL);
-- scratch = serial_inp(info, UART_DLM);
-- serial_outp(info, UART_LCR, 0);
--
-- if (scratch == 0x10 || scratch == 0x14) {
-- if (scratch == 0x10)
-- state->revision = scratch2;
-- state->type = PORT_16850;
-- return;
-- }
--
-- /* Restore the DLL and DLM */
--
-- serial_outp(info, UART_LCR, UART_LCR_DLAB);
-- serial_outp(info, UART_DLL, scratch3);
-- serial_outp(info, UART_DLM, scratch4);
-- serial_outp(info, UART_LCR, 0);
-- /*
-- * We distinguish between the '654 and the '650 by counting
-- * how many bytes are in the FIFO. I'm using this for now,
-- * since that's the technique that was sent to me in the
-- * serial driver update, but I'm not convinced this works.
-- * I've had problems doing this in the past. -TYT
-- */
-- if (size_fifo(info) == 64)
-- state->type = PORT_16654;
-- else
-- state->type = PORT_16650V2;
--}
--
--/*
-- * This routine is called by rs_init() to initialize a specific serial
-- * port. It determines what type of UART chip this serial port is
-- * using: 8250, 16450, 16550, 16550A. The important question is
-- * whether or not this UART is a 16550A or not, since this will
-- * determine whether or not we can use its FIFO features or not.
-- */
--static void autoconfig(struct serial_state * state)
--{
-- unsigned char status1, status2, scratch, scratch2, scratch3;
-- unsigned char save_lcr, save_mcr;
-- struct async_struct *info, scr_info;
-- unsigned long flags;
--
-- state->type = PORT_UNKNOWN;
--
--#ifdef SERIAL_DEBUG_AUTOCONF
-- printk("Testing ttyS%d (0x%04lx, 0x%04x)...\n", state->line,
-- state->port, (unsigned) state->iomem_base);
--#endif
--
-- if (!CONFIGURED_SERIAL_PORT(state))
-- return;
--
-- info = &scr_info; /* This is just for serial_{in,out} */
--
-- info->magic = SERIAL_MAGIC;
-- info->state = state;
-- info->port = state->port;
-- info->flags = state->flags;
--#ifdef CONFIG_HUB6
-- info->hub6 = state->hub6;
--#endif
-- info->io_type = state->io_type;
-- info->iomem_base = state->iomem_base;
-- info->iomem_reg_shift = state->iomem_reg_shift;
--
-- save_flags(flags); cli();
--
-- if (!(state->flags & ASYNC_BUGGY_UART) &&
-- !state->iomem_base) {
-- /*
-- * Do a simple existence test first; if we fail this,
-- * there's no point trying anything else.
-- *
-- * 0x80 is used as a nonsense port to prevent against
-- * false positives due to ISA bus float. The
-- * assumption is that 0x80 is a non-existent port;
-- * which should be safe since include/asm/io.h also
-- * makes this assumption.
-- */
-- scratch = serial_inp(info, UART_IER);
-- serial_outp(info, UART_IER, 0);
--#ifdef __i386__
-- outb(0xff, 0x080);
--#endif
-- scratch2 = serial_inp(info, UART_IER);
-- serial_outp(info, UART_IER, 0x0F);
--#ifdef __i386__
-- outb(0, 0x080);
--#endif
-- scratch3 = serial_inp(info, UART_IER);
-- serial_outp(info, UART_IER, scratch);
-- if (scratch2 || scratch3 != 0x0F) {
--#ifdef SERIAL_DEBUG_AUTOCONF
-- printk("serial: ttyS%d: simple autoconfig failed "
-- "(%02x, %02x)\n", state->line,
--