summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTerry Zhou <bjzhou@marvell.com>2018-03-19 17:12:03 +0200
committerKostya Porotchkin <kostap@marvell.com>2018-03-19 18:54:40 +0200
commite28d83b5561b395e92e1f79e101f963cfdf654ae (patch)
tree44f272afaa0535ab6ef8ecb2e50609b42ccd42ae /drivers
parenta69da86a2c72c79987e443debdbbd7b4d38457ba (diff)
plat: a8k: update all AP related function to be more generic
This patch is the preparation for the coming A3900 which using APN807 instead of APN806, we put it under A8K family since most of the designs are the same. Replace all the function/headfile names with apn806_XX to ap_XX Add ble init function before doing dram initialization since we use a new DDR PHY in APN807 Change-Id: Ia3f79f5236280df6ed22f7dee623c7f6a8a6aa46 Signed-off-by: Terry Zhou <bjzhou@marvell.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/52169 Reviewed-by: Hanna Hawa <hannah@marvell.com> Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/marvell/mochi/apn806_setup.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/marvell/mochi/apn806_setup.c b/drivers/marvell/mochi/apn806_setup.c
index f8e3b8f4..6485e3bc 100644
--- a/drivers/marvell/mochi/apn806_setup.c
+++ b/drivers/marvell/mochi/apn806_setup.c
@@ -33,7 +33,8 @@
*/
#include <plat_def.h>
-#include <apn806_setup.h>
+#include <mmio.h>
+#include <ap_setup.h>
#include <io_win.h>
#include <ccu.h>
#include <mci.h>
@@ -168,7 +169,7 @@ static void init_aurora2(void)
/* A0 Only: cache line clean & invalidate instead of)
** cache line invalidate only - to avoid system hang
** due to memory coherency issue */
- if (apn806_rev_id_get() == APN806_REV_ID_A0) {
+ if (ap_rev_id_get() == APN806_REV_ID_A0) {
reg = mmio_read_32(CCU_LTC_CR);
reg |= (0x1 << CCU_CLEAN_INV_WRITE_OFFSET);
mmio_write_32(CCU_LTC_CR, reg);
@@ -247,7 +248,7 @@ void misc_soc_configurations(void)
mmio_write_32(MVEBU_SYSRST_OUT_CONFIG_REG, reg);
}
-void apn806_init(void)
+void ap_init(void)
{
/* Setup Aurora2. */
init_aurora2();
@@ -282,3 +283,19 @@ void apn806_init(void)
ap806_generic_timer_init();
#endif
}
+
+void ap_ble_init(void)
+{
+}
+
+int ap_rev_id_get(void)
+{
+ /* Returns:
+ * - 0 (APN806_REV_ID_A0) for A0
+ * - 1 (APN806_REV_ID_A1) for A1
+ */
+ return (mmio_read_32(MVEBU_CSS_GWD_CTRL_IIDR2_REG) >>
+ GWD_IIDR2_REV_ID_OFFSET) &
+ GWD_IIDR2_REV_ID_MASK;
+}
+