diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-07-29 16:58:52 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 16:54:42 -0400 |
commit | 8d60a903d986ffa26c41f0092320a3b9da20bfaf (patch) | |
tree | f05a8ae48e275d55fcfd3acfb7b3b1b601da56ea /arch/mips/sibyte/swarm/dbg_io.c | |
parent | 8f8da9adebdf04bfb3b812a7de8706fbf179fd2c (diff) |
[MIPS] kgdb: Remove existing implementation
This patch explicitly removes the kgdb implementation, for mips which
is intended to be followed by a patch that adds a kgdb implementation
for MIPS that makes use of the kgdb core in the kernel.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte/swarm/dbg_io.c')
-rw-r--r-- | arch/mips/sibyte/swarm/dbg_io.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/mips/sibyte/swarm/dbg_io.c b/arch/mips/sibyte/swarm/dbg_io.c deleted file mode 100644 index b97ae3048482..000000000000 --- a/arch/mips/sibyte/swarm/dbg_io.c +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * kgdb debug routines for SiByte boards. | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software Inc. | ||
5 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | /* -------------------- BEGINNING OF CONFIG --------------------- */ | ||
15 | |||
16 | #include <linux/delay.h> | ||
17 | #include <asm/io.h> | ||
18 | #include <asm/sibyte/sb1250.h> | ||
19 | #include <asm/sibyte/sb1250_regs.h> | ||
20 | #include <asm/sibyte/sb1250_uart.h> | ||
21 | #include <asm/sibyte/sb1250_int.h> | ||
22 | #include <asm/addrspace.h> | ||
23 | |||
24 | /* | ||
25 | * We use the second serial port for kgdb traffic. | ||
26 | * 115200, 8, N, 1. | ||
27 | */ | ||
28 | |||
29 | #define BAUD_RATE 115200 | ||
30 | #define CLK_DIVISOR V_DUART_BAUD_RATE(BAUD_RATE) | ||
31 | #define DATA_BITS V_DUART_BITS_PER_CHAR_8 /* or 7 */ | ||
32 | #define PARITY V_DUART_PARITY_MODE_NONE /* or even */ | ||
33 | #define STOP_BITS M_DUART_STOP_BIT_LEN_1 /* or 2 */ | ||
34 | |||
35 | static int duart_initialized = 0; /* 0: need to be init'ed by kgdb */ | ||
36 | |||
37 | /* -------------------- END OF CONFIG --------------------- */ | ||
38 | extern int kgdb_port; | ||
39 | |||
40 | #define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port, reg))) | ||
41 | #define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port, reg))) | ||
42 | |||
43 | void putDebugChar(unsigned char c); | ||
44 | unsigned char getDebugChar(void); | ||
45 | static void | ||
46 | duart_init(int clk_divisor, int data, int parity, int stop) | ||
47 | { | ||
48 | duart_out(R_DUART_MODE_REG_1, data | parity); | ||
49 | duart_out(R_DUART_MODE_REG_2, stop); | ||
50 | duart_out(R_DUART_CLK_SEL, clk_divisor); | ||
51 | |||
52 | duart_out(R_DUART_CMD, M_DUART_RX_EN | M_DUART_TX_EN); /* enable rx and tx */ | ||
53 | } | ||
54 | |||
55 | void | ||
56 | putDebugChar(unsigned char c) | ||
57 | { | ||
58 | if (!duart_initialized) { | ||
59 | duart_initialized = 1; | ||
60 | duart_init(CLK_DIVISOR, DATA_BITS, PARITY, STOP_BITS); | ||
61 | } | ||
62 | while ((duart_in(R_DUART_STATUS) & M_DUART_TX_RDY) == 0); | ||
63 | duart_out(R_DUART_TX_HOLD, c); | ||
64 | } | ||
65 | |||
66 | unsigned char | ||
67 | getDebugChar(void) | ||
68 | { | ||
69 | if (!duart_initialized) { | ||
70 | duart_initialized = 1; | ||
71 | duart_init(CLK_DIVISOR, DATA_BITS, PARITY, STOP_BITS); | ||
72 | } | ||
73 | while ((duart_in(R_DUART_STATUS) & M_DUART_RX_RDY) == 0) ; | ||
74 | return duart_in(R_DUART_RX_HOLD); | ||
75 | } | ||
76 | |||