* 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>
#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"
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);
#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
&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 */