diff options
author | Simon Glass <sjg@chromium.org> | 2016-09-24 18:20:10 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 15:07:35 -0400 |
commit | ea022a3775a723a90ee91dfa100ac95a5379e93d (patch) | |
tree | 972265801e6c27bc402680afe4571b3234bbbe05 /board | |
parent | 139db7af4eff4eabdcc104c5c5687ab9fe64ca9a (diff) |
spi: Move freescale-specific code into a private header
At present there are two SPI functions only used by freescale which are
defined in the spi_flash.h header. One function name matches an existing
generic SPL function.
Move these into a private header to avoid confusion.
Arcturus looks like it does not actually support SPI, so drop the SPI code
from that board.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/Arcturus/ucp1020/spl.c | 2 | ||||
-rw-r--r-- | board/freescale/common/spl.h | 13 | ||||
-rw-r--r-- | board/freescale/p1010rdb/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/p1022ds/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/p1_p2_rdb_pc/spl.c | 3 | ||||
-rw-r--r-- | board/freescale/t102xqds/spl.c | 7 | ||||
-rw-r--r-- | board/freescale/t102xrdb/spl.c | 7 | ||||
-rw-r--r-- | board/freescale/t104xrdb/spl.c | 7 | ||||
-rw-r--r-- | board/freescale/t208xqds/spl.c | 7 | ||||
-rw-r--r-- | board/freescale/t208xrdb/spl.c | 7 |
10 files changed, 39 insertions, 20 deletions
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 9315bb74012..9c19c87b727 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -119,8 +119,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); -#elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/common/spl.h b/board/freescale/common/spl.h new file mode 100644 index 00000000000..88c987ea588 --- /dev/null +++ b/board/freescale/common/spl.h @@ -0,0 +1,13 @@ +/* + * Copyright 2016 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __FREESCALE_BOARD_SPL_H +#define __FREESCALE_BOARD_SPL_H + +void fsl_spi_spl_load_image(uint32_t offs, unsigned int size, void *vdst); +void fsl_spi_boot(void) __noreturn; + +#endif diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index f8584084ce5..9844194eb58 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -12,6 +12,7 @@ #include <i2c.h> #include <fsl_esdhc.h> #include <spi_flash.h> +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -103,7 +104,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 04db767f981..6a5fe743437 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -14,6 +14,7 @@ #include "../common/ngpixis.h" #include <fsl_esdhc.h> #include <spi_flash.h> +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -120,7 +121,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 76a3cf47cc6..9e8f359d0db 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -13,6 +13,7 @@ #include <i2c.h> #include <fsl_esdhc.h> #include <spi_flash.h> +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -117,7 +118,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index d59d3431ec1..61bfb295ef1 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -14,6 +14,7 @@ #include <spi_flash.h> #include "../common/qixis.h" #include "t102xqds_qixis.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -132,8 +133,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); @@ -146,7 +147,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index bd3cbbf11c9..6d8866e87d9 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -13,6 +13,7 @@ #include <fsl_esdhc.h> #include <spi_flash.h> #include "../common/sleep.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -119,8 +120,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); @@ -133,7 +134,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index 4b35af63f65..1c2023b6a32 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -13,6 +13,7 @@ #include <fsl_esdhc.h> #include <spi_flash.h> #include "../common/sleep.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -114,8 +115,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); gd->env_valid = 1; @@ -129,7 +130,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index bb02dab2f15..b1e1cf17e7c 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -14,6 +14,7 @@ #include <spi_flash.h> #include "../common/qixis.h" #include "t208xqds_qixis.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -118,8 +119,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); @@ -132,7 +133,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index 2ff05a29f50..bb23865d3be 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -12,6 +12,7 @@ #include <mmc.h> #include <fsl_esdhc.h> #include <spi_flash.h> +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -88,8 +89,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); @@ -102,7 +103,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif |