From 94db5120d874821e5fd1847e1825759aaf74290b Mon Sep 17 00:00:00 2001 From: "Wenyou.Yang@microchip.com" Date: Fri, 21 Jul 2017 14:30:57 +0800 Subject: board: ethernut5: Update to support DT and DM Add the dts files to support deivce tree, update the configuration files to support the device tree and driver model. The peripheral clock and pins configuration are handled by the clock and the pinctrl drivers respectively. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- board/egnite/ethernut5/ethernut5.c | 54 -------------------------------------- 1 file changed, 54 deletions(-) (limited to 'board') diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c index 2c8e978eb3..d64c3456b1 100644 --- a/board/egnite/ethernut5/ethernut5.c +++ b/board/egnite/ethernut5/ethernut5.c @@ -58,8 +58,6 @@ #include #include #include -#include -#include #include #include @@ -67,7 +65,6 @@ #include #include #include -#include #include #include #include @@ -77,25 +74,6 @@ DECLARE_GLOBAL_DATA_PTR; -AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS]; - -struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = { - {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0} -}; - -/* - * In fact we have 7 partitions, but u-boot supports 5 only. This is - * no big deal, because the first partition is reserved for applications - * and the last one is used by Nut/OS. Both need not to be visible here. - */ -dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { - { 0x00021000, 0x00041FFF, FLAG_PROTECT_SET, 0, "setup" }, - { 0x00042000, 0x000C5FFF, FLAG_PROTECT_SET, 0, "uboot" }, - { 0x000C6000, 0x00359FFF, FLAG_PROTECT_SET, 0, "kernel" }, - { 0x0035A000, 0x003DDFFF, FLAG_PROTECT_SET, 0, "nutos" }, - { 0x003DE000, 0x003FEFFF, FLAG_PROTECT_CLEAR, 0, "env" } -}; - /* * This is called last during early initialization. Most of the basic * hardware interfaces are up and running. @@ -158,13 +136,9 @@ int board_init(void) /* Set adress of boot parameters. */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; /* Initialize UARTs and power management. */ - at91_seriald_hw_init(); ethernut5_power_init(); #ifdef CONFIG_CMD_NAND ethernut5_nand_hw_init(); -#endif -#ifdef CONFIG_HAS_DATAFLASH - at91_spi0_hw_init(1 << 0); #endif return 0; } @@ -221,31 +195,3 @@ int board_mmc_getcd(struct mmc *mmc) return !at91_get_pio_value(CONFIG_SYS_MMC_CD_PIN); } #endif - -#ifdef CONFIG_ATMEL_SPI -/* - - * Note, that u-boot uses different code for SPI bus access. While - * memory routines use automatic chip select control, the serial - * flash support requires 'manual' GPIO control. Thus, we switch - * modes. - */ -void spi_cs_activate(struct spi_slave *slave) -{ - /* Enable NPCS0 in GPIO mode. This disables peripheral control. */ - at91_set_pio_output(AT91_PIO_PORTA, 3, 0); -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - /* Disable NPCS0 in GPIO mode. */ - at91_set_pio_output(AT91_PIO_PORTA, 3, 1); - /* Switch back to peripheral chip select control. */ - at91_set_a_periph(AT91_PIO_PORTA, 3, 1); -} - -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs == 0; -} -#endif -- cgit