aboutsummaryrefslogtreecommitdiff
path: root/arch/tile/include/asm/vga.h
blob: 7b46e754d611c8852b03a920ad7531f65bab6a58 (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
/*
 * Copyright 2010 Tilera Corporation. All Rights Reserved.
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU General Public License
 *   as published by the Free Software Foundation, version 2.
 *
 *   This program is distributed in the hope that it will be useful, but
 *   WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 *   NON INFRINGEMENT.  See the GNU General Public License for
 *   more details.
 *
 * Access to VGA videoram.
 */

#ifndef _ASM_TILE_VGA_H
#define _ASM_TILE_VGA_H

#include <asm/io.h>

#define VT_BUF_HAVE_RW

static inline void scr_writew(u16 val, volatile u16 *addr)
{
	__raw_writew(val, (volatile u16 __iomem *) addr);
}

static inline u16 scr_readw(volatile const u16 *addr)
{
	return __raw_readw((volatile const u16 __iomem *) addr);
}

#define vga_readb(a)	readb((u8 __iomem *)(a))
#define vga_writeb(v,a)	writeb(v, (u8 __iomem *)(a))

#define VGA_MAP_MEM(x,s)	((unsigned long) ioremap(x, s))

#endif