Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113432
b: refs/heads/master
c: b70ac77
h: refs/heads/master
v: v3
  • Loading branch information
David Miller authored and Linus Torvalds committed Oct 13, 2008
1 parent 2794b12 commit 92fb338
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5d674abcffeacaf83038bbf7c0caf24edd497dd
refs/heads/master: b70ac7718579b5cbf3bdd74fd01132d1c91596f4
6 changes: 6 additions & 0 deletions trunk/arch/sparc/include/asm/serial.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __SPARC_SERIAL_H
#define __SPARC_SERIAL_H

#define BASE_BAUD ( 1843200 / 16 )

#endif /* __SPARC_SERIAL_H */
21 changes: 17 additions & 4 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@

#include "8250.h"

#ifdef CONFIG_SPARC
#include "suncore.h"
#endif

/*
* Configuration:
* share_irqs - whether we pass IRQF_SHARED to request_irq(). This option
Expand Down Expand Up @@ -2676,7 +2680,6 @@ static struct uart_driver serial8250_reg = {
.dev_name = "ttyS",
.major = TTY_MAJOR,
.minor = 64,
.nr = UART_NR,
.cons = SERIAL8250_CONSOLE,
};

Expand Down Expand Up @@ -2958,10 +2961,12 @@ static int __init serial8250_init(void)
"%d ports, IRQ sharing %sabled\n", nr_uarts,
share_irqs ? "en" : "dis");

for (i = 0; i < NR_IRQS; i++)
spin_lock_init(&irq_lists[i].lock);

#ifdef CONFIG_SPARC
ret = sunserial_register_minors(&serial8250_reg, UART_NR);
#else
serial8250_reg.nr = UART_NR;
ret = uart_register_driver(&serial8250_reg);
#endif
if (ret)
goto out;

Expand All @@ -2986,7 +2991,11 @@ static int __init serial8250_init(void)
put_dev:
platform_device_put(serial8250_isa_devs);
unreg_uart_drv:
#ifdef CONFIG_SPARC
sunserial_unregister_minors(&serial8250_reg, UART_NR);
#else
uart_unregister_driver(&serial8250_reg);
#endif
out:
return ret;
}
Expand All @@ -3005,7 +3014,11 @@ static void __exit serial8250_exit(void)
platform_driver_unregister(&serial8250_isa_driver);
platform_device_unregister(isa_dev);

#ifdef CONFIG_SPARC
sunserial_unregister_minors(&serial8250_reg, UART_NR);
#else
uart_unregister_driver(&serial8250_reg);
#endif
}

module_init(serial8250_init);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ menu "Serial drivers"
# The new 8250/16550 serial drivers
config SERIAL_8250
tristate "8250/16550 and compatible serial support"
depends on (BROKEN || !SPARC)
select SERIAL_CORE
---help---
This selects whether you want to include the driver for the standard
Expand Down
15 changes: 10 additions & 5 deletions trunk/drivers/serial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

obj-$(CONFIG_SERIAL_CORE) += serial_core.o
obj-$(CONFIG_SERIAL_21285) += 21285.o

# These Sparc drivers have to appear before others such as 8250
# which share ttySx minor node space. Otherwise console device
# names change and other unplesantries.
obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o
obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o
obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o

obj-$(CONFIG_SERIAL_8250) += 8250.o
obj-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o
obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o
Expand Down Expand Up @@ -31,12 +41,7 @@ obj-$(CONFIG_SERIAL_S3C2400) += s3c2400.o
obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o
obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o
obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o
obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o
obj-$(CONFIG_SERIAL_MUX) += mux.o
obj-$(CONFIG_SERIAL_68328) += 68328serial.o
obj-$(CONFIG_SERIAL_68360) += 68360serial.o
Expand Down

0 comments on commit 92fb338

Please sign in to comment.