2 * TI OMAP processors UART emulation.
4 * Copyright (C) 2006-2008 Andrzej Zaborowski <balrog@zabor.org>
5 * Copyright (C) 2007-2009 Nokia Corporation
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 or
10 * (at your option) version 3 of the License.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, see <http://www.gnu.org/licenses/>.
20 #include "qemu/osdep.h"
21 #include "chardev/char.h"
22 #include "hw/arm/omap.h"
23 #include "hw/char/serial-mm.h"
24 #include "exec/address-spaces.h"
30 SerialMM
*serial
; /* TODO */
41 void omap_uart_reset(struct omap_uart_s
*s
)
50 struct omap_uart_s
*omap_uart_init(hwaddr base
,
51 qemu_irq irq
, omap_clk fclk
, omap_clk iclk
,
52 qemu_irq txdma
, qemu_irq rxdma
,
53 const char *label
, Chardev
*chr
)
55 struct omap_uart_s
*s
= g_new0(struct omap_uart_s
, 1);
60 s
->serial
= serial_mm_init(get_system_memory(), base
, 2, irq
,
61 omap_clk_getrate(fclk
) / 16,
62 chr
?: qemu_chr_new(label
, "null", NULL
),
63 DEVICE_NATIVE_ENDIAN
);