Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 2 | /* |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 3 | * (C) Copyright 2004-2011 |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 4 | * Texas Instruments, <www.ti.com> |
| 5 | * |
| 6 | * Author : |
| 7 | * Manikandan Pillai <mani.pillai@ti.com> |
| 8 | * |
| 9 | * Derived from Beagle Board and 3430 SDP code by |
| 10 | * Richard Woodruff <r-woodruff2@ti.com> |
| 11 | * Syed Mohammed Khasim <khasim@ti.com> |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 12 | */ |
| 13 | #include <common.h> |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 14 | #include <dm.h> |
| 15 | #include <ns16550.h> |
Ben Warren | 736fead | 2009-07-20 22:01:11 -0700 | [diff] [blame] | 16 | #include <netdev.h> |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 17 | #include <asm/io.h> |
| 18 | #include <asm/arch/mem.h> |
| 19 | #include <asm/arch/mux.h> |
| 20 | #include <asm/arch/sys_proto.h> |
Vaibhav Hiremath | dcc4f38 | 2011-09-03 21:42:35 -0400 | [diff] [blame] | 21 | #include <asm/arch/mmc_host_def.h> |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 22 | #include <asm/gpio.h> |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 23 | #include <i2c.h> |
Paul Kocialkowski | aac5450 | 2014-11-08 20:55:47 +0100 | [diff] [blame] | 24 | #include <twl4030.h> |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 25 | #include <asm/mach-types.h> |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 26 | #include <asm/omap_musb.h> |
Masahiro Yamada | 6ae3900 | 2017-11-30 13:45:24 +0900 | [diff] [blame] | 27 | #include <linux/mtd/rawnand.h> |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 28 | #include <linux/usb/ch9.h> |
| 29 | #include <linux/usb/gadget.h> |
| 30 | #include <linux/usb/musb.h> |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 31 | #include "evm.h" |
| 32 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 33 | #define OMAP3EVM_GPIO_ETH_RST_GEN1 64 |
| 34 | #define OMAP3EVM_GPIO_ETH_RST_GEN2 7 |
Sriramakrishnan | c068258 | 2011-07-18 09:21:55 -0400 | [diff] [blame] | 35 | |
John Rigby | 2956532 | 2010-12-20 18:27:51 -0700 | [diff] [blame] | 36 | DECLARE_GLOBAL_DATA_PTR; |
| 37 | |
Dirk Behme | b606ef4 | 2010-12-18 07:40:28 +0100 | [diff] [blame] | 38 | static u32 omap3_evm_version; |
Ajay Kumar Gupta | b5abf64 | 2010-06-10 11:20:49 +0530 | [diff] [blame] | 39 | |
Dirk Behme | b606ef4 | 2010-12-18 07:40:28 +0100 | [diff] [blame] | 40 | u32 get_omap3_evm_rev(void) |
Ajay Kumar Gupta | b5abf64 | 2010-06-10 11:20:49 +0530 | [diff] [blame] | 41 | { |
| 42 | return omap3_evm_version; |
| 43 | } |
| 44 | |
| 45 | static void omap3_evm_get_revision(void) |
| 46 | { |
Sanjeev Premi | 76ee9a2 | 2010-11-04 16:02:32 -0400 | [diff] [blame] | 47 | #if defined(CONFIG_CMD_NET) |
| 48 | /* |
| 49 | * Board revision can be ascertained only by identifying |
| 50 | * the Ethernet chipset. |
| 51 | */ |
Ajay Kumar Gupta | b5abf64 | 2010-06-10 11:20:49 +0530 | [diff] [blame] | 52 | unsigned int smsc_id; |
| 53 | |
| 54 | /* Ethernet PHY ID is stored at ID_REV register */ |
| 55 | smsc_id = readl(CONFIG_SMC911X_BASE + 0x50) & 0xFFFF0000; |
| 56 | printf("Read back SMSC id 0x%x\n", smsc_id); |
| 57 | |
| 58 | switch (smsc_id) { |
| 59 | /* SMSC9115 chipset */ |
| 60 | case 0x01150000: |
| 61 | omap3_evm_version = OMAP3EVM_BOARD_GEN_1; |
| 62 | break; |
| 63 | /* SMSC 9220 chipset */ |
| 64 | case 0x92200000: |
| 65 | default: |
| 66 | omap3_evm_version = OMAP3EVM_BOARD_GEN_2; |
| 67 | } |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 68 | #else /* !CONFIG_CMD_NET */ |
Sanjeev Premi | 76ee9a2 | 2010-11-04 16:02:32 -0400 | [diff] [blame] | 69 | #if defined(CONFIG_STATIC_BOARD_REV) |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 70 | /* Look for static defintion of the board revision */ |
Sanjeev Premi | 76ee9a2 | 2010-11-04 16:02:32 -0400 | [diff] [blame] | 71 | omap3_evm_version = CONFIG_STATIC_BOARD_REV; |
| 72 | #else |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 73 | /* Fallback to the default above */ |
Sanjeev Premi | 76ee9a2 | 2010-11-04 16:02:32 -0400 | [diff] [blame] | 74 | omap3_evm_version = OMAP3EVM_BOARD_GEN_2; |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 75 | #endif /* CONFIG_STATIC_BOARD_REV */ |
| 76 | #endif /* CONFIG_CMD_NET */ |
Ajay Kumar Gupta | b5abf64 | 2010-06-10 11:20:49 +0530 | [diff] [blame] | 77 | } |
| 78 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 79 | #if defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST) |
| 80 | /* MUSB port on OMAP3EVM Rev >= E requires extvbus programming. */ |
Ajay Kumar Gupta | 944a489 | 2010-06-10 11:20:50 +0530 | [diff] [blame] | 81 | u8 omap3_evm_need_extvbus(void) |
| 82 | { |
| 83 | u8 retval = 0; |
| 84 | |
| 85 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
| 86 | retval = 1; |
| 87 | |
| 88 | return retval; |
| 89 | } |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 90 | #endif /* CONFIG_USB_MUSB_{GADGET,HOST} */ |
Ajay Kumar Gupta | 944a489 | 2010-06-10 11:20:50 +0530 | [diff] [blame] | 91 | |
| 92 | /* |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 93 | * Routine: board_init |
| 94 | * Description: Early hardware init. |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 95 | */ |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 96 | int board_init(void) |
| 97 | { |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 98 | gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ |
| 99 | /* board id for Linux */ |
| 100 | gd->bd->bi_arch_number = MACH_TYPE_OMAP3EVM; |
| 101 | /* boot param addr */ |
| 102 | gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); |
| 103 | |
| 104 | return 0; |
| 105 | } |
| 106 | |
Derald D. Woods | c257c96 | 2017-09-02 17:43:05 -0500 | [diff] [blame] | 107 | #if defined(CONFIG_SPL_OS_BOOT) |
| 108 | int spl_start_uboot(void) |
| 109 | { |
| 110 | /* break into full u-boot on 'c' */ |
| 111 | if (serial_tstc() && serial_getc() == 'c') |
| 112 | return 1; |
| 113 | |
| 114 | return 0; |
| 115 | } |
| 116 | #endif /* CONFIG_SPL_OS_BOOT */ |
| 117 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 118 | #if defined(CONFIG_SPL_BUILD) |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 119 | /* |
| 120 | * Routine: get_board_mem_timings |
| 121 | * Description: If we use SPL then there is no x-loader nor config header |
| 122 | * so we have to setup the DDR timings ourself on the first bank. This |
| 123 | * provides the timing values back to the function that configures |
| 124 | * the memory. |
| 125 | */ |
Peter Barada | 8c4445d | 2012-11-13 07:40:28 +0000 | [diff] [blame] | 126 | void get_board_mem_timings(struct board_sdrc_timings *timings) |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 127 | { |
| 128 | int pop_mfr, pop_id; |
| 129 | |
| 130 | /* |
| 131 | * We need to identify what PoP memory is on the board so that |
| 132 | * we know what timings to use. To map the ID values please see |
| 133 | * nand_ids.c |
| 134 | */ |
| 135 | identify_nand_chip(&pop_mfr, &pop_id); |
| 136 | |
| 137 | if (pop_mfr == NAND_MFR_HYNIX && pop_id == 0xbc) { |
| 138 | /* 256MB DDR */ |
Peter Barada | 8c4445d | 2012-11-13 07:40:28 +0000 | [diff] [blame] | 139 | timings->mcfg = HYNIX_V_MCFG_200(256 << 20); |
| 140 | timings->ctrla = HYNIX_V_ACTIMA_200; |
| 141 | timings->ctrlb = HYNIX_V_ACTIMB_200; |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 142 | } else { |
| 143 | /* 128MB DDR */ |
Peter Barada | 8c4445d | 2012-11-13 07:40:28 +0000 | [diff] [blame] | 144 | timings->mcfg = MICRON_V_MCFG_165(128 << 20); |
| 145 | timings->ctrla = MICRON_V_ACTIMA_165; |
| 146 | timings->ctrlb = MICRON_V_ACTIMB_165; |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 147 | } |
Peter Barada | 8c4445d | 2012-11-13 07:40:28 +0000 | [diff] [blame] | 148 | timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; |
| 149 | timings->mr = MICRON_V_MR_165; |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 150 | } |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 151 | #endif /* CONFIG_SPL_BUILD */ |
| 152 | |
| 153 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) |
| 154 | static struct musb_hdrc_config musb_config = { |
| 155 | .multipoint = 1, |
| 156 | .dyn_fifo = 1, |
| 157 | .num_eps = 16, |
| 158 | .ram_bits = 12, |
| 159 | }; |
| 160 | |
| 161 | static struct omap_musb_board_data musb_board_data = { |
| 162 | .interface_type = MUSB_INTERFACE_ULPI, |
| 163 | }; |
| 164 | |
| 165 | static struct musb_hdrc_platform_data musb_plat = { |
| 166 | #if defined(CONFIG_USB_MUSB_HOST) |
| 167 | .mode = MUSB_HOST, |
| 168 | #elif defined(CONFIG_USB_MUSB_GADGET) |
| 169 | .mode = MUSB_PERIPHERAL, |
| 170 | #else |
| 171 | #error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET" |
| 172 | #endif /* CONFIG_USB_MUSB_{GADGET,HOST} */ |
| 173 | .config = &musb_config, |
| 174 | .power = 100, |
| 175 | .platform_ops = &omap2430_ops, |
| 176 | .board_data = &musb_board_data, |
| 177 | }; |
| 178 | #endif /* CONFIG_USB_MUSB_OMAP2PLUS */ |
Tom Rini | 673283f | 2011-11-18 12:48:09 +0000 | [diff] [blame] | 179 | |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 180 | /* |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 181 | * Routine: misc_init_r |
| 182 | * Description: Init ethernet (done here so udelay works) |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 183 | */ |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 184 | int misc_init_r(void) |
| 185 | { |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 186 | twl4030_power_init(); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 187 | |
Adam Ford | 94d50be | 2017-08-07 13:11:19 -0500 | [diff] [blame] | 188 | #ifdef CONFIG_SYS_I2C_OMAP24XX |
Heiko Schocher | 6789e84 | 2013-10-22 11:03:18 +0200 | [diff] [blame] | 189 | i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 190 | #endif |
| 191 | |
| 192 | #if defined(CONFIG_CMD_NET) |
| 193 | setup_net_chip(); |
| 194 | #endif |
Sanjeev Premi | 76ee9a2 | 2010-11-04 16:02:32 -0400 | [diff] [blame] | 195 | omap3_evm_get_revision(); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 196 | |
Sanjeev Premi | 6921b31 | 2011-07-18 09:20:15 -0400 | [diff] [blame] | 197 | #if defined(CONFIG_CMD_NET) |
| 198 | reset_net_chip(); |
| 199 | #endif |
Paul Kocialkowski | 679f82c | 2015-08-27 19:37:13 +0200 | [diff] [blame] | 200 | omap_die_id_display(); |
Dirk Behme | e6a6a70 | 2009-03-12 19:30:50 +0100 | [diff] [blame] | 201 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 202 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) |
| 203 | musb_register(&musb_plat, &musb_board_data, (void *)MUSB_BASE); |
| 204 | #endif |
| 205 | |
| 206 | #if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) |
| 207 | omap_die_id_usbethaddr(); |
| 208 | #endif |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 209 | return 0; |
| 210 | } |
| 211 | |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 212 | /* |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 213 | * Routine: set_muxconf_regs |
| 214 | * Description: Setting up the configuration Mux registers specific to the |
| 215 | * hardware. Many pins need to be moved from protect to primary |
| 216 | * mode. |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 217 | */ |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 218 | void set_muxconf_regs(void) |
| 219 | { |
| 220 | MUX_EVM(); |
| 221 | } |
| 222 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 223 | #if defined(CONFIG_CMD_NET) |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 224 | /* |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 225 | * Routine: setup_net_chip |
| 226 | * Description: Setting up the configuration GPMC registers specific to the |
| 227 | * Ethernet hardware. |
Tom Rix | 5891151 | 2009-04-01 22:02:20 -0500 | [diff] [blame] | 228 | */ |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 229 | static void setup_net_chip(void) |
| 230 | { |
Dirk Behme | 97a099e | 2009-08-08 09:30:21 +0200 | [diff] [blame] | 231 | struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE; |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 232 | |
| 233 | /* Configure GPMC registers */ |
Dirk Behme | 8941135 | 2009-08-08 09:30:22 +0200 | [diff] [blame] | 234 | writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1); |
| 235 | writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2); |
| 236 | writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3); |
| 237 | writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4); |
| 238 | writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5); |
| 239 | writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6); |
| 240 | writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 241 | |
| 242 | /* Enable off mode for NWE in PADCONF_GPMC_NWE register */ |
| 243 | writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe); |
| 244 | /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */ |
| 245 | writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe); |
| 246 | /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */ |
| 247 | writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00, |
| 248 | &ctrl_base->gpmc_nadv_ale); |
Sanjeev Premi | 6921b31 | 2011-07-18 09:20:15 -0400 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Reset the ethernet chip. |
| 253 | */ |
| 254 | static void reset_net_chip(void) |
| 255 | { |
Sriramakrishnan | c068258 | 2011-07-18 09:21:55 -0400 | [diff] [blame] | 256 | int ret; |
| 257 | int rst_gpio; |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 258 | |
Sriramakrishnan | c068258 | 2011-07-18 09:21:55 -0400 | [diff] [blame] | 259 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) { |
| 260 | rst_gpio = OMAP3EVM_GPIO_ETH_RST_GEN1; |
| 261 | } else { |
| 262 | rst_gpio = OMAP3EVM_GPIO_ETH_RST_GEN2; |
| 263 | } |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 264 | |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 265 | ret = gpio_request(rst_gpio, ""); |
Sriramakrishnan | c068258 | 2011-07-18 09:21:55 -0400 | [diff] [blame] | 266 | if (ret < 0) { |
| 267 | printf("Unable to get GPIO %d\n", rst_gpio); |
| 268 | return ; |
| 269 | } |
| 270 | |
| 271 | /* Configure as output */ |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 272 | gpio_direction_output(rst_gpio, 0); |
Sriramakrishnan | c068258 | 2011-07-18 09:21:55 -0400 | [diff] [blame] | 273 | |
| 274 | /* Send a pulse on the GPIO pin */ |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 275 | gpio_set_value(rst_gpio, 1); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 276 | udelay(1); |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 277 | gpio_set_value(rst_gpio, 0); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 278 | udelay(1); |
Sanjeev Premi | 84c3b63 | 2011-09-08 10:51:01 -0400 | [diff] [blame] | 279 | gpio_set_value(rst_gpio, 1); |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 280 | } |
Ben Warren | 736fead | 2009-07-20 22:01:11 -0700 | [diff] [blame] | 281 | |
| 282 | int board_eth_init(bd_t *bis) |
| 283 | { |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 284 | #if defined(CONFIG_SMC911X) |
Derald D. Woods | 836e67e | 2017-12-16 14:14:50 -0600 | [diff] [blame] | 285 | env_set("ethaddr", NULL); |
| 286 | return smc911x_initialize(0, CONFIG_SMC911X_BASE); |
| 287 | #else |
| 288 | return 0; |
| 289 | #endif |
Ben Warren | 736fead | 2009-07-20 22:01:11 -0700 | [diff] [blame] | 290 | } |
Sanjeev Premi | 5626f33 | 2011-07-18 09:23:00 -0400 | [diff] [blame] | 291 | #endif /* CONFIG_CMD_NET */ |
Vaibhav Hiremath | dcc4f38 | 2011-09-03 21:42:35 -0400 | [diff] [blame] | 292 | |
Masahiro Yamada | 4aa2ba3 | 2017-05-09 20:31:39 +0900 | [diff] [blame] | 293 | #if defined(CONFIG_MMC) |
Vaibhav Hiremath | dcc4f38 | 2011-09-03 21:42:35 -0400 | [diff] [blame] | 294 | int board_mmc_init(bd_t *bis) |
| 295 | { |
Nikita Kiryanov | e3913f5 | 2012-12-03 02:19:47 +0000 | [diff] [blame] | 296 | return omap_mmc_init(0, 0, 0, -1, -1); |
Vaibhav Hiremath | dcc4f38 | 2011-09-03 21:42:35 -0400 | [diff] [blame] | 297 | } |
Paul Kocialkowski | aac5450 | 2014-11-08 20:55:47 +0100 | [diff] [blame] | 298 | |
Paul Kocialkowski | aac5450 | 2014-11-08 20:55:47 +0100 | [diff] [blame] | 299 | void board_mmc_power_init(void) |
| 300 | { |
| 301 | twl4030_power_mmc_init(0); |
| 302 | } |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 303 | #endif /* CONFIG_MMC */ |
| 304 | |
Derald D. Woods | 0d43fde | 2017-08-06 00:00:21 -0500 | [diff] [blame] | 305 | #if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) && !defined(CONFIG_CMD_NET) |
| 306 | int board_eth_init(bd_t *bis) |
| 307 | { |
| 308 | return usb_eth_initialize(bis); |
| 309 | } |
| 310 | #endif /* CONFIG_USB_ETHER */ |