Linux Audio

Check our new training course

Loading...
v3.15
 1/*
 2 * This file is subject to the terms and conditions of the GNU General Public
 3 * License.  See the file "COPYING" in the main directory of this archive
 4 * for more details.
 5 *
 6 * Copyright (C) 2001, 2002 Ralf Baechle
 7 */
 8
 9#include <asm/page.h>
 
10#include <asm/sn/addrs.h>
11#include <asm/sn/sn0/hub.h>
12#include <asm/sn/klconfig.h>
13#include <asm/sn/ioc3.h>
14#include <asm/sn/sn_private.h>
15
16#include <linux/serial.h>
17#include <linux/serial_core.h>
18
 
 
19#define IOC3_CLK	(22000000 / 3)
20#define IOC3_FLAGS	(0)
21
22static inline struct ioc3_uartregs *console_uart(void)
23{
24	struct ioc3 *ioc3;
25	nasid_t nasid;
26
27	nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
28	ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
29
30	return &ioc3->sregs.uarta;
31}
32
33void prom_putchar(char c)
34{
35	struct ioc3_uartregs *uart = console_uart();
36
37	while ((uart->iu_lsr & 0x20) == 0);
38	uart->iu_thr = c;
 
39}
v5.9
 1/*
 2 * This file is subject to the terms and conditions of the GNU General Public
 3 * License.  See the file "COPYING" in the main directory of this archive
 4 * for more details.
 5 *
 6 * Copyright (C) 2001, 2002 Ralf Baechle
 7 */
 8
 9#include <asm/page.h>
10#include <asm/setup.h>
11#include <asm/sn/addrs.h>
12#include <asm/sn/agent.h>
13#include <asm/sn/klconfig.h>
14#include <asm/sn/ioc3.h>
 
15
16#include <linux/serial.h>
17#include <linux/serial_core.h>
18
19#include "ip27-common.h"
20
21#define IOC3_CLK	(22000000 / 3)
22#define IOC3_FLAGS	(0)
23
24static inline struct ioc3_uartregs *console_uart(void)
25{
26	struct ioc3 *ioc3;
27	nasid_t nasid;
28
29	nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
30	ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
31
32	return &ioc3->sregs.uarta;
33}
34
35void prom_putchar(char c)
36{
37	struct ioc3_uartregs *uart = console_uart();
38
39	while ((readb(&uart->iu_lsr) & 0x20) == 0)
40		;
41	writeb(c, &uart->iu_thr);
42}