# generated from XKB map lt include common map 0x427 exclam 0x02 shift aogonek 0x02 altgr Aogonek 0x02 shift altgr at 0x03 shift ccaron 0x03 altgr Ccaron 0x03 shift altgr numbersign 0x04 shift eogonek 0x04 altgr Eogonek 0x04 shift altgr dollar 0x05 shift eabovedot 0x05 altgr Eabovedot 0x05 shift altgr percent 0x06 shift iogonek 0x06 altgr Iogonek 0x06 shift altgr asciicircum 0x07 shift scaron 0x07 altgr Scaron 0x07 shift altgr ampersand 0x08 shift uogonek 0x08 altgr Uogonek 0x08 shift altgr asterisk 0x09 shift umacron 0x09 altgr Umacron 0x09 shift altgr parenleft 0x0a shift doublelowquotemark 0x0a altgr parenright 0x0b shift leftdoublequotemark 0x0b altgr minus 0x0c underscore 0x0c shift equal 0x0d plus 0x0d shift zcaron 0x0d altgr Zcaron 0x0d shift altgr bracketleft 0x1a braceleft 0x1a shift bracketright 0x1b braceright 0x1b shift semicolon 0x27 colon 0x27 shift apostrophe 0x28 quotedbl 0x28 shift grave 0x29 asciitilde 0x29 shift backslash 0x2b bar 0x2b shift comma 0x33 less 0x33 shift period 0x34 greater 0x34 shift slash 0x35 question 0x35 shift endash 0x56 EuroSign 0x56 shift ion> upstream openwrtJames
aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/lzma-loader/src/board-mt7621.c
blob: b90b2ed89fcf807830886abc0f5db19f493bf770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Arch specific code for mt7621 based boards, based on code for Ralink boards
 *
 * Copyright (C) 2018 Tobias Schramm <tobleminer@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation.
 */

#include <stddef.h>
#include <stdint.h>
#include "config.h"

#define READREG(r)		*(volatile uint32_t *)(r)
#define WRITEREG(r,v)		*(volatile uint32_t *)(r) = v

#define KSEG1ADDR(_x)		(((_x) & 0x1fffffff) | 0xa0000000)

#define UART_BASE		0xBE000C00

#define UART_TBR_OFFSET		0x00
#define UART_LSR_OFFSET		0x14

#define UART_LSR_TEMT		(1 << 6)

#define UART_READ(r)		READREG(UART_BASE + (r))
#define UART_WRITE(r,v)		WRITEREG(UART_BASE + (r), (v))

void board_putc(int ch)
{
	while (((UART_READ(UART_LSR_OFFSET)) & UART_LSR_TEMT) == 0);
	UART_WRITE(UART_TBR_OFFSET, ch);
	while (((UART_READ(UART_LSR_OFFSET)) & UART_LSR_TEMT) == 0);
}

void board_init(void)
{
}