]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/isee/igep00x0/igep00x0.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / board / isee / igep00x0 / igep00x0.c
index 49fcf348930e95a085d3b682eaa537bf94256fe5..7b87cc27c41b4e517753342202f240e7ff5668b4 100644 (file)
@@ -2,29 +2,14 @@
  * (C) Copyright 2010
  * ISEE 2007 SL, <www.iseebcn.com>
  *
- * 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
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <dm.h>
+#include <ns16550.h>
 #include <twl4030.h>
 #include <netdev.h>
 #include <asm/gpio.h>
-#include <asm/arch/omap_gpmc.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mmc_host_def.h>
@@ -47,6 +32,17 @@ static const u32 gpmc_lan_config[] = {
 };
 #endif
 
+static const struct ns16550_platdata igep_serial = {
+       OMAP34XX_UART3,
+       2,
+       V_NS16550_CLK
+};
+
+U_BOOT_DEVICE(igep_uart) = {
+       "serial_omap",
+       &igep_serial
+};
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -150,11 +146,22 @@ static inline void setup_net_chip(void) {}
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-       omap_mmc_init(0, 0, 0);
-       return 0;
+       return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
+void set_fdt(void)
+{
+       switch (gd->bd->bi_arch_number) {
+       case MACH_TYPE_IGEP0020:
+               setenv("dtbfile", "omap3-igep0020.dtb");
+               break;
+       case MACH_TYPE_IGEP0030:
+               setenv("dtbfile", "omap3-igep0030.dtb");
+               break;
+       }
+}
+
 /*
  * Routine: misc_init_r
  * Description: Configure board specific parts
@@ -167,6 +174,8 @@ int misc_init_r(void)
 
        dieid_num_r();
 
+       set_fdt();
+
        return 0;
 }