3 * Common functions for OMAP4 based boards
6 * Texas Instruments, <www.ti.com>
9 * Aneesh V <aneesh@ti.com>
10 * Steve Sakoman <steve@sakoman.com>
12 * See file CREDITS for list of people who contributed to this
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 #include <asm/arch/cpu.h>
32 #include <asm/arch/sys_proto.h>
36 * Description: Does early system init of muxing and clocks.
37 * - Called path is with SRAM stack.
45 * Routine: wait_for_command_complete
46 * Description: Wait for posting to finish on watchdog
48 void wait_for_command_complete(struct watchdog *wd_base)
52 pending = readl(&wd_base->wwps);
57 * Routine: watchdog_init
58 * Description: Shut down watch dogs
60 void watchdog_init(void)
62 struct watchdog *wd2_base = (struct watchdog *)WDT2_BASE;
64 writel(WD_UNLOCK1, &wd2_base->wspr);
65 wait_for_command_complete(wd2_base);
66 writel(WD_UNLOCK2, &wd2_base->wspr);
71 * Description: sets uboots idea of sdram size
75 DECLARE_GLOBAL_DATA_PTR;
77 gd->bd->bi_dram[0].start = 0x80000000;
78 gd->bd->bi_dram[0].size = 512 << 20;
83 * Print board information
87 puts(sysinfo.board_string);