]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: mvebu: a38x: move sys_env_device_rev_get
authorChris Packham <judge.packham@gmail.com>
Thu, 10 May 2018 01:28:27 +0000 (13:28 +1200)
committerStefan Roese <sr@denx.de>
Mon, 14 May 2018 08:01:56 +0000 (10:01 +0200)
Move sys_env_device_rev_get() from the ddr training code to
sys_env_lib.c (which currently resides with the serdes code). This
brings sys_env_device_rev_get() into line with sys_env_device_id_get()
and sys_env_model_get().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
drivers/ddr/marvell/a38x/ddr3_init.c

index d26068e1d774b9e9ec8f65dedaf2d46c2fff1851..d387893af37d10f794b45ddcb57f22d4de7f7260 100644 (file)
@@ -12,8 +12,6 @@
 #include "seq_exec.h"
 #include "sys_env_lib.h"
 
-#include "../../../drivers/ddr/marvell/a38x/ddr3_a38x.h"
-
 #ifdef CONFIG_ARMADA_38X
 enum unit_id sys_env_soc_unit_nums[MAX_UNITS_ID][MAX_DEV_ID_NUM] = {
 /*                     6820    6810     6811     6828     */
@@ -234,3 +232,27 @@ u32 sys_env_device_id_get(void)
 
        return g_dev_id;
 }
+
+/*
+ * sys_env_device_rev_get - Get Marvell controller device revision number
+ *
+ * DESCRIPTION:
+ *       This function returns 8bit describing the device revision as defined
+ *       Revision ID Register.
+ *
+ * INPUT:
+ *       None.
+ *
+ * OUTPUT:
+ *       None.
+ *
+ * RETURN:
+ *       8bit desscribing Marvell controller revision number
+ */
+u8 sys_env_device_rev_get(void)
+{
+       u32 value;
+
+       value = reg_read(DEV_VERSION_ID_REG);
+       return (value & (REVISON_ID_MASK)) >> REVISON_ID_OFFS;
+}
index c5461067fd88f6b08e8433d2e7574c66fc7c396d..953445b7d7aeb9bd02eca3d8c42631529e1d0382 100644 (file)
@@ -7,7 +7,6 @@
 #define _SYS_ENV_LIB_H
 
 #include "../../../drivers/ddr/marvell/a38x/ddr3_init.h"
-#include "../../../drivers/ddr/marvell/a38x/ddr3_hws_hw_training.h"
 
 /* Serdes definitions */
 #define COMMON_PHY_BASE_ADDR           0x18300
index 6ee13c10e493ed811f6bcc23e8d5e7b0d8a92150..1c5b1f75ca4fbfb930c3eb0d18289501cfa39587 100644 (file)
@@ -107,30 +107,6 @@ static int ddr3_hws_tune_training_params(u8 dev_num);
 /* A39x revisions */
 #define MV_88F69XX_Z1_ID               0x2
 
-/*
- * sys_env_device_rev_get - Get Marvell controller device revision number
- *
- * DESCRIPTION:
- *       This function returns 8bit describing the device revision as defined
- *       Revision ID Register.
- *
- * INPUT:
- *       None.
- *
- * OUTPUT:
- *       None.
- *
- * RETURN:
- *       8bit desscribing Marvell controller revision number
- */
-u8 sys_env_device_rev_get(void)
-{
-       u32 value;
-
-       value = reg_read(DEV_VERSION_ID_REG);
-       return (value & (REVISON_ID_MASK)) >> REVISON_ID_OFFS;
-}
-
 /*
  * sys_env_dlb_config_ptr_get
  *