]> git.sur5r.net Git - u-boot/blobdiff - board/lpd7a40x/lpd7a40x.c
sbc8548: update PCI/PCI-e support code
[u-boot] / board / lpd7a40x / lpd7a40x.c
index 8492df3d2b271e59f64ffb30687c1f50793ecb31..7edb65e6d86fec1180a06064048ff662bb553929 100644 (file)
@@ -4,7 +4,7 @@
  * Marius Groeger <mgroeger@sysgo.de>
  *
  * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
 #include <common.h>
 #if defined(CONFIG_LH7A400)
 #include <lh7a400.h>
-#include <lpd7a400_cpld.h>
 #elif defined(CONFIG_LH7A404)
 #include <lh7a404.h>
-#include <lpd7a404_cpld.h>
 #else
 #error "No CPU defined!"
 #endif
+#include <asm/mach-types.h>
+
+#include <lpd7a400_cpld.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 /*
  * Miscellaneous platform dependent initialisations
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        /* set up the I/O ports */
 
-#if defined(CONFIG_LH7A400)
-
        /* enable flash programming */
        *(LPD7A400_CPLD_REGPTR(LPD7A400_CPLD_FLASH_REG)) |= FLASH_FPEN;
 
@@ -59,10 +58,12 @@ int board_init (void)
        *(LPD7A400_CPLD_REGPTR(LPD7A400_CPLD_EXTGPIO_REG)) =
                (EXTGPIO_STATUS1|EXTGPIO_GPIO1) & ~(EXTGPIO_STATUS2);
 
+#if defined(CONFIG_LH7A400)
        /* arch number of Logic-Board - MACH_TYPE_LPD7A400 */
        gd->bd->bi_arch_number = MACH_TYPE_LPD7A400;
-
 #elif defined(CONFIG_LH7A404)
+       /* arch number of Logic-Board - MACH_TYPE_LPD7A400 */
+       gd->bd->bi_arch_number = MACH_TYPE_LPD7A404;
 #endif
 
        /* adress of boot parameters */
@@ -73,8 +74,6 @@ int board_init (void)
 
 int dram_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;