2 * (C) Copyright 2009 Faraday Technology
3 * Po-Yu Chuang <ratbert@faraday-tech.com>
5 * SPDX-License-Identifier: GPL-2.0+
12 #include <faraday/ftsmc020.h>
14 DECLARE_GLOBAL_DATA_PTR;
17 * Miscellaneous platform dependent initialisations
22 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
24 ftsmc020_init(); /* initialize Flash */
30 unsigned long sdram_base = PHYS_SDRAM_1;
31 unsigned long expected_size = PHYS_SDRAM_1_SIZE;
32 unsigned long actual_size;
34 actual_size = get_ram_size((void *)sdram_base, expected_size);
36 gd->ram_size = actual_size;
38 if (expected_size != actual_size)
39 printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
40 actual_size >> 20, expected_size >> 20);
45 int board_eth_init(bd_t *bd)
47 return ftmac100_initialize(bd);
50 ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
52 if (banknum == 0) { /* non-CFI boot flash */
53 info->portwidth = FLASH_CFI_8BIT;
54 info->chipwidth = FLASH_CFI_BY8;
55 info->interface = FLASH_CFI_X8;