summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOmri Itach <omrii@marvell.com>2017-05-17 11:04:26 +0300
committerKostya Porotchkin <kostap@marvell.com>2017-05-22 14:03:30 +0300
commit380119d739002a7f9cdc7f730fcaa42f89f8e44b (patch)
tree432b01726cf1d0a1ca6d468ba711b84087cf8c26 /include
parent3cf300e7695e6883787ce01d5c4b97ced96bb8c1 (diff)
fix: mci: ap806: skip setting MCI ID assignment when booting from MCI
When boot source is from MCI, bootROM is already enabling MCI simultaneous transactions (ID assignment), so in that case we must avoid enabling it for the 2nd time (according to design guidelines). Change-Id: I3967fc3526e27356f9e8ebf184b52cc21003e3c1 Signed-off-by: Omri Itach <omrii@marvell.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/39557 Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com> (cherry picked from commit c721c97f7ea0724d3eaed92168897db4fc1b9b03) Reviewed-on: http://vgitil04.il.marvell.com:8080/39795
Diffstat (limited to 'include')
-rw-r--r--include/drivers/marvell/mochi/apn806_setup.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/drivers/marvell/mochi/apn806_setup.h b/include/drivers/marvell/mochi/apn806_setup.h
index ca41269e..2ca9bffc 100644
--- a/include/drivers/marvell/mochi/apn806_setup.h
+++ b/include/drivers/marvell/mochi/apn806_setup.h
@@ -44,7 +44,23 @@
#define GWD_IIDR2_REV_ID_OFFSET 12
#define GWD_IIDR2_REV_ID_MASK 0xF
+#define AP806_SAR0_REG_BASE (MVEBU_REGS_BASE + 0x6F82D4)
+#define AP806_SAR0_BOOT_SOURCE_OFFSET 8
+#define AP806_SAR0_BOOT_SOURCE_MASK 0x7
+
+enum ap806_sar_target_dev {
+ SAR_PIDI_MCIX2 = 0x0,
+ SAR_MCIX4 = 0x1,
+ SAR_SPI = 0x2,
+ SAR_SD = 0x3,
+ SAR_PIDI_MCIX2_BD = 0x4, /* BootRom disabled */
+ SAR_MCIX4_DB = 0x5, /* BootRom disabled */
+ SAR_SPI_DB = 0x6, /* BootRom disabled */
+ SAR_EMMC = 0x7,
+};
+
void apn806_init(void);
+uint32_t apn806_sar_get_bootsrc(void);
static inline int apn806_rev_id_get(void)
{