Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
[platform/kernel/u-boot.git] / lib_sh / board.c
index c63ac03..807415c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007
+ * Copyright (C) 2007,2008
  * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  *
  * This program is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ static void mem_malloc_init (void)
        mem_malloc_start = (TEXT_BASE - CFG_GBL_DATA_SIZE - CFG_MALLOC_LEN);
        mem_malloc_end = (mem_malloc_start + CFG_MALLOC_LEN - 16);
        mem_malloc_brk = mem_malloc_start;
-       memset ((void *) mem_malloc_start, 0, 
+       memset ((void *) mem_malloc_start, 0,
                (mem_malloc_end - mem_malloc_start));
 }
 
@@ -76,7 +76,7 @@ static int sh_flash_init(void)
 }
 
 #if defined(CONFIG_CMD_NAND)
-void nand_init (void);
+#include <nand.h>
 static int sh_nand_init(void)
 {
        printf("NAND: ");
@@ -95,6 +95,14 @@ static int sh_marubun_init(void)
 }
 #endif /* (CONFIG_CMD_IDE) */
 
+#if defined(CONFIG_PCI)
+static int sh_pci_init(void)
+{
+       pci_init();
+       return 0;
+}
+#endif /* CONFIG_PCI */
+
 static int sh_mem_env_init(void)
 {
        mem_malloc_init();
@@ -141,6 +149,9 @@ init_fnc_t *init_sequence[] =
 #if defined(CONFIG_CMD_NAND)
        sh_nand_init,           /* Flash memory (NAND) init */
 #endif
+#if defined(CONFIG_PCI)
+       sh_pci_init,            /* PCI Init */
+#endif
        devices_init,
        console_init_r,
        interrupt_init,
@@ -191,7 +202,7 @@ void sh_generic_init (void)
        puts ("Net:   ");
        eth_initialize(gd->bd);
 
-        if ((s = getenv ("bootfile")) != NULL) {
+       if ((s = getenv ("bootfile")) != NULL) {
                copy_filename (BootFile, s, sizeof (BootFile));
        }
 #endif /* CONFIG_CMD_NET */