2 * Copyright (C) 2007 - 2010
3 * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 * (C) Copyright 2000-2003
5 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * Copy board_flash_get_legacy() from board/freescale/m54455evb/m54455evb.c
30 #include <asm/processor.h>
35 puts("BOARD: T-SH7706LAN ");
36 if(readb(0xb0008006) == 0xab)
51 DECLARE_GLOBAL_DATA_PTR;
53 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
54 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
55 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
59 int board_eth_init(bd_t *bis)
61 return ne2k_register();
64 void led_set_state(unsigned short value)
69 #if defined(CONFIG_FLASH_CFI_LEGACY)
71 ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
73 int sect[] = CONFIG_SYS_ATMEL_SECT;
74 int sectsz[] = CONFIG_SYS_ATMEL_SECTSZ;
77 if (base != CONFIG_SYS_ATMEL_BASE)
80 info->flash_id = 0x01000000;
83 info->buffer_size = 1;
84 info->erase_blk_tout = 16384;
86 info->buffer_write_tout = 5;
87 info->vendor = 0xFFF0; /* CFI_CMDSET_AMD_LEGACY */
88 info->cmd_reset = 0x00F0;
89 info->interface = FLASH_CFI_X8;
90 info->legacy_unlock = 0;
91 info->manufacturer_id = (u16) ATM_MANUFACT;
92 info->device_id = ATM_ID_LV040;
95 info->cfi_version = 0x3133;
96 info->cfi_offset = 0x0000;
97 info->addr_unlock1 = 0x00000555;
98 info->addr_unlock2 = 0x000002AA;
99 info->name = "CFI conformant";
101 info->sector_count = CONFIG_SYS_ATMEL_TOTALSECT;
102 info->start[0] = base;
104 for (k = 0, i = 0; i < CONFIG_SYS_ATMEL_REGION; i++) {
105 info->size += sect[i] * sectsz[i];
106 for (j = 0; j < sect[i]; j++, k++) {
107 info->start[k + 1] = info->start[k] + sectsz[i];
108 info->protect[k] = 0;
114 #endif /* CONFIG_FLASH_CFI_LEGACY */