3
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4
* Marius Groeger <mgroeger@sysgo.de>
7
* David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
10
* Texas Instruments, <www.ti.com>
11
* Kshitij Gupta <Kshitij@ti.com>
13
* See file CREDITS for list of people who contributed to this
16
* This program is free software; you can redistribute it and/or
17
* modify it under the terms of the GNU General Public License as
18
* published by the Free Software Foundation; either version 2 of
19
* the License, or (at your option) any later version.
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
26
* You should have received a copy of the GNU General Public License
27
* along with this program; if not, write to the Free Software
28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35
DECLARE_GLOBAL_DATA_PTR;
37
static void flash__init (void);
38
static void ether__init (void);
40
static inline void delay (unsigned long loops)
42
__asm__ volatile ("1:\n"
44
"bne 1b":"=r" (loops):"0" (loops));
48
* Miscellaneous platform dependent initialisations
53
/* arch number of OMAP 1510-Board */
54
gd->bd->bi_arch_number = MACH_TYPE_OMAP_INNOVATOR;
56
/* adress of boot parameters */
57
gd->bd->bi_boot_params = 0x10000100;
59
/* kk - this speeds up your boot a quite a bit. However to make it
60
* work, you need make sure your kernel startup flush bug is fixed.
71
int misc_init_r (void)
73
/* volatile ushort *gdir = (ushort *) (GPIO_DIR_CONTROL_REG); */
74
/* volatile ushort *mdir = (ushort *) (MPUIO_DIR_CONTROL_REG); */
76
/* setup gpio direction to match board (no floats!) */
83
/******************************
86
******************************/
87
static void flash__init (void)
89
#define CS0_CHIP_SELECT_REG 0xfffecc10
90
#define CS3_CHIP_SELECT_REG 0xfffecc1c
91
#define EMIFS_GlB_Config_REG 0xfffecc0c
96
regval = *((volatile unsigned int *) EMIFS_GlB_Config_REG);
97
regval = regval | 0x0001; /* Turn off write protection for flash devices. */
98
if (regval & 0x0002) {
99
regval = regval & 0xfffd; /* Swap CS0 and CS3 so that flash is visible at 0x0 and eeprom at 0x0c000000. */
100
/* If, instead, you want to reference flash at 0x0c000000, then it seemed the following were necessary. */
101
/* *((volatile unsigned int *)CS0_CHIP_SELECT_REG) = 0x202090; / * Overrides head.S setting of 0x212090 */
102
/* *((volatile unsigned int *)CS3_CHIP_SELECT_REG) = 0x202090; / * Let's flash chips be fully functional. */
104
*((volatile unsigned int *) EMIFS_GlB_Config_REG) = regval;
109
/******************************
112
******************************/
113
static void ether__init (void)
115
#define ETH_CONTROL_REG 0x0800000b
116
/* take the Ethernet controller out of reset and wait
117
* for the EEPROM load to complete.
119
*((volatile unsigned char *) ETH_CONTROL_REG) &= ~0x01;
126
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
127
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
132
#ifdef CONFIG_CMD_NET
133
int board_eth_init(bd_t *bis)
136
#ifdef CONFIG_LAN91C96
137
rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);