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/mtd/rawnand.h>
13 DECLARE_GLOBAL_DATA_PTR;
16 * Routine: set_muxconf_regs
17 * Description: Setting up the configuration Mux registers specific to the
18 * hardware. Many pins need to be moved from protect to primary
21 void set_muxconf_regs(void)
28 * Description: Early hardware init.
34 /* find out flash memory type, assume NAND first */
35 gpmc_cs0_flash = MTD_DEV_TYPE_NAND;
38 /* Issue a RESET and then READID */
39 writeb(NAND_CMD_RESET, &gpmc_cfg->cs[0].nand_cmd);
40 writeb(NAND_CMD_STATUS, &gpmc_cfg->cs[0].nand_cmd);
41 while ((readl(&gpmc_cfg->cs[0].nand_dat) & NAND_STATUS_READY)
42 != NAND_STATUS_READY) {
45 gpmc_cs0_flash = MTD_DEV_TYPE_ONENAND;
46 gpmc_init(); /* reinitialize for OneNAND */
52 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
57 #if defined(CONFIG_MMC)
58 int board_mmc_init(bd_t *bis)
60 return omap_mmc_init(0, 0, 0, -1, -1);
63 void board_mmc_power_init(void)
65 twl4030_power_mmc_init(0);