diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2010-04-21 08:40:59 +0800 |
---|---|---|
committer | Scott McNutt <smcnutt@psyent.com> | 2010-04-24 18:21:23 -0400 |
commit | 8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031 (patch) | |
tree | 038e10bb50a7e36124f800d968fbee534082e747 /board/altera/nios2-generic/custom_fpga.h | |
parent | 441cac10d8a9438b144ab0ad46280780b58f638b (diff) | |
download | u-boot-imx-8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031.zip u-boot-imx-8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031.tar.gz u-boot-imx-8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031.tar.bz2 |
nios2: add nios2-generic board
This is a generic approach to port u-boot for nios2 boards.
You may find the usage of this approach on the nioswiki,
http://nioswiki.com/DasUBoot
A fpga parameter file, which contains base address information
and drivers declaration, is generated from Altera's hardware system
description sopc file using tools.
The example fpga parameter file is compatible with EP1C20, EP1S10
and EP1S40 boards. So these boards can be removed after this commit.
Though epcs controller is removed to cut the dependency of altera_spi
driver.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Diffstat (limited to 'board/altera/nios2-generic/custom_fpga.h')
-rw-r--r-- | board/altera/nios2-generic/custom_fpga.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/board/altera/nios2-generic/custom_fpga.h b/board/altera/nios2-generic/custom_fpga.h new file mode 100644 index 0000000..761f605 --- /dev/null +++ b/board/altera/nios2-generic/custom_fpga.h @@ -0,0 +1,66 @@ +/* + * (C) Copyright 2010, Thomas Chou <thomas@wytron.com.tw> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file is generated by sopc-create-config-files. + */ +#ifndef _CUSTOM_FPGA_H_ +#define _CUSTOM_FPGA_H_ + +/* generated from std_1c20.sopc */ + +/* cpu.data_master is a altera_nios2 */ +#define CONFIG_SYS_CLK_FREQ 50000000 +#define CONFIG_SYS_RESET_ADDR 0x00000000 +#define CONFIG_SYS_EXCEPTION_ADDR 0x01000020 +#define CONFIG_SYS_ICACHE_SIZE 4096 +#define CONFIG_SYS_ICACHELINE_SIZE 32 +#define CONFIG_SYS_DCACHE_SIZE 2048 +#define CONFIG_SYS_DCACHELINE_SIZE 4 + +/* sdram.s1 is a altera_avalon_new_sdram_controller */ +#define CONFIG_SYS_SDRAM_BASE 0x01000000 +#define CONFIG_SYS_SDRAM_SIZE 0x01000000 + +/* uart1.s1 is a altera_avalon_uart */ +#define CONFIG_SYS_UART_BASE 0x82120840 +#define CONFIG_SYS_UART_FREQ 50000000 +#define CONFIG_SYS_UART_BAUD 115200 + +/* lan91c111.s1 is a altera_avalon_lan91c111 */ +#define CONFIG_SMC91111_BASE 0x82110300 +#define CONFIG_SMC91111 +#define CONFIG_SMC_USE_32_BIT + +/* jtag_uart.avalon_jtag_slave is a altera_avalon_jtag_uart */ +#define CONFIG_SYS_JTAG_UART_BASE 0x821208b0 + +/* led_pio.s1 is a altera_avalon_pio */ +#define LED_PIO_BASE 0x82120870 + +/* high_res_timer.s1 is a altera_avalon_timer */ +#define CONFIG_SYS_TIMER_BASE 0x82120820 +#define CONFIG_SYS_TIMER_IRQ 3 +#define CONFIG_SYS_TIMER_FREQ 50000000 + +/* ext_flash.s1 is a altera_avalon_cfi_flash */ +#define CONFIG_SYS_FLASH_BASE 0x80000000 +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_SYS_CFI_FLASH_STATUS_POLL /* fix amd flash issue */ +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE +#define CONFIG_SYS_FLASH_PROTECTION +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +#define CONFIG_SYS_MAX_FLASH_SECT 1024 + +/* ext_ram.s1 is a altera_nios_dev_kit_stratix_edition_sram2 */ +#define CONFIG_SYS_SRAM_BASE 0x02000000 +#define CONFIG_SYS_SRAM_SIZE 0x00100000 + +/* sysid.control_slave is a altera_avalon_sysid */ +#define CONFIG_SYS_SYSID_BASE 0x821208b8 + +#endif /* _CUSTOM_FPGA_H_ */ |