2 * Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
4 * (C) Copyright 2002 2003
5 * Network Audio Technologies, Inc. <www.netaudiotech.com>
6 * Adam Bezanson <bezanson@netaudiotech.com>
8 * See file CREDITS for list of people who contributed to this
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 #include <asm/arch/ep93xx.h>
32 DECLARE_GLOBAL_DATA_PTR;
34 #define MAX_BANK_SIZE 0x04000000 /* 64 MB */
36 static ulong const bank_addr[CONFIG_NR_DRAM_BANKS] = {
51 struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
60 * set UARTBAUD bit to drive UARTs with 14.7456MHz instead of
63 uint32_t value = readl(&syscon->pwrcnt);
64 value |= SYSCON_PWRCNT_UART_BAUD;
65 writel(value, &syscon->pwrcnt);
67 /* Enable the uart in devicecfg */
68 value = readl(&syscon->devicecfg);
69 value |= 1<<18 /* U1EN */;
70 writel(0xAA, &syscon->sysswlock);
71 writel(value, &syscon->devicecfg);
73 /* Machine number, as defined in linux/arch/arm/tools/mach-types */
74 gd->bd->bi_arch_number = CONFIG_MACH_TYPE;
76 /* adress of boot parameters */
77 gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
79 /* We have a console */
85 int board_eth_init(bd_t *bd)
87 return ep93xx_eth_initialize(0, MAC_BASE);
92 unsigned int *src, *dst;
95 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
96 const ulong bank_size = get_ram_size((long *)bank_addr[i],
99 gd->bd->bi_dram[i].start = bank_addr[i];
100 gd->bd->bi_dram[i].size = bank_size;
104 /* copy exception vectors */
105 src = (unsigned int *)_armboot_start;
106 dst = (unsigned int *)PHYS_SDRAM_1;
107 memcpy(dst, src, 16 * sizeof(unsigned int));