2 * Copyright 1998-2009 VIA Technologies, Inc. All Rights Reserved.
3 * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
4 * Copyright 2009 Jonathan Corbet <corbet@lwn.net>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation;
9 * either version 2, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even
13 * the implied warranty of MERCHANTABILITY or FITNESS FOR
14 * A PARTICULAR PURPOSE.See the GNU General Public License
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifndef __VIA_CORE_H__
24 #define __VIA_CORE_H__
25 #include <linux/spinlock.h>
26 #include <linux/pci.h>
29 * A description of each known serial I2C/GPIO port.
39 VIA_MODE_I2C, /* Used as I2C port */
40 VIA_MODE_GPIO, /* Two GPIO ports */
50 #define VIAFB_NUM_PORTS 5
53 enum via_port_type type;
54 enum via_port_mode mode;
60 * This is the global viafb "device" containing stuff needed by
66 struct via_port_cfg *port_cfg;
68 * Spinlock for access to device registers. Not yet
73 * The framebuffer MMIO region. Little, if anything, touches
74 * this memory directly, and certainly nothing outside of the
75 * framebuffer device itself. We *do* have to be able to allocate
76 * chunks of this memory for other devices, though.
78 unsigned long fbmem_start;
82 * The MMIO region for device registers.
84 unsigned long engine_start;
85 unsigned long engine_len;
86 void __iomem *engine_mmio;
90 #endif /* __VIA_CORE_H__ */