1 // SPDX-License-Identifier: GPL-2.0+
6 #include <asm/omap_mmc.h>
7 #include <asm/arch/mux.h>
8 #include <asm/arch/sys_proto.h>
9 #include <jffs2/load_kernel.h>
10 #include <linux/delay.h>
11 #include <linux/mtd/rawnand.h>
14 DECLARE_GLOBAL_DATA_PTR;
17 * Routine: set_muxconf_regs
18 * Description: Setting up the configuration Mux registers specific to the
19 * hardware. Many pins need to be moved from protect to primary
22 void set_muxconf_regs(void)
29 * Description: Early hardware init.
35 /* find out flash memory type, assume NAND first */
36 gpmc_cs0_flash = MTD_DEV_TYPE_NAND;
39 /* Issue a RESET and then READID */
40 writeb(NAND_CMD_RESET, &gpmc_cfg->cs[0].nand_cmd);
41 writeb(NAND_CMD_STATUS, &gpmc_cfg->cs[0].nand_cmd);
42 while ((readl(&gpmc_cfg->cs[0].nand_dat) & NAND_STATUS_READY)
43 != NAND_STATUS_READY) {
46 gpmc_cs0_flash = MTD_DEV_TYPE_ONENAND;
47 gpmc_init(); /* reinitialize for OneNAND */
53 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
58 #if defined(CONFIG_MMC)
59 int board_mmc_init(bd_t *bis)
61 return omap_mmc_init(0, 0, 0, -1, -1);
64 void board_mmc_power_init(void)
66 twl4030_power_mmc_init(0);