]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: layerscape: Use ARCH_LS104?A insead of TARGET_LS104?ARDB
authorSean Anderson <sean.anderson@seco.com>
Tue, 26 Apr 2022 18:31:49 +0000 (14:31 -0400)
committerPeng Fan <peng.fan@nxp.com>
Mon, 20 Jun 2022 01:18:26 +0000 (09:18 +0800)
These frequency calculations depend on the RCW format, which is not
dependent on any particular board. Switch to using ARCH symbols instead
of TARGET.

This whole function could probably use less ifdefs, but for now just do
a minimal conversion.

Fixes: 24cb6f2295 ("fsl-layerscape: Add fsl_esdhc peripheral clock support")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c

index 570105a75ed1b87bde174a1a59fd4b2c059fef29..840e6d412b30754a23cdd5f9b8ccd369bb33aad2 100644 (file)
@@ -29,8 +29,8 @@ void get_sys_info(struct sys_info *sys_info)
  * mux 2 clock for LS1043A/LS1046A.
  */
 #if defined(CONFIG_SYS_DPAA_FMAN) || \
-           defined(CONFIG_TARGET_LS1046ARDB) || \
-           defined(CONFIG_TARGET_LS1043ARDB)
+           defined(CONFIG_ARCH_LS1046A) || \
+           defined(CONFIG_ARCH_LS1043A)
        u32 rcw_tmp;
 #endif
        struct ccsr_clk *clk = (void *)(CONFIG_SYS_FSL_CLK_ADDR);
@@ -129,13 +129,13 @@ void get_sys_info(struct sys_info *sys_info)
 
 #define HWA_CGA_M2_CLK_SEL     0x00000007
 #define HWA_CGA_M2_CLK_SHIFT   0
-#if defined(CONFIG_TARGET_LS1046ARDB) || defined(CONFIG_TARGET_LS1043ARDB)
+#if defined(CONFIG_ARCH_LS1046A) || defined(CONFIG_ARCH_LS1043A)
        rcw_tmp = in_be32(&gur->rcwsr[15]);
        switch ((rcw_tmp & HWA_CGA_M2_CLK_SEL) >> HWA_CGA_M2_CLK_SHIFT) {
        case 1:
                sys_info->freq_cga_m2 = freq_c_pll[1];
                break;
-#if defined(CONFIG_TARGET_LS1046ARDB)
+#if defined(CONFIG_ARCH_LS1046A)
        case 2:
                sys_info->freq_cga_m2 = freq_c_pll[1] / 2;
                break;
@@ -143,7 +143,7 @@ void get_sys_info(struct sys_info *sys_info)
        case 3:
                sys_info->freq_cga_m2 = freq_c_pll[1] / 3;
                break;
-#if defined(CONFIG_TARGET_LS1046ARDB)
+#if defined(CONFIG_ARCH_LS1046A)
        case 6:
                sys_info->freq_cga_m2 = freq_c_pll[0] / 2;
                break;