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 * Guennadi Liakhovetki, DENX Software Engineering, <lg@denx.de>
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,
33 #include <asm/arch/s3c6400.h>
35 /* ------------------------------------------------------------------------- */
36 #define CS8900_Tacs 0x0 /* 0clk address set-up */
37 #define CS8900_Tcos 0x4 /* 4clk chip selection set-up */
38 #define CS8900_Tacc 0xE /* 14clk access cycle */
39 #define CS8900_Tcoh 0x1 /* 1clk chip selection hold */
40 #define CS8900_Tah 0x4 /* 4clk address holding time */
41 #define CS8900_Tacp 0x6 /* 6clk page mode access cycle */
42 #define CS8900_PMC 0x0 /* normal(1data)page mode configuration */
44 static inline void delay(unsigned long loops)
46 __asm__ volatile ("1:\n" "subs %0, %1, #1\n"
48 : "=r" (loops) : "0" (loops));
52 * Miscellaneous platform dependent initialisations
55 static void cs8900_pre_init(void)
57 SROM_BW_REG &= ~(0xf << 4);
58 SROM_BW_REG |= (1 << 7) | (1 << 6) | (1 << 4);
59 SROM_BC1_REG = ((CS8900_Tacs << 28) + (CS8900_Tcos << 24) +
60 (CS8900_Tacc << 16) + (CS8900_Tcoh << 12) +
61 (CS8900_Tah << 8) + (CS8900_Tacp << 4) + CS8900_PMC);
66 DECLARE_GLOBAL_DATA_PTR;
70 /* NOR-flash in SROM0 */
73 SROM_BW_REG |= 4 | 8 | 1;
75 gd->bd->bi_arch_number = MACH_TYPE;
76 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
83 DECLARE_GLOBAL_DATA_PTR;
85 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
86 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
91 #ifdef CONFIG_DISPLAY_BOARDINFO
94 printf("Board: SMDK6400\n");
99 #ifdef CONFIG_ENABLE_MMU
100 ulong virt_to_phy_smdk6400(ulong addr)
102 if ((0xc0000000 <= addr) && (addr < 0xc8000000))
103 return addr - 0xc0000000 + 0x50000000;
105 printf("do not support this address : %08lx\n", addr);
111 ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t *info)
113 if (banknum == 0) { /* non-CFI boot flash */
114 info->portwidth = FLASH_CFI_16BIT;
115 info->chipwidth = FLASH_CFI_BY16;
116 info->interface = FLASH_CFI_X16;
122 #ifdef CONFIG_CMD_NET
123 int board_eth_init(bd_t *bis)
127 rc = cs8900_initialize(0, CONFIG_CS8900_BASE);