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