Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / mainboard / technologic / ts5300 / mainboard.c
index 29a08f57846e0f759ce08201c117d762d4fa8d22..58333b8f887805fd3558b80d57bd5d555ee699fc 100644 (file)
@@ -7,7 +7,8 @@
 #include "chip.h"
 
 
-static void irqdump()
+#if 0
+static void irqdump(void)
 {
   volatile unsigned char *irq;
   void *mmcr;
@@ -16,37 +17,37 @@ static void irqdump()
   int i;
   int irqlist[] = {0xd00, 0xd02, 0xd03, 0xd04, 0xd08, 0xd0a,
                0xd14, 0xd18, 0xd1a, 0xd1b, 0xd1c,
-               0xd20, 0xd21, 0xd22, 0xd28, 0xd29, 
+               0xd20, 0xd21, 0xd22, 0xd28, 0xd29,
                0xd30, 0xd31, 0xd32, 0xd33,
-               0xd40, 0xd41, 0xd42, 0xd43,0xd44, 0xd45, 0xd46, 
-               0xd50, 0xd51, 0xd52, 0xd53,0xd54, 0xd55, 0xd56, 0xd57,0xd58, 0xd59, 0xd5a, 
+               0xd40, 0xd41, 0xd42, 0xd43,0xd44, 0xd45, 0xd46,
+               0xd50, 0xd51, 0xd52, 0xd53,0xd54, 0xd55, 0xd56, 0xd57,0xd58, 0xd59, 0xd5a,
                -1};
   mmcr = (void *) 0xfffef000;
 
-  printk_err("mmcr is %p\n", mmcr);
+  printk(BIOS_ERR, "mmcr is %p\n", mmcr);
   for(i = 0; irqlist[i] >= 0; i++) {
     irq = mmcr + irqlist[i];
-    printk_err("0x%x register @%p is 0x%lx\n", irqlist[i], irq, *irq);
+    printk(BIOS_ERR, "0x%x register @%p is 0x%x\n", irqlist[i], irq, *irq);
   }
 
 }
+#endif
 
 /* TODO: finish up mmcr struct in sc520.h, and;
    - set ADDDECTL (now done in raminit.c in cpu/amd/sc520
 */
 static void enable_dev(struct device *dev) {
-       volatile struct mmcrpic *pic = MMCRPIC;
        volatile struct mmcr *mmcr = MMCRDEFAULT;
 
        /* currently, nothing in the device to use, so ignore it. */
-       printk_err("Technologic Systems 5300 ENTER %s\n", __func__);
+       printk(BIOS_ERR, "Technologic Systems 5300 ENTER %s\n", __func__);
 
        /* from fuctory bios */
        /* NOTE: the following interrupt settings made interrupts work
-        * for hard drive, and serial, but not for ethernet 
+        * for hard drive, and serial, but not for ethernet
         */
 
-       printk_err("Setting up PIC\n");
+       printk(BIOS_ERR, "Setting up PIC\n");
        /* just do what they say and nobody gets hurt. */
        mmcr->pic.pcicr = 0 ;
        /* all ints to level */
@@ -62,7 +63,7 @@ static void enable_dev(struct device *dev) {
        mmcr->pic.rtcmap  = 0x03;
        mmcr->pic.ferrmap = 0x00;
        mmcr->pic.intpinpol = 0x100;
-       
+
        mmcr->pic.gp0imap = 0x00;
        mmcr->pic.gp1imap = 0x02;
        mmcr->pic.gp2imap = 0x07;
@@ -77,12 +78,12 @@ static void enable_dev(struct device *dev) {
 
        // irqdump();
 
-       printk_err("Setting up sysarb\n");
+       printk(BIOS_ERR, "Setting up sysarb\n");
        mmcr->dbctl.dbctl = 0x01;
        mmcr->sysarb.ctl = 0x00;
        mmcr->sysarb.menb = 0x1f;
        mmcr->sysarb.prictl = 0x40000f0f;
-       
+
        /* this is bios setting, depends on sysarb above */
        mmcr->hostbridge.ctl = 0x0;
        mmcr->hostbridge.tgtirqctl = 0x0;
@@ -90,7 +91,7 @@ static void enable_dev(struct device *dev) {
        mmcr->hostbridge.mstirqctl = 0x0;
        mmcr->hostbridge.mstirqsta = 0x708;
 
-       printk_err("Setting up pio\n");
+       printk(BIOS_ERR, "Setting up pio\n");
        /* pio */
        mmcr->pio.pfs15_0 = 0xffff;
        mmcr->pio.pfs31_16 = 0xffff;
@@ -100,7 +101,7 @@ static void enable_dev(struct device *dev) {
        mmcr->pio.data15_0 = 0xde04;
        mmcr->pio.data31_16 = 0xef9f;
 
-       printk_err("Setting up sysmap\n");
+       printk(BIOS_ERR, "Setting up sysmap\n");
        /* system memory map */
        mmcr->sysmap.adddecctl = 0x04;
        mmcr->sysmap.wpvsta = 0x8006;
@@ -116,7 +117,7 @@ static void enable_dev(struct device *dev) {
        mmcr->sysmap.par[13] = 0x8a07c940;
        mmcr->sysmap.par[15] = 0xee00400e;
 
-       printk_err("Setting up gpctl\n");
+       printk(BIOS_ERR, "Setting up gpctl\n");
        mmcr->gpctl.gpcsrt = 0x01;
        mmcr->gpctl.gpcspw = 0x09;
        mmcr->gpctl.gpcsoff = 0x01;
@@ -124,7 +125,7 @@ static void enable_dev(struct device *dev) {
        mmcr->gpctl.gprdoff = 0x02;
        mmcr->gpctl.gpwrw = 0x07;
        mmcr->gpctl.gpwroff = 0x02;
-       
+
        //mmcr->reset.sysinfo = 0xdf;
        //mmcr->reset.rescfg = 0x5;
        /* their IRQ table is wrong. Just hardwire it */
@@ -138,7 +139,7 @@ static void enable_dev(struct device *dev) {
        mmcr->dmacontrol.extchanmapa = 0xf210;
        mmcr->dmacontrol.extchanmapb = 0xffff;
 
-       printk_err("TS5300 EXIT %s\n", __func__);
+       printk(BIOS_ERR, "TS5300 EXIT %s\n", __func__);
 }
 
 struct chip_operations mainboard_ops = {