171d7fec4Smrg/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/panel.c,v 1.2 2002/12/11 22:51:00 dawes Exp $ */ 271d7fec4Smrg/* 371d7fec4Smrg * $Workfile: panel.c $ 471d7fec4Smrg * $Revision: 1.1.1.1 $ 571d7fec4Smrg * $Author: mrg $ 671d7fec4Smrg * 771d7fec4Smrg * File Contents: This file contailns the panel include files and 871d7fec4Smrg * external pointer to the hardware. 971d7fec4Smrg * 1071d7fec4Smrg * Project: Geode Xfree Frame buffer device driver. 1171d7fec4Smrg * 1271d7fec4Smrg */ 1371d7fec4Smrg 1471d7fec4Smrg/* 1571d7fec4Smrg * NSC_LIC_ALTERNATIVE_PREAMBLE 1671d7fec4Smrg * 1771d7fec4Smrg * Revision 1.0 1871d7fec4Smrg * 1971d7fec4Smrg * National Semiconductor Alternative GPL-BSD License 2071d7fec4Smrg * 2171d7fec4Smrg * National Semiconductor Corporation licenses this software 2271d7fec4Smrg * ("Software"): 2371d7fec4Smrg * 2471d7fec4Smrg * Panel Library 2571d7fec4Smrg * 2671d7fec4Smrg * under one of the two following licenses, depending on how the 2771d7fec4Smrg * Software is received by the Licensee. 2871d7fec4Smrg * 2971d7fec4Smrg * If this Software is received as part of the Linux Framebuffer or 3071d7fec4Smrg * other GPL licensed software, then the GPL license designated 3171d7fec4Smrg * NSC_LIC_GPL applies to this Software; in all other circumstances 3271d7fec4Smrg * then the BSD-style license designated NSC_LIC_BSD shall apply. 3371d7fec4Smrg * 3471d7fec4Smrg * END_NSC_LIC_ALTERNATIVE_PREAMBLE */ 3571d7fec4Smrg 3671d7fec4Smrg/* NSC_LIC_BSD 3771d7fec4Smrg * 3871d7fec4Smrg * National Semiconductor Corporation Open Source License for 3971d7fec4Smrg * 4071d7fec4Smrg * Panel Library 4171d7fec4Smrg * 4271d7fec4Smrg * (BSD License with Export Notice) 4371d7fec4Smrg * 4471d7fec4Smrg * Copyright (c) 1999-2001 4571d7fec4Smrg * National Semiconductor Corporation. 4671d7fec4Smrg * All rights reserved. 4771d7fec4Smrg * 4871d7fec4Smrg * Redistribution and use in source and binary forms, with or without 4971d7fec4Smrg * modification, are permitted provided that the following conditions 5071d7fec4Smrg * are met: 5171d7fec4Smrg * 5271d7fec4Smrg * * Redistributions of source code must retain the above copyright 5371d7fec4Smrg * notice, this list of conditions and the following disclaimer. 5471d7fec4Smrg * 5571d7fec4Smrg * * Redistributions in binary form must reproduce the above 5671d7fec4Smrg * copyright notice, this list of conditions and the following 5771d7fec4Smrg * disclaimer in the documentation and/or other materials provided 5871d7fec4Smrg * with the distribution. 5971d7fec4Smrg * 6071d7fec4Smrg * * Neither the name of the National Semiconductor Corporation nor 6171d7fec4Smrg * the names of its contributors may be used to endorse or promote 6271d7fec4Smrg * products derived from this software without specific prior 6371d7fec4Smrg * written permission. 6471d7fec4Smrg * 6571d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6671d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6771d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 6871d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 6971d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 7071d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 7171d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 7271d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 7371d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 7471d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 7571d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 7671d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 7771d7fec4Smrg * OF SUCH DAMAGE. 7871d7fec4Smrg * 7971d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 8071d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with 8171d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under 8271d7fec4Smrg * CURRENT (2001) U.S. export regulations this software 8371d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or 8471d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 8571d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 8671d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S. 8771d7fec4Smrg * has embargoed goods and services. 8871d7fec4Smrg * 8971d7fec4Smrg * END_NSC_LIC_BSD */ 9071d7fec4Smrg 9171d7fec4Smrg/* NSC_LIC_GPL 9271d7fec4Smrg * 9371d7fec4Smrg * National Semiconductor Corporation Gnu General Public License for 9471d7fec4Smrg * 9571d7fec4Smrg * Panel Library 9671d7fec4Smrg * 9771d7fec4Smrg * (GPL License with Export Notice) 9871d7fec4Smrg * 9971d7fec4Smrg * Copyright (c) 1999-2001 10071d7fec4Smrg * National Semiconductor Corporation. 10171d7fec4Smrg * All rights reserved. 10271d7fec4Smrg * 10371d7fec4Smrg * Redistribution and use in source and binary forms, with or without 10471d7fec4Smrg * modification, are permitted under the terms of the GNU General 10571d7fec4Smrg * Public License as published by the Free Software Foundation; either 10671d7fec4Smrg * version 2 of the License, or (at your option) any later version 10771d7fec4Smrg * 10871d7fec4Smrg * In addition to the terms of the GNU General Public License, neither 10971d7fec4Smrg * the name of the National Semiconductor Corporation nor the names of 11071d7fec4Smrg * its contributors may be used to endorse or promote products derived 11171d7fec4Smrg * from this software without specific prior written permission. 11271d7fec4Smrg * 11371d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11471d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11571d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 11671d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 11771d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 11871d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 11971d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 12071d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 12171d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 12271d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 12371d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 12471d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 12571d7fec4Smrg * OF SUCH DAMAGE. See the GNU General Public License for more details. 12671d7fec4Smrg * 12771d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 12871d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with 12971d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under 13071d7fec4Smrg * CURRENT (2001) U.S. export regulations this software 13171d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or 13271d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 13371d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 13471d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S. 13571d7fec4Smrg * has embargoed goods and services. 13671d7fec4Smrg * 13771d7fec4Smrg * You should have received a copy of the GNU General Public License 13871d7fec4Smrg * along with this file; if not, write to the Free Software Foundation, 13971d7fec4Smrg * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14071d7fec4Smrg * 14171d7fec4Smrg * END_NSC_LIC_GPL */ 14271d7fec4Smrg 14371d7fec4Smrg#ifdef HAVE_CONFIG_H 14471d7fec4Smrg#include "config.h" 14571d7fec4Smrg#endif 14671d7fec4Smrg 14771d7fec4Smrg#if defined(linux) /* Linux */ 14871d7fec4Smrg 14971d7fec4Smrg#ifdef __KERNEL__ 15071d7fec4Smrg 15171d7fec4Smrg#include <linux/string.h> 15271d7fec4Smrg#include <asm/io.h> 15371d7fec4Smrg 15471d7fec4Smrg#elif !defined(XFree86Server) 15571d7fec4Smrg 15671d7fec4Smrg#include <linux/fs.h> 15771d7fec4Smrg#include <asm/mman.h> 15871d7fec4Smrg 15971d7fec4Smrg#endif /* __KERNEL__ */ 16071d7fec4Smrg#elif defined(_WIN32) /* windows */ 16171d7fec4Smrg 16271d7fec4Smrg#include <windows.h> 16371d7fec4Smrg 16471d7fec4Smrg#endif 16571d7fec4Smrg 16671d7fec4Smrg#include "panel.h" 16771d7fec4Smrg#include "gfx_defs.h" 16871d7fec4Smrg#include "nsc.h" 16971d7fec4Smrg 17071d7fec4Smrg#define PLATFORM_DYNAMIC 1 /* runtime selection */ 17171d7fec4Smrg#define PLATFORM_DRACO 0 /* Draco + 9210 */ 17271d7fec4Smrg#define PLATFORM_CENTAURUS 1 /* Centaurus + 9211 RevA */ 17371d7fec4Smrg#define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */ 17471d7fec4Smrg#define PLATFORM_GX2BASED 1 /* Redcloud */ 17571d7fec4Smrg 17671d7fec4Smrgunsigned char *XpressROMPtr; 17771d7fec4Smrg 17871d7fec4Smrg#include "pnl_init.c" 17971d7fec4Smrg#include "pnl_bios.c" 180