diff options
Diffstat (limited to 'arch/i386/cpu')
-rw-r--r-- | arch/i386/cpu/cpu.c | 31 | ||||
-rw-r--r-- | arch/i386/cpu/interrupts.c | 8 | ||||
-rw-r--r-- | arch/i386/cpu/resetvec.S | 3 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520.c | 8 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520_car.S | 5 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520_pci.c | 14 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520_sdram.c | 4 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520_ssi.c | 5 | ||||
-rw-r--r-- | arch/i386/cpu/sc520/sc520_timer.c | 7 | ||||
-rw-r--r-- | arch/i386/cpu/start.S | 28 | ||||
-rw-r--r-- | arch/i386/cpu/start16.S | 6 |
11 files changed, 56 insertions, 63 deletions
diff --git a/arch/i386/cpu/cpu.c b/arch/i386/cpu/cpu.c index 2339cd4..5ca0c91 100644 --- a/arch/i386/cpu/cpu.c +++ b/arch/i386/cpu/cpu.c @@ -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> @@ -29,18 +32,16 @@ * 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) | \ @@ -48,10 +49,6 @@ (((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); diff --git a/arch/i386/cpu/interrupts.c b/arch/i386/cpu/interrupts.c index 1cefe02..62bcadc 100644 --- a/arch/i386/cpu/interrupts.c +++ b/arch/i386/cpu/interrupts.c @@ -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; diff --git a/arch/i386/cpu/resetvec.S b/arch/i386/cpu/resetvec.S index d9222dd..27021bd 100644 --- a/arch/i386/cpu/resetvec.S +++ b/arch/i386/cpu/resetvec.S @@ -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. diff --git a/arch/i386/cpu/sc520/sc520.c b/arch/i386/cpu/sc520/sc520.c index d0c313b..edc1a5c 100644 --- a/arch/i386/cpu/sc520/sc520.c +++ b/arch/i386/cpu/sc520/sc520.c @@ -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> diff --git a/arch/i386/cpu/sc520/sc520_car.S b/arch/i386/cpu/sc520/sc520_car.S index 22f5225..a33f94f 100644 --- a/arch/i386/cpu/sc520/sc520_car.S +++ b/arch/i386/cpu/sc520/sc520_car.S @@ -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> diff --git a/arch/i386/cpu/sc520/sc520_pci.c b/arch/i386/cpu/sc520/sc520_pci.c index b917734..8cd7ffe 100644 --- a/arch/i386/cpu/sc520/sc520_pci.c +++ b/arch/i386/cpu/sc520/sc520_pci.c @@ -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); - } diff --git a/arch/i386/cpu/sc520/sc520_sdram.c b/arch/i386/cpu/sc520/sc520_sdram.c index d5ab55d..f3623f5 100644 --- a/arch/i386/cpu/sc520/sc520_sdram.c +++ b/arch/i386/cpu/sc520/sc520_sdram.c @@ -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. diff --git a/arch/i386/cpu/sc520/sc520_ssi.c b/arch/i386/cpu/sc520/sc520_ssi.c index 6e5e346..ac58d25 100644 --- a/arch/i386/cpu/sc520/sc520_ssi.c +++ b/arch/i386/cpu/sc520/sc520_ssi.c @@ -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); diff --git a/arch/i386/cpu/sc520/sc520_timer.c b/arch/i386/cpu/sc520/sc520_timer.c index d5617e9..1bcfe67 100644 --- a/arch/i386/cpu/sc520/sc520_timer.c +++ b/arch/i386/cpu/sc520/sc520_timer.c @@ -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> diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S index 0031389..2124a42 100644 --- a/arch/i386/cpu/start.S +++ b/arch/i386/cpu/start.S @@ -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. @@ -22,13 +26,11 @@ * 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 diff --git a/arch/i386/cpu/start16.S b/arch/i386/cpu/start16.S index 7dc5358..d2e5d13 100644 --- a/arch/i386/cpu/start16.S +++ b/arch/i386/cpu/start16.S @@ -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. |