2 * MATRIX VISION GmbH mvBlueLYNX-X
4 * Derived from Beagle and Overo
6 * (C) Copyright 2004-2008
7 * Texas Instruments, <www.ti.com>
10 * Sunil Kumar <sunilsaini05@gmail.com>
11 * Shashi Ranjan <shashiranjanmca05@gmail.com>
13 * Derived from Beagle Board and 3430 SDP code by
14 * Richard Woodruff <r-woodruff2@ti.com>
15 * Syed Mohammed Khasim <khasim@ti.com>
18 * See file CREDITS for list of people who contributed to this
21 * This program is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU General Public License as
23 * published by the Free Software Foundation; either version 2 of
24 * the License, or (at your option) any later version.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
40 #include <asm/arch/mem.h>
41 #include <asm/arch/mmc_host_def.h>
42 #include <asm/arch/mux.h>
43 #include <asm/arch/sys_proto.h>
44 #include <asm/arch/gpio.h>
45 #include <asm/mach-types.h>
49 DECLARE_GLOBAL_DATA_PTR;
51 #if defined(CONFIG_CMD_NET)
52 static void setup_net_chip(void);
53 #endif /* CONFIG_CMD_NET */
57 * Description: Early hardware init.
61 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
63 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
69 * Routine: misc_init_r
70 * Description: Configure board specific parts
74 printf("mvBlueLYNX-X\n");
75 if (get_cpu_family() == CPU_OMAP36XX)
76 setenv("mpurate", "1000");
78 setenv("mpurate", "600");
82 #if defined(CONFIG_CMD_NET)
84 #endif /* CONFIG_CMD_NET */
88 mac_read_from_eeprom();
96 * Routine: set_muxconf_regs
97 * Description: Setting up the configuration Mux registers specific to the
98 * hardware. Many pins need to be moved from protect to primary
101 void set_muxconf_regs(void)
106 #ifdef CONFIG_GENERIC_MMC
107 int board_mmc_init(bd_t *bis)
109 omap_mmc_init(0, 0, 0, -1, -1);
110 omap_mmc_init(1, 0, 0, -1, -1);
115 #if defined(CONFIG_CMD_NET)
117 * Routine: setup_net_chip
118 * Description: Setting up the configuration GPMC registers specific to the
121 static void setup_net_chip(void)
123 struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
124 struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
126 /* Configure GPMC registers */
127 writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[0].config1);
128 writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[0].config2);
129 writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[0].config3);
130 writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[0].config4);
131 writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[0].config5);
132 writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[0].config6);
133 writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[0].config7);
135 /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
136 writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
137 /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
138 writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
139 /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
140 writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
141 &ctrl_base->gpmc_nadv_ale);
143 /* Make GPIO 139 as output pin */
144 writel(readl(&gpio5_base->oe) & ~(GPIO11), &gpio5_base->oe);
146 /* Now send a pulse on the GPIO pin */
147 writel(GPIO11, &gpio5_base->setdataout);
149 writel(GPIO11, &gpio5_base->cleardataout);
151 writel(GPIO11, &gpio5_base->setdataout);
154 int board_eth_init(bd_t *bis)
157 #ifdef CONFIG_SMC911X
158 rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
163 int overwrite_console(void)
165 /* return true if console should be overwritten */
169 #endif /* CONFIG_CMD_NET */