]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/comelit/dig297/dig297.c
Merge branch 'master' of git://git.denx.de/u-boot-nds32
[karo-tx-uboot.git] / board / comelit / dig297 / dig297.c
index a7071cd5543361b3bf5921bbb46bea81376e0173..2b826dffc5598d491efab6d7b2ce5fb9555d8462 100644 (file)
  *     Syed Mohammed Khasim <khasim@ti.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 <netdev.h>
@@ -42,7 +26,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/mach-types.h>
 #include "dig297.h"
 
@@ -91,8 +75,6 @@ static const u32 gpmc_lan_config[] = {
 int board_init(void)
 {
        gpmc_init();            /* in SRAM or SDRAM, finish GPMC */
-       /* board id for Linux */
-       gd->bd->bi_arch_number = MACH_TYPE_OMAP3_CPS;
        /* boot param addr */
        gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
@@ -149,8 +131,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-       omap_mmc_init(0);
-       return 0;
+       return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
@@ -177,13 +158,13 @@ static void setup_net_chip(void)
               &ctrl_base->gpmc_nadv_ale);
 
        /* Make GPIO 12 as output pin and send a magic pulse through it */
-       if (!omap_request_gpio(NET_LAN9221_RESET_GPIO)) {
-               omap_set_gpio_direction(NET_LAN9221_RESET_GPIO, 0);
-               omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+       if (!gpio_request(NET_LAN9221_RESET_GPIO, "")) {
+               gpio_direction_output(NET_LAN9221_RESET_GPIO, 0);
+               gpio_set_value(NET_LAN9221_RESET_GPIO, 1);
                udelay(1);
-               omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 0);
+               gpio_set_value(NET_LAN9221_RESET_GPIO, 0);
                udelay(31000);  /* Should be >= 30ms according to datasheet */
-               omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+               gpio_set_value(NET_LAN9221_RESET_GPIO, 1);
        }
 }
 #endif /* CONFIG_CMD_NET */