Commit 4dc04ebfa3dc4307a6fbe7348f4cacaeec306056

Authored by Jagan Teki
Committed by Tom Rini
1 parent ca57bd6718

at91: ma5d4evk: Enable DM_SPI

AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to
use dm functionality.

Kept few functions related to non-dm and gpio on board
files for reference and will be remove once code moved
to relevant drivers.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Showing 2 changed files with 5 additions and 3 deletions Side-by-side Diff

arch/arm/mach-at91/Kconfig
... ... @@ -201,6 +201,7 @@
201 201 select SAMA5D4
202 202 select SUPPORT_SPL
203 203 select DM
  204 + select DM_SPI
204 205  
205 206 config TARGET_MEESC
206 207 bool "Support meesc"
board/aries/ma5d4evk/ma5d4evk.c
... ... @@ -30,7 +30,8 @@
30 30  
31 31 static u8 boot_mode_sf;
32 32  
33   -#ifdef CONFIG_ATMEL_SPI
  33 +/* FIXME gpio code here need to handle through DM_GPIO */
  34 +#ifndef CONFIG_DM_SPI
34 35 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
35 36 {
36 37 return bus == 0 && cs == 0;
... ... @@ -57,7 +58,7 @@
57 58 /* Enable clock */
58 59 at91_periph_clk_enable(ATMEL_ID_SPI0);
59 60 }
60   -#endif /* CONFIG_ATMEL_SPI */
  61 +#endif /* CONFIG_DM_SPI */
61 62  
62 63 #ifdef CONFIG_CMD_USB
63 64 static void ma5d4evk_usb_hw_init(void)
... ... @@ -292,7 +293,7 @@
292 293 /* adress of boot parameters */
293 294 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
294 295  
295   -#ifdef CONFIG_ATMEL_SPI
  296 +#ifndef CONFIG_DM_SPI
296 297 ma5d4evk_spi0_hw_init();
297 298 #endif
298 299 #ifdef CONFIG_GENERIC_ATMEL_MCI