Author: uwe
Date: 2007-09-09 21:43:31 +0200 (Sun, 09 Sep 2007)
New Revision: 2766
Removed:
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/debug.c
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/reset.c
Modified:
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Config.lb
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Options.lb
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/cache_as_ram_auto.c
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/chip.h
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/irq_tables.c
trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/mainboard.c
Log:
Partial changes and fixup.
Removed reset.c and added copyright headers.
Remove debug.c. It is not used and should not be here.
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Config.lb
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Config.lb 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Config.lb 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,4 +1,24 @@
##
+## This file is part of the LinuxBIOS project.
+##
+## Copyright (C) 2006-2007 Ronald G. Minnich <rminnich(a)gmail.com>
+##
+## 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
+##
+
+##
## Compute the location and size of where this firmware image
## (linuxBIOS plus bootloader) will live in the boot rom chip.
##
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Options.lb
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Options.lb 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/Options.lb 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,3 +1,23 @@
+##
+## This file is part of the LinuxBIOS project.
+##
+## Copyright (C) 2006-2007 Ronald G. Minnich <rminnich(a)gmail.com>
+##
+## 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
+##
+
uses HAVE_MP_TABLE
uses HAVE_PIRQ_TABLE
uses USE_FALLBACK_IMAGE
@@ -83,7 +103,7 @@
## Build code to export a programmable irq routing table
##
default HAVE_PIRQ_TABLE=1
-default IRQ_SLOT_COUNT=6
+default IRQ_SLOT_COUNT=9
#object irq_tables.o
##
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/cache_as_ram_auto.c
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/cache_as_ram_auto.c 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/cache_as_ram_auto.c 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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
+ */
+
#define ASSEMBLY 1
#include <stdint.h>
@@ -92,8 +111,8 @@
sdram_initialize(1, memctrl);
- /* Check all of memory */
- ram_check(0x00000000, 640*1024);
+ /* Check memory */
+ ram_check(0x00000000, 640 * 1024);
/* Switch from Cache as RAM to real RAM */
/* There are two ways we could think about this.
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/chip.h
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/chip.h 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/chip.h 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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
+ */
+
extern struct chip_operations mainboard_pcengines_alix1c_ops;
struct mainboard_pcengines_alix1c_config {
Deleted: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/debug.c
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/debug.c 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/debug.c 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,66 +0,0 @@
-
-static void print_debug_pci_dev(unsigned dev)
-{
- print_debug("PCI: ");
- print_debug_hex8((dev >> 16) & 0xff);
- print_debug_char(':');
- print_debug_hex8((dev >> 11) & 0x1f);
- print_debug_char('.');
- print_debug_hex8((dev >> 8) & 7);
-}
-
-static void print_pci_devices(void)
-{
- device_t dev;
- for(dev = PCI_DEV(0, 0, 0);
- dev <= PCI_DEV(0, 0x1f, 0x7);
- dev += PCI_DEV(0,0,1)) {
- uint32_t id;
- id = pci_read_config32(dev, PCI_VENDOR_ID);
- if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0x0000)) {
- continue;
- }
- print_debug_pci_dev(dev);
- print_debug("\r\n");
- }
-}
-
-static void dump_pci_device(unsigned dev)
-{
- int i;
- print_debug_pci_dev(dev);
- print_debug("\r\n");
-
- for(i = 0; i <= 255; i++) {
- unsigned char val;
- if ((i & 0x0f) == 0) {
- print_debug_hex8(i);
- print_debug_char(':');
- }
- val = pci_read_config8(dev, i);
- print_debug_char(' ');
- print_debug_hex8(val);
- if ((i & 0x0f) == 0x0f) {
- print_debug("\r\n");
- }
- }
-}
-
-static void dump_pci_devices(void)
-{
- device_t dev;
- for(dev = PCI_DEV(0, 0, 0);
- dev <= PCI_DEV(0, 0x1f, 0x7);
- dev += PCI_DEV(0,0,1)) {
- uint32_t id;
- id = pci_read_config32(dev, PCI_VENDOR_ID);
- if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0x0000)) {
- continue;
- }
- dump_pci_device(dev);
- }
-}
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/irq_tables.c
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/irq_tables.c 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/irq_tables.c 2007-09-09 19:43:31 UTC (rev 2766)
@@ -44,7 +44,7 @@
const struct irq_routing_table intel_irq_routing_table = {
PIRQ_SIGNATURE, /* u32 signature */
PIRQ_VERSION, /* u16 version */
- 32+16*9, /* There can be total 9 devices on the bus */
+ 32+16*IRQ_SLOT_COUNT, /* There can be total IRQ_SLOT_COUNT devices on the bus */
0x00, /* Where the interrupt router lies (bus) */
(0x0f<<3)|0x0, /* Where the interrupt router lies (dev) */
0, /* IRQs devoted exclusively to PCI usage */
Modified: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/mainboard.c
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/mainboard.c 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/mainboard.c 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 <device/device.h>
#include <device/pci.h>
@@ -135,20 +154,19 @@
#endif //DEFAULT_CONSOLE_LOGLEVEL >= BIOS_ERR
}
-static void init(struct device *dev) {
-
+static void init(struct device *dev)
+{
printk_debug("ALIX1C ENTER %s\n", __FUNCTION__);
-
printk_debug("ALIX1C EXIT %s\n", __FUNCTION__);
}
static void enable_dev(struct device *dev)
{
- dev->ops->init = init;
+ dev->ops->init = init;
}
struct chip_operations mainboard_pcengines_alix1c_ops = {
- CHIP_NAME("PC ENGINES ALIX1C Mainboard")
- .enable_dev = enable_dev,
+ CHIP_NAME("PC Engines ALIX1.C Mainboard")
+ .enable_dev = enable_dev,
};
Deleted: trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/reset.c
===================================================================
--- trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/reset.c 2007-09-08 18:32:53 UTC (rev 2765)
+++ trunk/LinuxBIOSv2/src/mainboard/pcengines/alix1c/reset.c 2007-09-09 19:43:31 UTC (rev 2766)
@@ -1,43 +0,0 @@
-#if 0
-//#include "arch/romcc_io.h"
-#include <arch/io.h>
-
-typedef unsigned device_t;
-
-#define PCI_DEV(BUS, DEV, FN) ( \
- (((BUS) & 0xFF) << 16) | \
- (((DEV) & 0x1f) << 11) | \
- (((FN) & 0x7) << 8))
-
-static void pci_write_config8(device_t dev, unsigned where, unsigned char value)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- outb(value, 0xCFC + (addr & 3));
-}
-
-static void pci_write_config32(device_t dev, unsigned where, unsigned value)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- outl(value, 0xCFC);
-}
-
-static unsigned pci_read_config32(device_t dev, unsigned where)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- return inl(0xCFC);
-}
-
-#include "../../../northbridge/amd/amdk8/reset_test.c"
-
-void hard_reset(void)
-{
- set_bios_reset();
- pci_write_config8(PCI_DEV(1, 0x04, 0), 0x47, 1);
-}
-#endif