Convert some comments to proper Doxygen syntax.
[coreboot.git] / src / southbridge / sis / sis966 / sis761.c
index b4eb48d559f229a982ad5460deac048a1d9c1d12..3d7bc470d3f3e34cf664800ff4cfc13f873d16ca 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * This file is part of the coreboot project.
  *
+ * Copyright (C) 2007 Silicon Integrated Systems Corp. (SiS)
+ * Written by Morgan Tsai <my_tsai@sis.com> for SiS.
+ *
  * 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
@@ -14,7 +17,9 @@
  * 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
- *
+ */
+
+/*
  * Turn off machine check triggers when reading
  * pci space where there are no devices.
  * This is necessary when scaning the bus for
@@ -24,9 +29,6 @@
  *
  *  - Athlon64 workarounds by Stefan Reinauer
  *  - "reset once" logic by Yinghai Lu
- * Copyright (C) 2007 Silicon Integrated Systems Corp. (SiS)
- * Written by Morgan Tsai <my_tsai@sis.com> for SiS.
- *
  */
 
 #include <console/console.h>
 #include <cpu/amd/model_fxx_rev.h>
 #include <arch/io.h>
 
-/**
- * @brief Read resources for AGP aperture
- *
- * @param
- *
- * There is only one AGP aperture resource needed. The resoruce is added to
- * the northbridge of BSP.
- *
- * The same trick can be used to augment legacy VGA resources which can
- * be detect by generic pci reousrce allocator for VGA devices.
- * BAD: it is more tricky than I think, the resource allocation code is
- * implemented in a way to NOT DOING legacy VGA resource allcation on
- * purpose :-(.
- */
-
-
 typedef struct msr_struct
 {
        unsigned lo;
@@ -69,30 +55,44 @@ static inline msr_t rdmsr(unsigned index)
        return result;
 }
 
+/**
+ * Read resources for AGP aperture.
+ *
+ * There is only one AGP aperture resource needed. The resoruce is added to
+ * the northbridge of BSP.
+ *
+ * The same trick can be used to augment legacy VGA resources which can
+ * be detect by generic PCI resource allocator for VGA devices.
+ * BAD: it is more tricky than I think, the resource allocation code is
+ * implemented in a way to NOT DOING legacy VGA resource allcation on
+ * purpose :-(.
+ *
+ * @param dev TODO
+ */
 static void sis761_read_resources(device_t dev)
 {
        /* Read the generic PCI resources */
-       printk_debug("sis761_read_resources ------->\n");
+       printk(BIOS_DEBUG, "sis761_read_resources ------->\n");
        pci_dev_read_resources(dev);
 
        /* If we are not the first processor don't allocate the gart apeture */
        if (dev->path.pci.devfn != PCI_DEVFN(0x0, 0)) {
-               printk_debug("sis761_not_the_first_processor !!!\n");
+               printk(BIOS_DEBUG, "sis761_not_the_first_processor !!!\n");
                return;
        }
 
-       printk_debug("sis761_read_resources <-------\n");
+       printk(BIOS_DEBUG, "sis761_read_resources <-------\n");
        return;
 
 }
 
 static void sis761_set_resources(device_t dev)
 {
-       printk_debug("sis761_set_resources ------->\n");
+       printk(BIOS_DEBUG, "sis761_set_resources ------->\n");
 
        /* Set the generic PCI resources */
        pci_dev_set_resources(dev);
-       printk_debug("sis761_set_resources <-------\n");
+       printk(BIOS_DEBUG, "sis761_set_resources <-------\n");
 }
 
 static void sis761_init(struct device *dev)
@@ -102,14 +102,14 @@ static void sis761_init(struct device *dev)
 
 
        needs_reset = 0;
-       printk_debug("sis761_init: ---------->\n");
+       printk(BIOS_DEBUG, "sis761_init: ---------->\n");
 
        msr = rdmsr(0xC001001A);
        pci_write_config16(dev, 0x8E, msr.lo >> 16);                            // Topbound
        pci_write_config8(dev, 0x7F, 0x08);                     // ACPI Base
        outb(inb(0x856) | 0x40, 0x856);  // Auto-Reset Function
 
-       printk_debug("sis761_init: <----------\n");
+       printk(BIOS_DEBUG, "sis761_init: <----------\n");
 }