]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/nvidia/common/board.c
Merge branch 'master' of git://git.denx.de/u-boot-video
[karo-tx-uboot.git] / board / nvidia / common / board.c
index fc8b928cfcf006f88d6919d6f36ac014062cba83..afe832a5295198258ff208e4576f591737129e15 100644 (file)
@@ -25,7 +25,7 @@
 #include <ns16550.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
-#include <asm/arch/tegra2.h>
+#include <asm/arch/tegra20.h>
 #include <asm/arch/sys_proto.h>
 
 #include <asm/arch/board.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const struct tegra2_sysinfo sysinfo = {
-       CONFIG_TEGRA2_BOARD_STRING
+const struct tegra_sysinfo sysinfo = {
+       CONFIG_TEGRA_BOARD_STRING
 };
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * Routine: timer_init
  * Description: init the timestamp and lastinc value
@@ -57,6 +58,7 @@ int timer_init(void)
 {
        return 0;
 }
+#endif
 
 void __pin_mux_usb(void)
 {
@@ -64,14 +66,20 @@ void __pin_mux_usb(void)
 
 void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb")));
 
+void __pin_mux_spi(void)
+{
+}
+
+void pin_mux_spi(void) __attribute__((weak, alias("__pin_mux_spi")));
+
 /*
  * Routine: power_det_init
  * Description: turn off power detects
  */
 static void power_det_init(void)
 {
-#if defined(CONFIG_TEGRA2)
-       struct pmc_ctlr *const pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE;
+#if defined(CONFIG_TEGRA20)
+       struct pmc_ctlr *const pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE;
 
        /* turn off power detects */
        writel(0, &pmc->pmc_pwr_det_latch);
@@ -95,6 +103,7 @@ int board_init(void)
        gpio_config_uart();
 #endif
 #ifdef CONFIG_TEGRA_SPI
+       pin_mux_spi();
        spi_init();
 #endif
        /* boot param addr */
@@ -123,7 +132,10 @@ int board_init(void)
        board_usb_init(gd->fdt_blob);
 #endif
 
-#ifdef CONFIG_TEGRA2_LP0
+#ifdef CONFIG_TEGRA_LP0
+       /* save Sdram params to PMC 2, 4, and 24 for WB0 */
+       warmboot_save_sdram_params();
+
        /* prepare the WB code to LP0 location */
        warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE);
 #endif