blob: 42fa10db619a86789680d2e29c4692646a923b21 [file] [log] [blame]
Andres Salomonab06aaf2008-04-28 02:14:58 -07001/*
2 * Copyright (C) 2008 Andres Salomon <dilinger@debian.org>
3 *
4 * Geode GX2 register tables
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11#ifndef _GXFB_H_
12#define _GXFB_H_
13
14#include <linux/io.h>
15
16static inline uint32_t read_dc(struct geodefb_par *par, int reg)
17{
18 return readl(par->dc_regs + reg);
19}
20
21static inline void write_dc(struct geodefb_par *par, int reg, uint32_t val)
22{
23 writel(val, par->dc_regs + reg);
24
25}
26
27static inline uint32_t read_vp(struct geodefb_par *par, int reg)
28{
29 return readl(par->vid_regs + reg);
30}
31
32static inline void write_vp(struct geodefb_par *par, int reg, uint32_t val)
33{
34 writel(val, par->vid_regs + reg);
35}
36
37static inline uint32_t read_fp(struct geodefb_par *par, int reg)
38{
39 return readl(par->vid_regs + reg);
40}
41
42static inline void write_fp(struct geodefb_par *par, int reg, uint32_t val)
43{
44 writel(val, par->vid_regs + reg);
45}
46
47#endif