diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-20 17:49:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-20 17:49:00 -0400 |
commit | ff9144530e9cfe8923e00172e3f8ff83c3b8ff8b (patch) | |
tree | c64a9528dde590b9f3174125ad361f46ee30bba8 /arch/arm/mach-pnx4008/serial.c | |
parent | 25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff) | |
parent | 96ce2385dd2817da549910001a69ac0a2762a1b9 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
[ARM] 3559/1: S3C2442: core and serial port
[ARM] 3557/1: S3C24XX: centralise and cleanup uart registration
[ARM] 3558/1: SMDK24XX: LED platform devices
[ARM] 3534/1: add spi support to lubbock platform
[ARM] 3554/1: ARM: Fix dyntick locking
[ARM] 3553/1: S3C24XX: earlier print of cpu idcode info
[ARM] 3552/1: S3C24XX: Move VA of GPIO for low-level debug
[ARM] 3551/1: S3C24XX: PM code failes to compile with CONFIG_DCACHE_WRITETHROUGH
[ARM] 3550/1: OSIRIS: fix serial port map for 1:1
[ARM] 3548/1: Fix the ARMv6 CPU id in compressed/head.S
[ARM] 3335/1: Old-abi Thumb sys_syscall broken
[ARM] 3467/1: [3/3] Support for Philips PNX4008 platform: defconfig
[ARM] 3466/1: [2/3] Support for Philips PNX4008 platform: chip support
[ARM] 3465/1: [1/3] Support for Philips PNX4008 platform: headers
[ARM] 3407/1: lpd7x: documetation update
[ARM] 3406/1: lpd7x: compilation fix for smc91x
[ARM] 3405/1: lpd7a40x: CPLD ssp driver
[ARM] 3404/1: lpd7a40x: AMBA CLCD support
[ARM] 3403/1: lpd7a40x: updated default configurations
[ARM] 3402/1: lpd7a40x: serial driver bug fix
...
Diffstat (limited to 'arch/arm/mach-pnx4008/serial.c')
-rw-r--r-- | arch/arm/mach-pnx4008/serial.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-pnx4008/serial.c b/arch/arm/mach-pnx4008/serial.c new file mode 100644 index 000000000000..2e1e04cc048c --- /dev/null +++ b/arch/arm/mach-pnx4008/serial.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pnx4008/serial.c | ||
3 | * | ||
4 | * PNX4008 UART initialization | ||
5 | * | ||
6 | * Copyright: MontaVista Software Inc. (c) 2005 | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | |||
18 | #include <asm/arch/platform.h> | ||
19 | #include <asm/arch/hardware.h> | ||
20 | |||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial_reg.h> | ||
23 | #include <asm/arch/pm.h> | ||
24 | |||
25 | #include <asm/arch/clock.h> | ||
26 | |||
27 | #define UART_3 0 | ||
28 | #define UART_4 1 | ||
29 | #define UART_5 2 | ||
30 | #define UART_6 3 | ||
31 | #define UART_UNKNOWN (-1) | ||
32 | |||
33 | #define UART3_BASE_VA IO_ADDRESS(PNX4008_UART3_BASE) | ||
34 | #define UART4_BASE_VA IO_ADDRESS(PNX4008_UART4_BASE) | ||
35 | #define UART5_BASE_VA IO_ADDRESS(PNX4008_UART5_BASE) | ||
36 | #define UART6_BASE_VA IO_ADDRESS(PNX4008_UART6_BASE) | ||
37 | |||
38 | #define UART_FCR_OFFSET 8 | ||
39 | #define UART_FIFO_SIZE 64 | ||
40 | |||
41 | void pnx4008_uart_init(void) | ||
42 | { | ||
43 | u32 tmp; | ||
44 | int i = UART_FIFO_SIZE; | ||
45 | |||
46 | __raw_writel(0xC1, UART5_BASE_VA + UART_FCR_OFFSET); | ||
47 | __raw_writel(0xC1, UART3_BASE_VA + UART_FCR_OFFSET); | ||
48 | |||
49 | /* Send a NULL to fix the UART HW bug */ | ||
50 | __raw_writel(0x00, UART5_BASE_VA); | ||
51 | __raw_writel(0x00, UART3_BASE_VA); | ||
52 | |||
53 | while (i--) { | ||
54 | tmp = __raw_readl(UART5_BASE_VA); | ||
55 | tmp = __raw_readl(UART3_BASE_VA); | ||
56 | } | ||
57 | __raw_writel(0, UART5_BASE_VA + UART_FCR_OFFSET); | ||
58 | __raw_writel(0, UART3_BASE_VA + UART_FCR_OFFSET); | ||
59 | |||
60 | /* setup wakeup interrupt */ | ||
61 | start_int_set_rising_edge(SE_U3_RX_INT); | ||
62 | start_int_ack(SE_U3_RX_INT); | ||
63 | start_int_umask(SE_U3_RX_INT); | ||
64 | |||
65 | start_int_set_rising_edge(SE_U5_RX_INT); | ||
66 | start_int_ack(SE_U5_RX_INT); | ||
67 | start_int_umask(SE_U5_RX_INT); | ||
68 | } | ||
69 | |||