]> sourceware.org Git - newlib-cygwin.git/blame - libgloss/arc/emsk-uart-setup.c
arc: libgloss: Add support of EM Starter Kit board
[newlib-cygwin.git] / libgloss / arc / emsk-uart-setup.c
CommitLineData
2935b9e7
YK
1/*
2 * emsk-uart-setup.c -- provide _setup_low_level() to initialize UART.
3 *
4 * Copyright (c) 2024 Synopsys Inc.
5 *
6 * The authors hereby grant permission to use, copy, modify, distribute,
7 * and license this software and its documentation for any purpose, provided
8 * that existing copyright notices are retained in all copies and that this
9 * notice is included verbatim in any distributions. No written agreement,
10 * license, or royalty fee is required for any of the authorized uses.
11 * Modifications to this software may be copyrighted by their authors
12 * and need not follow the licensing terms described here, provided that
13 * the new terms are clearly indicated on the first page of each file where
14 * they apply.
15 *
16 */
17
18#include "uart-8250.h"
19
20/* Setup UART parameters. */
21int
22_setup_low_level (void)
23{
24 const uint32_t aux_dmp_per = 0x20a;
25 void * const uart_base = (char *)__builtin_arc_lr(aux_dmp_per) + 0x00009000;
26 const int uart_aux_mapped = 0;
27 const uint32_t uart_clock = 50000000;
28 const uint32_t uart_baud = 115200;
29
30 _uart_8250_setup (uart_base, uart_aux_mapped, uart_clock, uart_baud);
31
32 return 0;
33}
This page took 0.027741 seconds and 5 git commands to generate.