-/* Copyright 2004 Linux Networx */
-/* This code is distrubted wihtout warrant under the GPL v2 (see COPYING) */
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2004 Linux Networx
+ * (Written by Eric Biederman <ebiederman@lnxi.com> for Linux Networx)
+ * Copyright (C) 2004 Li-Ta Lo <ollie@lanl.gov>
+ * Copyright (C) 2005 Tyan
+ * (Written by Yinghai Lu <yhlu@tyan.com> for Tyan)
+ *
+ * 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 of the License.
+ *
+ * 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 <console/console.h>
#include <stdlib.h>
pnp_write_config(dev, index, irq);
}
-void pnp_set_drq(device_t dev, unsigned drq, unsigned index)
+void pnp_set_drq(device_t dev, unsigned index, unsigned drq)
{
/* Index == 0x74 */
pnp_write_config(dev, index, drq & 0xff);
static void pnp_set_resource(device_t dev, struct resource *resource)
{
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
- printk_err("ERROR: %s %02x not allocated\n",
- dev_path(dev), resource->index);
+ printk_err("ERROR: %s %02x %s size: 0x%010Lx not assigned\n",
+ dev_path(dev), resource->index,
+ resource_type(resource),
+ resource->size);
return;
}
/* Setup the ops and resources on the newly allocated devices */
for(i = 0; i < functions; i++) {
+ /* Skip logical devices this Super I/O doesn't have. */
+ if (info[i].function == -1)
+ continue;
+
path.u.pnp.device = info[i].function;
dev = alloc_find_dev(base_dev->bus, &path);