From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH v2 19/19] ARM: i.MX6: boot: Return BOOTSOURCE_SPI_NOR, not BOOTSOURCE_SPI
Date: Mon, 16 Apr 2018 12:31:57 -0700 [thread overview]
Message-ID: <20180416193157.16094-20-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180416193157.16094-1-andrew.smirnov@gmail.com>
We use BOOTSOURCE_SPI to denote, among other things, QSPI on i.MX7 and
VFxxx, whereas on i.MX6 it is used to mean SPI-NOR. To make functions
like imx_xload() work consistently across various i.MX platforms use
already existent BOOTSOURCE_SPI_NOR constant to mean booting from
SPI-NOR on i.MX6 as well.
Replace all in-tree code that relying on the old value as well.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
arch/arm/boards/datamodul-edm-qmx6/board.c | 2 +-
arch/arm/boards/dfi-fs700-m60/board.c | 2 +-
arch/arm/boards/phytec-som-imx6/board.c | 2 +-
arch/arm/boards/zii-imx6q-rdu2/lowlevel.c | 2 +-
arch/arm/mach-imx/boot.c | 2 +-
arch/arm/mach-imx/xload.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 043a93461..d93c940e3 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -132,7 +132,7 @@ static int realq7_device_init(void)
}
break;
default:
- case BOOTSOURCE_SPI:
+ case BOOTSOURCE_SPI_NOR:
of_device_enable_path("/chosen/environment-spi");
break;
}
diff --git a/arch/arm/boards/dfi-fs700-m60/board.c b/arch/arm/boards/dfi-fs700-m60/board.c
index bef4612d9..2cb8e3106 100644
--- a/arch/arm/boards/dfi-fs700-m60/board.c
+++ b/arch/arm/boards/dfi-fs700-m60/board.c
@@ -105,7 +105,7 @@ static int dfi_fs700_m60_init(void)
phy_register_fixup_for_uid(PHY_ID_AR8031, AR_PHY_ID_MASK, ar8031_phy_fixup);
- if (bootsource_get() == BOOTSOURCE_SPI)
+ if (bootsource_get() == BOOTSOURCE_SPI_NOR)
flag_spi |= BBU_HANDLER_FLAG_DEFAULT;
else
flag_mmc |= BBU_HANDLER_FLAG_DEFAULT;
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 717a22963..ecb22f956 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -152,7 +152,7 @@ static int physom_imx6_devices_init(void)
environment_path = basprintf("/chosen/environment-nand");
envdev = "NAND flash";
break;
- case BOOTSOURCE_SPI:
+ case BOOTSOURCE_SPI_NOR:
environment_path = basprintf("/chosen/environment-spinor");
envdev = "SPI NOR flash";
break;
diff --git a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
index 22ffdf85e..3b4dbd212 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
@@ -290,7 +290,7 @@ static noinline void rdu2_sram_setup(void)
write_regs(imx6q_dcd, ARRAY_SIZE(imx6q_dcd));
imx6_get_boot_source(&bootsrc, &instance);
- if (bootsrc == BOOTSOURCE_SPI)
+ if (bootsrc == BOOTSOURCE_SPI_NOR)
imx6_spi_start_image(0);
else
imx6_esdhc_start_image(instance);
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index f8a04d8f3..bb5318510 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -320,7 +320,7 @@ static enum bootsource imx6_bootsource_serial_rom(uint32_t sbmr)
const int source = __imx6_bootsource_serial_rom(sbmr);
return source < IMX6_BOOTSOURCE_SERIAL_ROM_I2C1 ?
- BOOTSOURCE_SPI : BOOTSOURCE_I2C;
+ BOOTSOURCE_SPI_NOR : BOOTSOURCE_I2C;
}
static int imx6_boot_instance_serial_rom(uint32_t sbmr)
diff --git a/arch/arm/mach-imx/xload.c b/arch/arm/mach-imx/xload.c
index 16d56ab28..921e9ade2 100644
--- a/arch/arm/mach-imx/xload.c
+++ b/arch/arm/mach-imx/xload.c
@@ -24,7 +24,7 @@ static __noreturn int imx_xload(void)
pr_info("booting from MMC\n");
buf = bootstrap_read_disk("disk0.0", "fat");
break;
- case BOOTSOURCE_SPI:
+ case BOOTSOURCE_SPI_NOR:
pr_info("booting from SPI\n");
buf = bootstrap_read_devfs("dataflash0", false,
SZ_256K, SZ_1M, SZ_1M);
--
2.14.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-04-16 19:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 19:31 [PATCH v2 00/19] i.MX bootsource bugfixes, refactoring and VFxxx support Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 01/19] ARM: i.MX: boot: Coalesce copy-pasted code Andrey Smirnov
2018-04-17 6:58 ` Sascha Hauer
2018-04-17 15:20 ` Andrey Smirnov
2018-04-18 8:15 ` Sascha Hauer
2018-04-19 22:26 ` Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 02/19] include: Port linux/build_bug.h from Linux kernel Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 03/19] include: Port linux/bitfield.h " Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 04/19] ARM: i.MX: Add a function to extract BMOD value Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 05/19] ARM: i.MX: Simplify serial bootsource detection for i.MX6 and 7 Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 06/19] ARM: i.MX: Account for unprogrammed fuses on i.MX6 and i.MX7 Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 07/19] ARM: i.MX7: boot: Add code to handle SD/MMC manufacture mode Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 08/19] ARM: i.MX7: boot: Remove incorrect NAND bootsource detection Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 09/19] ARM: i.MX7: boot: Fix SPI-NOR/QSPI boot source mixup Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 10/19] ARM: i.MX: boot: Remove unnecessary returns Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 11/19] ARM: i.MX: boot: Move magic values into small functions Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 12/19] ARM: i.MX: boot: Share code to detect NAND as a boot source Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 13/19] ARM: i.MX: boot: Check for NAND boot only if necessary on i.MX53, 6 Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 14/19] ARM: i.MX53: boot: Move magic numbers info utility functions Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 15/19] ARM: i.MX6: boot: Move magic numbers into " Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 16/19] ARM: i.MX7: " Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 17/19] bootsource: Add BOOTSOURCE_CAN Andrey Smirnov
2018-04-16 19:31 ` [PATCH v2 18/19] ARM: VFxxx: Implement code to detect bootsource Andrey Smirnov
2018-04-16 19:31 ` Andrey Smirnov [this message]
2018-04-17 7:24 ` [PATCH v2 00/19] i.MX bootsource bugfixes, refactoring and VFxxx support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180416193157.16094-20-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox