Commit 7853c508e4d501aaff42b8aa6ab079fedd110fae

Authored by Stefan Roese
Committed by Luka Perkov
1 parent 4bfcc54c0b

arm: mvebu: db-88f6820-gp: Add SDIO/MMC SPL boot support

This patch adds the configuration options to boot via SDIO/MMC on the
Marvell DB-88F6820-GP Armada A38x board. The default boot device
is still SPI NOR flash.

To enable MMC booting on this board 2 things need to be changes:
a) Change kwbimage.cfg
   BOOT_FROM   sdio
b) In the config header select
   #define CONFIG_SPL_BOOT_DEVICE	SPL_BOOT_SDIO_MMC_CARD

The generated image needs to be copied to the first bootable MMC
partition:

dd if=u-boot-spl.kwb of=/dev/sdX1

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>

Showing 1 changed file with 28 additions and 0 deletions Side-by-side Diff

include/configs/db-88f6820-gp.h
... ... @@ -110,6 +110,17 @@
110 110 "initrd_high=0x10000000\0"
111 111  
112 112 /* SPL */
  113 +/*
  114 + * Select the boot device here
  115 + *
  116 + * Currently supported are:
  117 + * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash
  118 + * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1)
  119 + */
  120 +#define SPL_BOOT_SPI_NOR_FLASH 1
  121 +#define SPL_BOOT_SDIO_MMC_CARD 2
  122 +#define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SPI_NOR_FLASH
  123 +
113 124 /* Defines for SPL */
114 125 #define CONFIG_SPL_FRAMEWORK
115 126 #define CONFIG_SPL_SIZE (140 << 10)
... ... @@ -131,6 +142,7 @@
131 142 #define CONFIG_SPL_SERIAL_SUPPORT
132 143 #define CONFIG_SPL_I2C_SUPPORT
133 144  
  145 +#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
134 146 /* SPL related SPI defines */
135 147 #define CONFIG_SPL_SPI_SUPPORT
136 148 #define CONFIG_SPL_SPI_FLASH_SUPPORT
... ... @@ -138,6 +150,22 @@
138 150 #define CONFIG_SPL_SPI_BUS 0
139 151 #define CONFIG_SPL_SPI_CS 0
140 152 #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
  153 +#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
  154 +#endif
  155 +
  156 +#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
  157 +/* SPL related MMC defines */
  158 +#define CONFIG_SPL_MMC_SUPPORT
  159 +#define CONFIG_SPL_LIBDISK_SUPPORT
  160 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
  161 +#define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10)
  162 +#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
  163 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (CONFIG_SYS_U_BOOT_OFFS / 512)
  164 +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS ((512 << 10) / 512) /* 512KiB */
  165 +#ifdef CONFIG_SPL_BUILD
  166 +#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
  167 +#endif
  168 +#endif
141 169  
142 170 /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */
143 171 #define CONFIG_SYS_MVEBU_DDR_A38X