1 // SPDX-License-Identifier: GPL-2.0+
5 #include <asm/global_data.h>
7 #include <asm/omap_mmc.h>
8 #include <asm/arch/mux.h>
9 #include <asm/arch/sys_proto.h>
10 #include <jffs2/load_kernel.h>
11 #include <linux/delay.h>
12 #include <linux/mtd/rawnand.h>
15 DECLARE_GLOBAL_DATA_PTR;
18 * Routine: set_muxconf_regs
19 * Description: Setting up the configuration Mux registers specific to the
20 * hardware. Many pins need to be moved from protect to primary
23 void set_muxconf_regs(void)
30 * Description: Early hardware init.
36 /* find out flash memory type, assume NAND first */
37 gpmc_cs0_flash = MTD_DEV_TYPE_NAND;
40 /* Issue a RESET and then READID */
41 writeb(NAND_CMD_RESET, &gpmc_cfg->cs[0].nand_cmd);
42 writeb(NAND_CMD_STATUS, &gpmc_cfg->cs[0].nand_cmd);
43 while ((readl(&gpmc_cfg->cs[0].nand_dat) & NAND_STATUS_READY)
44 != NAND_STATUS_READY) {
47 gpmc_cs0_flash = MTD_DEV_TYPE_ONENAND;
48 gpmc_init(); /* reinitialize for OneNAND */
54 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
59 #if defined(CONFIG_MMC)
60 int board_mmc_init(struct bd_info *bis)
62 return omap_mmc_init(0, 0, 0, -1, -1);
65 void board_mmc_power_init(void)
67 twl4030_power_mmc_init(0);