git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
ppc
/
boot
/
common
/
ns16550.c
diff --git
a/arch/ppc/boot/common/ns16550.c
b/arch/ppc/boot/common/ns16550.c
index
8eb07a6
..
fc5b720
100644
(file)
--- a/
arch/ppc/boot/common/ns16550.c
+++ b/
arch/ppc/boot/common/ns16550.c
@@
-2,17
+2,19
@@
* COM1 NS16550 support
*/
* COM1 NS16550 support
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/serial.h>
#include <linux/types.h>
#include <linux/serial.h>
-#include <linux/serialP.h>
#include <linux/serial_reg.h>
#include <asm/serial.h>
#include <linux/serial_reg.h>
#include <asm/serial.h>
+#if defined(CONFIG_XILINX_VIRTEX)
+#include <platforms/4xx/xparameters/xparameters.h>
+#endif
+#include "nonstdio.h"
+#include "serial.h"
+
#define SERIAL_BAUD 9600
#define SERIAL_BAUD 9600
-extern void outb(int port, unsigned char val);
-extern unsigned char inb(int port);
extern unsigned long ISA_io;
static struct serial_state rs_table[RS_TABLE_SIZE] = {
extern unsigned long ISA_io;
static struct serial_state rs_table[RS_TABLE_SIZE] = {
@@
-23,7
+25,7
@@
static int shift;
unsigned long serial_init(int chan, void *ignored)
{
unsigned long serial_init(int chan, void *ignored)
{
- unsigned long com_port;
+ unsigned long com_port
, base_baud
;
unsigned char lcr, dlm;
/* We need to find out which type io we're expecting. If it's
unsigned char lcr, dlm;
/* We need to find out which type io we're expecting. If it's
@@
-43,6
+45,8
@@
unsigned long serial_init(int chan, void *ignored)
/* How far apart the registers are. */
shift = rs_table[chan].iomem_reg_shift;
/* How far apart the registers are. */
shift = rs_table[chan].iomem_reg_shift;
+ /* Base baud.. */
+ base_baud = rs_table[chan].baud_base;
/* save the LCR */
lcr = inb(com_port + (UART_LCR << shift));
/* save the LCR */
lcr = inb(com_port + (UART_LCR << shift));
@@
-62,9
+66,9
@@
unsigned long serial_init(int chan, void *ignored)
else {
/* Input clock. */
outb(com_port + (UART_DLL << shift),
else {
/* Input clock. */
outb(com_port + (UART_DLL << shift),
- (
BASE_BAUD
/ SERIAL_BAUD) & 0xFF);
+ (
base_baud
/ SERIAL_BAUD) & 0xFF);
outb(com_port + (UART_DLM << shift),
outb(com_port + (UART_DLM << shift),
- (
BASE_BAUD
/ SERIAL_BAUD) >> 8);
+ (
base_baud
/ SERIAL_BAUD) >> 8);
/* 8 data, 1 stop, no parity */
outb(com_port + (UART_LCR << shift), 0x03);
/* RTS/DTR */
/* 8 data, 1 stop, no parity */
outb(com_port + (UART_LCR << shift), 0x03);
/* RTS/DTR */