From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott McNutt Date: Tue, 25 May 2010 15:52:14 -0400 Subject: [U-Boot] [PATCH 6/6 v3] nios2: add spi flash support to nios2-generic board In-Reply-To: <1272598458-17946-7-git-send-email-thomas@wytron.com.tw> References: <20100425181430.6CF214C04D@gemini.denx.de> <1272598458-17946-7-git-send-email-thomas@wytron.com.tw> Message-ID: <4BFC2A6E.8020106@psyent.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Thomas, I applied this to: git://git.denx.de/u-boot-nios.git testing after merging with Mike's 'sf' branch at: git://git.denx.de/u-boot-blackfin so we can pickup: [PATCH 5/6 v3] spi_flash: support old STMicro parts with RES I'll merge once Mike's changes are available upstream. In the meantime, the nios testing branch has the entire patch series available. Regards, --Scott Thomas Chou wrote: > This patch enables the altera_spi and spi_flash drivers for the > nios2-generic board. It allows access to the EPCS/SPI flash on > the Altera EP1C20 board. > > Signed-off-by: Thomas Chou > --- > v3: split patches for gpio and spi. > v2: remove mmc_spi_init() > > board/altera/nios2-generic/custom_fpga.h | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/board/altera/nios2-generic/custom_fpga.h b/board/altera/nios2-generic/custom_fpga.h > index 761f605..a11add5 100644 > --- a/board/altera/nios2-generic/custom_fpga.h > +++ b/board/altera/nios2-generic/custom_fpga.h > @@ -35,6 +35,16 @@ > #define CONFIG_SMC91111 > #define CONFIG_SMC_USE_32_BIT > > +/* epcs_controller.epcs_control_port is a altera_avalon_epcs_flash_controller */ > +#define EPCS_CONTROLLER_REG_BASE 0x82100200 > +#define CONFIG_SYS_ALTERA_SPI_LIST { EPCS_CONTROLLER_REG_BASE } > +#define CONFIG_ALTERA_SPI > +#define CONFIG_CMD_SPI > +#define CONFIG_CMD_SF > +#define CONFIG_SF_DEFAULT_SPEED 30000000 > +#define CONFIG_SPI_FLASH > +#define CONFIG_SPI_FLASH_STMICRO > + > /* jtag_uart.avalon_jtag_slave is a altera_avalon_jtag_uart */ > #define CONFIG_SYS_JTAG_UART_BASE 0x821208b0 >