Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Srinath | 714194e | 2011-04-18 17:40:35 -0400 | [diff] [blame] | 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 |
Srinath | 714194e | 2011-04-18 17:40:35 -0400 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #include <common.h> |
| 13 | #include <asm/io.h> |
Tom Rini | 54c0b7b | 2011-09-03 21:51:50 -0400 | [diff] [blame] | 14 | #include <asm/arch/mmc_host_def.h> |
Srinath | 714194e | 2011-04-18 17:40:35 -0400 | [diff] [blame] | 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 | */ |
| 28 | int 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 | */ |
| 43 | int misc_init_r(void) |
| 44 | { |
Adam Ford | 49e96f2 | 2017-08-07 13:11:19 -0500 | [diff] [blame] | 45 | #ifdef CONFIG_SYS_I2C_OMAP24XX |
Heiko Schocher | f53f2b8 | 2013-10-22 11:03:18 +0200 | [diff] [blame] | 46 | i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); |
Srinath | 714194e | 2011-04-18 17:40:35 -0400 | [diff] [blame] | 47 | #endif |
| 48 | |
Paul Kocialkowski | 6bc318e | 2015-08-27 19:37:13 +0200 | [diff] [blame] | 49 | omap_die_id_display(); |
Srinath | 714194e | 2011-04-18 17:40:35 -0400 | [diff] [blame] | 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 | */ |
| 60 | void set_muxconf_regs(void) |
| 61 | { |
| 62 | MUX_AM3517CRANE(); |
| 63 | } |
Tom Rini | 54c0b7b | 2011-09-03 21:51:50 -0400 | [diff] [blame] | 64 | |
Masahiro Yamada | 0a78017 | 2017-05-09 20:31:39 +0900 | [diff] [blame] | 65 | #if defined(CONFIG_MMC) |
Tom Rini | 54c0b7b | 2011-09-03 21:51:50 -0400 | [diff] [blame] | 66 | int board_mmc_init(bd_t *bis) |
| 67 | { |
Nikita Kiryanov | 4be9dbc | 2012-12-03 02:19:47 +0000 | [diff] [blame] | 68 | return omap_mmc_init(0, 0, 0, -1, -1); |
Tom Rini | 54c0b7b | 2011-09-03 21:51:50 -0400 | [diff] [blame] | 69 | } |
| 70 | #endif |