mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Most substantive change is getting rid of 'initialized', which was only ever needed in v2 due to an implementation mistake. With Uwe's comments taken into account, Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@961 f3766cd6-281f-0410-b1cd-43a5c92072e9
61 lines
1.9 KiB
C
61 lines
1.9 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright (C) 2007 coresystems GmbH
|
|
* (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
|
|
*
|
|
* 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; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* 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. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include <types.h>
|
|
#include <console.h>
|
|
#include <device/device.h>
|
|
#include <device/pci.h>
|
|
#include <device/pci_ids.h>
|
|
#include <string.h>
|
|
#include <keyboard.h>
|
|
|
|
static void setup_onboard(struct device *dev)
|
|
{
|
|
struct pc_keyboard conf;
|
|
|
|
printk(BIOS_INFO, "Init VGA device\n");
|
|
|
|
dev->rom_address = 0xc0000;
|
|
|
|
/*
|
|
* FIXME: This should be in the Super I/O code some day,
|
|
* but since QEMU has no Super I/O...
|
|
* we need to create superio/emulation/qemu and move the keyboard
|
|
* bits there.
|
|
*/
|
|
init_pc_keyboard(0x60, 0x64, &conf);
|
|
/* now run the rom */
|
|
pci_dev_init(dev);
|
|
}
|
|
|
|
struct device_operations qemuvga_pci_ops_dev = {
|
|
.id = {.type = DEVICE_ID_PCI,
|
|
{.pci = {.vendor = PCI_VENDOR_ID_CIRRUS,
|
|
.device = PCI_DEVICE_ID_CIRRUS_5446}}},
|
|
.constructor = default_device_constructor,
|
|
.phase3_scan = 0,
|
|
.phase4_read_resources = pci_dev_read_resources,
|
|
.phase4_set_resources = pci_dev_set_resources,
|
|
.phase5_enable_resources = pci_dev_enable_resources,
|
|
.phase6_init = setup_onboard,
|
|
.ops_pci = &pci_dev_ops_pci,
|
|
};
|
|
|