1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * am3517crane.c - board file for AM3517 CraneBoard 4 * 5 * Author: Srinath.R <srinath@mistralsolutions.com> 6 * 7 * Based on logicpd/am3517evm/am3517evm.c 8 * 9 * Copyright (C) 2011 Mistral Solutions Pvt Ltd 10 */ 11 12 #include <common.h> 13 #include <asm/io.h> 14 #include <asm/arch/mmc_host_def.h> 15 #include <asm/arch/mem.h> 16 #include <asm/arch/mux.h> 17 #include <asm/arch/sys_proto.h> 18 #include <asm/mach-types.h> 19 #include <i2c.h> 20 #include "am3517crane.h" 21 22 DECLARE_GLOBAL_DATA_PTR; 23 24 /* 25 * Routine: board_init 26 * Description: Early hardware init. 27 */ board_init(void)28int board_init(void) 29 { 30 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ 31 /* board id for Linux */ 32 gd->bd->bi_arch_number = MACH_TYPE_CRANEBOARD; 33 /* boot param addr */ 34 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); 35 36 return 0; 37 } 38 39 /* 40 * Routine: misc_init_r 41 * Description: Init i2c, ethernet, etc... (done here so udelay works) 42 */ misc_init_r(void)43int misc_init_r(void) 44 { 45 #ifdef CONFIG_SYS_I2C_OMAP24XX 46 i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); 47 #endif 48 49 omap_die_id_display(); 50 51 return 0; 52 } 53 54 /* 55 * Routine: set_muxconf_regs 56 * Description: Setting up the configuration Mux registers specific to the 57 * hardware. Many pins need to be moved from protect to primary 58 * mode. 59 */ set_muxconf_regs(void)60void set_muxconf_regs(void) 61 { 62 MUX_AM3517CRANE(); 63 } 64 65 #if defined(CONFIG_MMC) board_mmc_init(bd_t * bis)66int board_mmc_init(bd_t *bis) 67 { 68 return omap_mmc_init(0, 0, 0, -1, -1); 69 } 70 #endif 71