diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 09:11:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 09:11:09 -0400 |
commit | efb8d21b2c6db3497655cc6a033ae8a9883e4063 (patch) | |
tree | a14a0dbb9fec3a6db5e542ba7ed4a49681706420 /arch/arm/plat-samsung | |
parent | 3cb603284b3d256ae9ae9e65887cee8416bfef15 (diff) | |
parent | d208a3bf77f902283894f546b6b5383202cf7882 (diff) |
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
TTY: serial_core: Fix crash if DCD drop during suspend
tty/serial: atmel_serial: bootconsole removed from auto-enumerates
Revert "TTY: call tty_driver_lookup_tty unconditionally"
tty/serial: atmel_serial: add device tree support
tty/serial: atmel_serial: auto-enumerate ports
tty/serial: atmel_serial: whitespace and braces modifications
tty/serial: atmel_serial: change platform_data variable name
tty/serial: RS485 bindings for device tree
TTY: call tty_driver_lookup_tty unconditionally
TTY: pty, release tty in all ptmx_open fail paths
TTY: make tty_add_file non-failing
TTY: drop driver reference in tty_open fail path
8250_pci: Fix kernel panic when pch_uart is disabled
h8300: drivers/serial/Kconfig was moved
parport_pc: release IO region properly if unsupported ITE887x card is found
tty: Support compat_ioctl get/set termios_locked
hvc_console: display printk messages on console.
TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
...
Fix up Conflicts in:
- drivers/tty/serial/8250_pci.c
Trivial conflict with removed duplicate device ID
- drivers/tty/serial/atmel_serial.c
Annoying silly conflict between "specify the port num via
platform_data" and other changes to atmel_console_init
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-samsung/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-serial.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-samsung/irq-uart.c | 96 |
4 files changed, 5 insertions, 102 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index b3e10659e4b..dffa37bc4a0 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -65,11 +65,6 @@ config SAMSUNG_IRQ_VIC_TIMER | |||
65 | help | 65 | help |
66 | Internal configuration to build the VIC timer interrupt code. | 66 | Internal configuration to build the VIC timer interrupt code. |
67 | 67 | ||
68 | config SAMSUNG_IRQ_UART | ||
69 | bool | ||
70 | help | ||
71 | Internal configuration to build the IRQ UART demux code. | ||
72 | |||
73 | # options for gpio configuration support | 68 | # options for gpio configuration support |
74 | 69 | ||
75 | config SAMSUNG_GPIOLIB_4BIT | 70 | config SAMSUNG_GPIOLIB_4BIT |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 853764ba8cc..1105922342f 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -21,7 +21,6 @@ obj-y += dev-asocdma.o | |||
21 | 21 | ||
22 | obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o | 22 | obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o |
23 | 23 | ||
24 | obj-$(CONFIG_SAMSUNG_IRQ_UART) += irq-uart.o | ||
25 | obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o | 24 | obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o |
26 | 25 | ||
27 | # ADC | 26 | # ADC |
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h index bac36fa3bec..72073484702 100644 --- a/arch/arm/plat-samsung/include/plat/regs-serial.h +++ b/arch/arm/plat-samsung/include/plat/regs-serial.h | |||
@@ -186,6 +186,11 @@ | |||
186 | #define S3C64XX_UINTSP 0x34 | 186 | #define S3C64XX_UINTSP 0x34 |
187 | #define S3C64XX_UINTM 0x38 | 187 | #define S3C64XX_UINTM 0x38 |
188 | 188 | ||
189 | #define S3C64XX_UINTM_RXD (0) | ||
190 | #define S3C64XX_UINTM_TXD (2) | ||
191 | #define S3C64XX_UINTM_RXD_MSK (1 << S3C64XX_UINTM_RXD) | ||
192 | #define S3C64XX_UINTM_TXD_MSK (1 << S3C64XX_UINTM_TXD) | ||
193 | |||
189 | /* Following are specific to S5PV210 */ | 194 | /* Following are specific to S5PV210 */ |
190 | #define S5PV210_UCON_CLKMASK (1<<10) | 195 | #define S5PV210_UCON_CLKMASK (1<<10) |
191 | #define S5PV210_UCON_PCLK (0<<10) | 196 | #define S5PV210_UCON_PCLK (0<<10) |
diff --git a/arch/arm/plat-samsung/irq-uart.c b/arch/arm/plat-samsung/irq-uart.c deleted file mode 100644 index 3014c7226bd..00000000000 --- a/arch/arm/plat-samsung/irq-uart.c +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* arch/arm/plat-samsung/irq-uart.c | ||
2 | * originally part of arch/arm/plat-s3c64xx/irq.c | ||
3 | * | ||
4 | * Copyright 2008 Openmoko, Inc. | ||
5 | * Copyright 2008 Simtec Electronics | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * | ||
9 | * Samsung- UART Interrupt handling | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/serial_core.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/io.h> | ||
21 | |||
22 | #include <asm/mach/irq.h> | ||
23 | |||
24 | #include <mach/map.h> | ||
25 | #include <plat/irq-uart.h> | ||
26 | #include <plat/regs-serial.h> | ||
27 | #include <plat/cpu.h> | ||
28 | |||
29 | /* Note, we make use of the fact that the parent IRQs, IRQ_UART[0..3] | ||
30 | * are consecutive when looking up the interrupt in the demux routines. | ||
31 | */ | ||
32 | static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) | ||
33 | { | ||
34 | struct s3c_uart_irq *uirq = desc->irq_data.handler_data; | ||
35 | struct irq_chip *chip = irq_get_chip(irq); | ||
36 | u32 pend = __raw_readl(uirq->regs + S3C64XX_UINTP); | ||
37 | int base = uirq->base_irq; | ||
38 | |||
39 | chained_irq_enter(chip, desc); | ||
40 | |||
41 | if (pend & (1 << 0)) | ||
42 | generic_handle_irq(base); | ||
43 | if (pend & (1 << 1)) | ||
44 | generic_handle_irq(base + 1); | ||
45 | if (pend & (1 << 2)) | ||
46 | generic_handle_irq(base + 2); | ||
47 | if (pend & (1 << 3)) | ||
48 | generic_handle_irq(base + 3); | ||
49 | |||
50 | chained_irq_exit(chip, desc); | ||
51 | } | ||
52 | |||
53 | static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) | ||
54 | { | ||
55 | void __iomem *reg_base = uirq->regs; | ||
56 | struct irq_chip_generic *gc; | ||
57 | struct irq_chip_type *ct; | ||
58 | |||
59 | /* mask all interrupts at the start. */ | ||
60 | __raw_writel(0xf, reg_base + S3C64XX_UINTM); | ||
61 | |||
62 | gc = irq_alloc_generic_chip("s3c-uart", 1, uirq->base_irq, reg_base, | ||
63 | handle_level_irq); | ||
64 | |||
65 | if (!gc) { | ||
66 | pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", | ||
67 | __func__, uirq->base_irq); | ||
68 | return; | ||
69 | } | ||
70 | |||
71 | ct = gc->chip_types; | ||
72 | ct->chip.irq_ack = irq_gc_ack_set_bit; | ||
73 | ct->chip.irq_mask = irq_gc_mask_set_bit; | ||
74 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | ||
75 | ct->regs.ack = S3C64XX_UINTP; | ||
76 | ct->regs.mask = S3C64XX_UINTM; | ||
77 | irq_setup_generic_chip(gc, IRQ_MSK(4), IRQ_GC_INIT_MASK_CACHE, | ||
78 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | ||
79 | |||
80 | irq_set_handler_data(uirq->parent_irq, uirq); | ||
81 | irq_set_chained_handler(uirq->parent_irq, s3c_irq_demux_uart); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * s3c_init_uart_irqs() - initialise UART IRQs and the necessary demuxing | ||
86 | * @irq: The interrupt data for registering | ||
87 | * @nr_irqs: The number of interrupt descriptions in @irq. | ||
88 | * | ||
89 | * Register the UART interrupts specified by @irq including the demuxing | ||
90 | * routines. This supports the S3C6400 and newer style of devices. | ||
91 | */ | ||
92 | void __init s3c_init_uart_irqs(struct s3c_uart_irq *irq, unsigned int nr_irqs) | ||
93 | { | ||
94 | for (; nr_irqs > 0; nr_irqs--, irq++) | ||
95 | s3c_init_uart_irq(irq); | ||
96 | } | ||