]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Code cleanup
authorGraeme Russ <graeme.russ@gmail.com>
Wed, 13 Apr 2011 09:43:26 +0000 (19:43 +1000)
committerGraeme Russ <graeme.russ@gmail.com>
Wed, 13 Apr 2011 09:43:26 +0000 (19:43 +1000)
Make the copyright notices in the x86 files consistent and update them with
proper attributions for recent updates

Also fix a few comment style/accuracy and whitespace/blank line issues

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
28 files changed:
arch/i386/cpu/cpu.c
arch/i386/cpu/interrupts.c
arch/i386/cpu/resetvec.S
arch/i386/cpu/sc520/sc520.c
arch/i386/cpu/sc520/sc520_car.S
arch/i386/cpu/sc520/sc520_pci.c
arch/i386/cpu/sc520/sc520_sdram.c
arch/i386/cpu/sc520/sc520_ssi.c
arch/i386/cpu/sc520/sc520_timer.c
arch/i386/cpu/start.S
arch/i386/cpu/start16.S
arch/i386/lib/bios.S
arch/i386/lib/bios.h
arch/i386/lib/bios_setup.c
arch/i386/lib/board.c
arch/i386/lib/bootm.c
arch/i386/lib/interrupts.c
arch/i386/lib/pcat_interrupts.c
arch/i386/lib/pcat_timer.c
arch/i386/lib/pci.c
arch/i386/lib/pci_type1.c
arch/i386/lib/realmode.c
arch/i386/lib/realmode_switch.S
arch/i386/lib/timer.c
arch/i386/lib/video.c
arch/i386/lib/video_bios.c
arch/i386/lib/zimage.c
board/eNET/eNET_pci.c

index 2339cd41bbe71d037bc7900dd1222b83b8194528..5ca0c9156c8b300e476976caab01bdfda4d7c56c 100644 (file)
@@ -1,6 +1,9 @@
 /*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * (C) Copyright 2002
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  * MA 02111-1307 USA
  */
 
-/*
- * CPU specific code
- */
-
 #include <common.h>
 #include <command.h>
 #include <asm/processor.h>
 #include <asm/processor-flags.h>
 #include <asm/interrupt.h>
 
-/* Constructor for a conventional segment GDT (or LDT) entry */
-/* This is a macro so it can be used in initializers */
+/*
+ * Constructor for a conventional segment GDT (or LDT) entry
+ * This is a macro so it can be used in initialisers
+ */
 #define GDT_ENTRY(flags, base, limit)                  \
        ((((base)  & 0xff000000ULL) << (56-24)) |       \
         (((flags) & 0x0000f0ffULL) << 40) |            \
         (((base)  & 0x00ffffffULL) << 16) |            \
         (((limit) & 0x0000ffffULL)))
 
-/*
- * Set up the GDT
- */
-
 struct gdt_ptr {
        u16 len;
        u32 ptr;
@@ -59,8 +56,10 @@ struct gdt_ptr {
 
 static void reload_gdt(void)
 {
-       /* There are machines which are known to not boot with the GDT
-          being 8-byte unaligned.  Intel recommends 16 byte alignment. */
+       /*
+        * There are machines which are known to not boot with the GDT
+        * being 8-byte unaligned.  Intel recommends 16 byte alignment
+        */
        static const u64 boot_gdt[] __attribute__((aligned(16))) = {
                /* CS: code, read/execute, 4 GB, base 0 */
                [GDT_ENTRY_32BIT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff),
@@ -86,7 +85,6 @@ static void reload_gdt(void)
                     : : "m" (gdt) : "ecx");
 }
 
-
 int x86_cpu_init_f(void)
 {
        const u32 em_rst = ~X86_CR0_EM;
@@ -125,7 +123,9 @@ int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r")));
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        printf ("resetting ...\n");
-       udelay(50000);                          /* wait 50 ms */
+
+       /* wait 50 ms */
+       udelay(50000);
        disable_interrupts();
        reset_cpu(0);
 
@@ -136,7 +136,6 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 void  flush_cache (unsigned long dummy1, unsigned long dummy2)
 {
        asm("wbinvd\n");
-       return;
 }
 
 void __attribute__ ((regparm(0))) generate_gpf(void);
index 1cefe02c86546baab4d8847ae7dfc2472123ac0d..62bcadc486a5671edc1fc99d41c4cea476de8c2f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * (C) Copyright 2008
- * Graeme Russ, graeme.russ@gmail.com.
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * Portions of this file are derived from the Linux kernel source
  *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -45,7 +45,7 @@
  * read/write functions for the control registers and messing everything up.
  * A memory clobber would solve the problem, but would prevent reordering of
  * all loads stores around it, which can hurt performance. Solution is to
- * use a variable and mimic reads and writes to it to enforce serialization
+ * use a variable and mimic reads and writes to it to enforce serialisation
  */
 static unsigned long __force_order;
 
index d9222dd2fc63934b1a1e52ced447c0d986560b54..27021bd7213eed290bbdc3a2791df955c1717baf 100644 (file)
@@ -1,7 +1,8 @@
 /*
  *  U-boot - i386 Startup Code
  *
- *  Copyright (c) 2002 Omicron Ceti AB, Daniel Engström <denaiel@omicron.se>
+ * (C) Copyright 2002
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index d0c313b91a9aa7ce64aef0d8c759bfb61637a0e2..edc1a5c0f2946e51f55954d2996a2c8efbc86d50 100644 (file)
@@ -1,6 +1,9 @@
 /*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engstr�m, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,9 +24,6 @@
  * MA 02111-1307 USA
  */
 
-/* stuff specific for the sc520,
- * but idependent of implementation */
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/processor-flags.h>
index 22f5225311c6afb2c2cb65f1e83208bd749eb720..a33f94f4919a5d5cc448cd91747eb72f04120702 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * (C) Copyright 2010
- * Graeme Russ <graeme.russ@gmail.com>.
+ * (C) Copyright 2010-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,7 +21,6 @@
  * MA 02111-1307 USA
  */
 
-
 #include <config.h>
 #include <asm/processor-flags.h>
 #include <asm/ic/sc520.h>
index b91773435e9a8b23ee7e2d6ccc2af4e861e0a7a3..8cd7ffecdb692634bf923e6595a6342ff493e982 100644 (file)
@@ -1,6 +1,9 @@
 /*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,8 +24,6 @@
  * MA 02111-1307 USA
  */
 
-/* stuff specific for the sc520, but independent of implementation */
-
 #include <common.h>
 #include <pci.h>
 #include <asm/io.h>
@@ -54,7 +55,6 @@ static struct {
        { SC520_IRQ15, 1, 0x80 }
 };
 
-
 /* The interrupt used for PCI INTA-INTD  */
 int sc520_pci_ints[15] = {
        -1, -1, -1, -1, -1, -1, -1, -1,
@@ -68,9 +68,8 @@ int pci_sc520_set_irq(int pci_pin, int irq)
        u8 tmpb;
        u16 tmpw;
 
-# if 1
-       printf("set_irq(): map INT%c to IRQ%d\n", pci_pin + 'A', irq);
-#endif
+       debug("set_irq(): map INT%c to IRQ%d\n", pci_pin + 'A', irq);
+
        if (irq < 0 || irq > 15) {
                return -1; /* illegal irq */
        }
@@ -138,5 +137,4 @@ void pci_sc520_init(struct pci_controller *hose)
        /* enable target memory acceses on host brige */
        pci_write_config_word(0, PCI_COMMAND,
                              PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
-
 }
index d5ab55df069d931b3c61f9bfac6eb180d429f25c..f3623f53f2580ec5efcf1feb9d6550bade277137 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * (C) Copyright 2010
- * Graeme Russ <graeme.russ@gmail.com>.
+ * (C) Copyright 2010,2011
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index 6e5e346303304ef930d676f3635fa28d190d31b8..ac58d259705e24e96983376fd32b593397754422 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,8 +21,6 @@
  * MA 02111-1307 USA
  */
 
-/* stuff specific for the sc520, but independent of implementation */
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/ic/ssi.h>
@@ -77,7 +75,6 @@ u8 ssi_txrx_byte(u8 data)
        return readb(&sc520_mmcr->ssircv);
 }
 
-
 void ssi_tx_byte(u8 data)
 {
        writeb(data, &sc520_mmcr->ssixmit);
index d5617e91f6e154a1360f2a6a850e022a8df0aa66..1bcfe67c947e28c70d5188e5ab251f4b2365689f 100644 (file)
@@ -1,6 +1,9 @@
 /*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,8 +24,6 @@
  * MA 02111-1307 USA
  */
 
-/* stuff specific for the sc520, but independent of implementation */
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/interrupt.h>
index 00313897ce8517da4288e2870a4c97593ed48adb..2124a42c9d765cf99115db3e968e405f85699a9a 100644 (file)
@@ -1,7 +1,11 @@
 /*
  *  U-boot - i386 Startup Code
  *
- *  Copyright (c) 2002 Omicron Ceti AB, Daniel Engström <denaiel@omicron.se>
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
+ * (C) Copyright 2002
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  * MA 02111-1307 USA
  */
 
-
 #include <config.h>
 #include <version.h>
 #include <asm/global_data.h>
 #include <asm/processor-flags.h>
 
-
 .section .text
 .code32
 .globl _start
@@ -56,8 +58,8 @@ _i386boot_start:
 _start:
        /* This is the 32-bit cold-reset entry point */
 
-       movl    $0x18, %eax     /* Load our segement registes, the
-                                * gdt have already been loaded by start16.S */
+       /* Load the segement registes to match the gdt loaded in start16.S */
+       movl    $0x18, %eax
        movw    %ax, %fs
        movw    %ax, %ds
        movw    %ax, %gs
@@ -82,21 +84,13 @@ car_init_ret:
         * starting at CONFIG_SYS_CAR_ADDR to be used as a temporary stack
         */
        movl    $CONFIG_SYS_INIT_SP_ADDR, %esp
-       movl    $CONFIG_SYS_INIT_GD_ADDR, %ebp
-
-       /* Set Boot Flags in Global Data */
-       movl    %ebx, (GD_FLAGS * 4)(%ebp)
-
-       /* Determine our load offset (and put in Global Data) */
-       call    1f
-1:     popl    %ecx
-       subl    $1b, %ecx
-       movl    %ecx, (GD_LOAD_OFF * 4)(%ebp)
 
        /* Set parameter to board_init_f() to boot flags */
-       movl    (GD_FLAGS * 4)(%ebp), %eax
+       xorl    %eax, %eax
+       movw    %bx, %ax
 
-       call    board_init_f    /* Enter, U-boot! */
+       /* Enter, U-boot! */
+       call    board_init_f
 
        /* indicate (lack of) progress */
        movw    $0x85, %ax
index 7dc53583662509b5a63704e7089f488709e3638d..d2e5d136fab7b35594bf6720b718adf71570d0b2 100644 (file)
@@ -1,7 +1,11 @@
 /*
  *  U-boot - i386 Startup Code
  *
- *  Copyright (c) 2002, 2003 Omicron Ceti AB, Daniel Engström <denaiel@omicron.se>
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
+ * (C) Copyright 2002,2003
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index 48f1b81122272a5c92208629c49100b059e3db41..660a24439474463e08a2ac47c6e2ae6800cfadfe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -42,7 +42,6 @@
  * a general purpose replacement for a real BIOS !!
  */
 
-
 .section .bios, "ax"
 .code16
 .org 0
index 4901f8917a231c0af8a0ab5e1b059294b0e2a30f..3c8d61a6f4511cbad0eba6645b7262b2499ee7bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -57,7 +57,7 @@
 #define OFFS_FLAGS   44    /* 16bit */
 
 #define SEGMENT      0x40
-#define STACK       0x800                      /* stack at 0x40:0x800 -> 0x800 */
+#define STACK       0x800      /* stack at 0x40:0x800 -> 0x800 */
 
 /* save general registers */
 /* save some segments     */
        /* setup BIOS stackpointer */
 
 #define MAKE_BIOS_STACK \
-       pushal          ; \
-       pushw   %ds     ; \
-       pushw   %gs     ; \
-       pushw   %es     ; \
-       pushw   %ss     ; \
-       popw    %gs     ; \
-       movw    $SEGMENT,%ax ; \
-       movw    %ax,%ds ; \
-       movw    %ax,%es ; \
-       movw    %ax,%ss ; \
-       movw    %sp,%bp ; \
-       movw    $STACK,%sp
+       pushal; \
+       pushw   %ds; \
+       pushw   %gs; \
+       pushw   %es; \
+       pushw   %ss; \
+       popw    %gs; \
+       movw    $SEGMENT, %ax; \
+       movw    %ax, %ds; \
+       movw    %ax, %es; \
+       movw    %ax, %ss; \
+       movw    %sp, %bp; \
+       movw    $STACK, %sp
 
 #define RESTORE_CALLERS_STACK \
-       pushw   %gs     ;                       /* restore callers stack segment */ \
-       popw    %ss     ; \
-       movw    %bp,%sp ;                       /* restore stackpointer */ \
-               \
-       popw    %es     ;                       /* restore segment selectors */ \
-       popw    %gs     ; \
-       popw    %ds     ; \
-               \
-       popal                                   /* restore GP registers */
+       pushw   %gs;            /* restore callers stack segment */ \
+       popw    %ss; \
+       movw    %bp, %sp;       /* restore stackpointer */ \
+       popw    %es;            /* restore segment selectors */ \
+       popw    %gs; \
+       popw    %ds; \
+       popal                   /* restore GP registers */
 
 #endif
index 75407c173cf162cb8c42c443c5e6a4d29c23b8d0..6949b35069b9c8b2b5677903bff1d83473ede4e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,7 +21,6 @@
  * MA 02111-1307 USA
  */
 
-
 /*
  * Partly based on msbios.c from rolo 1.6:
  *----------------------------------------------------------------------
index e0f9803e5e8d9badec62c6ce355f8111307b9ab8..6d947c6c285338293e913841a54e3ca9b668d8a4 100644 (file)
@@ -1,9 +1,12 @@
 /*
+ * (C) Copyright 2008-2011
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * (C) Copyright 2002
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
  *
  * (C) Copyright 2002
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
@@ -103,13 +106,6 @@ static int display_banner (void)
        return (0);
 }
 
-/*
- * WARNING: this code looks "cleaner" than the PowerPC version, but
- * has the disadvantage that you either get nothing, or everything.
- * On PowerPC, you might see "DRAM: " before the system hangs - which
- * gives a simple yet clear indication which part of the
- * initialization if failing.
- */
 static int display_dram_config (void)
 {
        int i;
@@ -141,7 +137,6 @@ static void display_flash_config (ulong size)
  * can relocate the monitor code to RAM.
  */
 
-
 /*
  * All attempts to come up with a "common" initialization sequence
  * that works for all boards and architectures failed: some of the
@@ -251,13 +246,13 @@ static int do_elf_reloc_fixups(void)
        return 0;
 }
 
-/*
- * Load U-Boot into RAM, initialize BSS, perform relocation adjustments
- */
+/* Load U-Boot into RAM, initialize BSS, perform relocation adjustments */
 void board_init_f(ulong boot_flags)
 {
        init_fnc_t **init_fnc_ptr;
 
+       gd->flags = boot_flags;
+
        for (init_fnc_ptr = init_sequence_f; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0)
                        hang();
index b36e58d9ec679f6e30df50af3f6b9579678317d5..a21a21f1f7f9fb0c1106884e17d42121211090d0 100644 (file)
@@ -5,10 +5,13 @@
  *
  * Copyright (C) 2001  Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
  *
- * 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.
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
@@ -17,8 +20,8 @@
  *
  * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
  */
 
 #include <common.h>
index 5a282782809e4e53480747166a4ff226d38cd31b..a2c598f9a4f7d129257874abdf7973f546c833df 100644 (file)
@@ -1,21 +1,21 @@
 /*
  * (C) Copyright 2009
- * Graeme Russ, graeme.russ@gmail.com
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2007
- * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com
+ * Daniel Hellstrom, Gaisler Research, <daniel@gaisler.com>
  *
  * (C) Copyright 2006
- * Detlev Zundel, DENX Software Engineering, dzu@denx.de
+ * Detlev Zundel, DENX Software Engineering, <dzu@denx.de>
  *
  * (C) Copyright -2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * (C) Copyright 2001
- * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
+ * Josh Huber, Mission Critical Linux, Inc, <huber@mclx.com>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
 
 /*
  * This file contains the high-level API for the interrupt sub-system
- * of the i386 port of U-Boot. Most of the functionality has been
+ * of the x86 port of U-Boot. Most of the functionality has been
  * shamelessly stolen from the leon2 / leon3 ports of U-Boot.
  * Daniel Hellstrom, Detlev Zundel, Wolfgang Denk and Josh Huber are
  * credited for the corresponding work on those ports. The original
- * interrupt handling routines for the i386 port were written by
+ * interrupt handling routines for the x86 port were written by
  * Daniel Engström
  */
 
index 67e6e97e35eb77587df6817425daa7e5f4f97ab8..364c4358378cc3153777f4b2910f3a033f32bdad 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * (C) Copyright 2009
- * Graeme Russ, graeme.russ@gmail.com
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index 1373fd125c81d1f792788ebf8ba837cf4dc9fee1..1911c6c19d24365393420b271d3a51e0b71adef3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index 9020e7ce7646df66ab777244cffb59f57ef9efb1..e791e88bd421107adbbd28112a5bb09c96f3d5f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -54,10 +54,9 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest)
        class_code &= 0xffffff00;
        class_code >>= 8;
 
-#if 0
-       printf("PCI Header Vendor %04x device %04x class %06x\n",
+       debug("PCI Header Vendor %04x device %04x class %06x\n",
               vendor, device, class_code);
-#endif
+
        /* Enable the rom addess decoder */
        pci_write_config_dword(dev, PCI_ROM_ADDRESS, (u32)PCI_ROM_ADDRESS_MASK);
        pci_read_config_dword(dev, PCI_ROM_ADDRESS, &addr_reg);
@@ -70,13 +69,12 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest)
 
        size = (~(addr_reg&PCI_ROM_ADDRESS_MASK))+1;
 
-#if 0
-       printf("ROM is %d bytes\n", size);
-#endif
+       debug("ROM is %d bytes\n", size);
+
        rom_addr = pci_get_rom_window(hose, size);
-#if 0
-       printf("ROM mapped at %x \n", rom_addr);
-#endif
+
+       debug("ROM mapped at %x\n", rom_addr);
+
        pci_write_config_dword(dev, PCI_ROM_ADDRESS,
                               pci_phys_to_mem(dev, rom_addr)
                               |PCI_ROM_ADDRESS_ENABLE);
index 225ae4a990923b3dfa127ac34e34e41b0f70cf81..8ce5b33e3d235c115291634ea014a979445b8140 100644 (file)
@@ -1,15 +1,30 @@
 /*
- * Support for type PCI configuration cycles.
- * based on pci_indirect.c
+ * (C) Copyright 2002
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
- * Copyright (C) 2002 Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * See file CREDITS for list of people who contributed to this
+ * project.
  *
  * 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.
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
  */
 
+/*
+ * Support for type PCI configuration cycles.
+ * based on pci_indirect.c
+ */
 #include <common.h>
 #include <asm/io.h>
 #include <pci.h>
index 2dda95b064d38d693fd6233f684bd7b4e2805784..5be827c66b124d1d0520a747599a9b19b89d32c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
 #include <asm/ptrace.h>
 #include <asm/realmode.h>
 
-
 #define REALMODE_MAILBOX ((char*)0xe00)
 
-
 extern ulong __realmode_start;
 extern ulong __realmode_size;
 extern char realmode_enter;
@@ -57,13 +55,11 @@ int enter_realmode(u16 seg, u16 off, struct pt_regs *in, struct pt_regs *out)
 {
 
        /* setup out thin bios emulation */
-       if (bios_setup()) {
+       if (bios_setup())
                return -1;
-       }
 
-       if (realmode_setup()) {
+       if (realmode_setup())
                return -1;
-       }
 
        in->eip = off;
        in->xcs = seg;
index d6c74ecd79b4cea61a5e5b391441b6a11cf512f2..fce4eccab01e71671efc980a07f4b594fab1cf4d 100644 (file)
@@ -21,7 +21,6 @@
  * MA 02111-1307 USA
  */
 
-
 /* 32bit -> 16bit -> 32bit mode switch code */
 
 /*
index 5cb1f54fb5628616622a93f659992b5afeb6ae74..8fc68cdcb899a72b87e8b8aec4f26c1f92860a32 100644 (file)
@@ -1,6 +1,9 @@
 /*
+ * (C) Copyright 2008,2009
+ * Graeme Russ, <graeme.russ@gmail.com>
+ *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index c58ed104cc8a3129a083312b06c9528f96c9d09b..b29075c490a48ce14e3c3c485fdb21bbcc198172 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -30,7 +30,6 @@
 #include <asm/io.h>
 #include <asm/pci.h>
 
-
 /* basic textmode I/O from linux kernel */
 static char *vidmem = (char *)0xb8000;
 static int vidport;
@@ -42,9 +41,9 @@ static void beep(int dur)
        int i;
 
        outb_p(3, 0x61);
-       for (i=0;i<10*dur;i++) {
+       for (i = 0; i < 10*dur; i++)
                udelay(1000);
-       }
+
        outb_p(0, 0x61);
 }
 
@@ -52,8 +51,8 @@ static void scroll(void)
 {
        int i;
 
-       memcpy ( vidmem, vidmem + cols * 2, ( lines - 1 ) * cols * 2 );
-       for ( i = ( lines - 1 ) * cols * 2; i < lines * cols * 2; i += 2 )
+       memcpy(vidmem, vidmem + cols * 2, (lines - 1) * cols * 2);
+       for (i = (lines - 1) * cols * 2; i < lines * cols * 2; i += 2)
                vidmem[i] = ' ';
 }
 
@@ -61,14 +60,14 @@ static void __video_putc(const char c, int *x, int *y)
 {
        if (c == '\n') {
                (*x) = 0;
-               if ( ++(*y) >= lines ) {
+               if (++(*y) >= lines) {
                        scroll();
                        (*y)--;
                }
        } else if (c == '\b') {
                if ((*x) != 0) {
                        --(*x);
-                       vidmem [ ( (*x) + cols * (*y) ) * 2 ] = ' ';
+                       vidmem[((*x) + cols * (*y)) * 2] = ' ';
                }
        } else if (c == '\r') {
                (*x) = 0;
@@ -106,16 +105,15 @@ static void __video_putc(const char c, int *x, int *y)
                }
        } else if (c == '\f') {
                int i;
-               for (i=0;i<lines*cols*2;i+=2) {
+               for (i = 0; i < lines * cols * 2; i += 2)
                        vidmem[i] = 0;
-               }
                (*x) = 0;
                (*y) = 0;
        } else {
-               vidmem [ ( (*x) + cols * (*y) ) * 2 ] = c;
-               if ( ++(*x) >= cols ) {
+               vidmem[((*x) + cols * (*y)) * 2] = c;
+               if (++(*x) >= cols) {
                        (*x) = 0;
-                       if ( ++(*y) >= lines ) {
+                       if (++(*y) >= lines) {
                                scroll();
                                (*y)--;
                        }
@@ -150,9 +148,8 @@ static void video_puts(const char *s)
        x = orig_x;
        y = orig_y;
 
-       while ( ( c = *s++ ) != '\0' ) {
+       while ((c = *s++) != '\0')
                __video_putc(c, &x, &y);
-       }
 
        orig_x = x;
        orig_y = y;
@@ -189,10 +186,8 @@ int video_init(void)
 #if 0
        printf("pos %x %d %d\n", pos, orig_x, orig_y);
 #endif
-       if (orig_y > lines) {
+       if (orig_y > lines)
                orig_x = orig_y =0;
-       }
-
 
        memset(&vga_dev, 0, sizeof(vga_dev));
        strcpy(vga_dev.name, "vga");
@@ -203,13 +198,11 @@ int video_init(void)
        vga_dev.tstc  = NULL;              /* 'tstc' function */
        vga_dev.getc  = NULL;              /* 'getc' function */
 
-       if (stdio_register(&vga_dev) == 0) {
-           return 1;
-       }
+       if (stdio_register(&vga_dev) == 0)
+               return 1;
 
-       if (i8042_kbd_init()) {
+       if (i8042_kbd_init())
                return 1;
-       }
 
        memset(&kbd_dev, 0, sizeof(kbd_dev));
        strcpy(kbd_dev.name, "kbd");
@@ -220,18 +213,17 @@ int video_init(void)
        kbd_dev.tstc  = i8042_tstc;  /* 'tstc' function */
        kbd_dev.getc  = i8042_getc;  /* 'getc' function */
 
-       if (stdio_register(&kbd_dev) == 0) {
-           return 1;
-       }
+       if (stdio_register(&kbd_dev) == 0)
+               return 1;
+
        return 0;
 }
 
 
 int drv_video_init(void)
 {
-       if (video_bios_init()) {
+       if (video_bios_init())
                return 1;
-       }
 
        return video_init();
 }
index c8060e60a7766e50b272d206afea7bbd7b418174..6bc4335743572f0bb11a1a5abb6fdcab59a2cd6a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
index 0c420726912c120b5a263b7e3b3c165d5af601e6..cc4b40e64c9d2f836e8208336ec9a7fdd6a1ec9e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -22,7 +22,7 @@
  */
 
 /*
- * Linux i386 zImage and bzImage loading
+ * Linux x86 zImage and bzImage loading
  *
  * based on the procdure described in
  * linux/Documentation/i386/boot.txt
index fefb1a4fbeb1efdbe4129f5e482c68d3b2f56165..a03090e54061ad15748cb4a0072fbbad5b5a933f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * (C) Copyright 2008
- * Graeme Russ, graeme.russ@gmail.com.
+ * (C) Copyright 2008,2009
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,6 +23,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
+
 #include <common.h>
 #include <pci.h>
 #include <asm/pci.h>