]> git.sur5r.net Git - u-boot/commitdiff
poweprc/85xx: add QMan frequency info and fdt fixup.
authorHaiying Wang <Haiying.Wang@freescale.com>
Thu, 11 Oct 2012 07:13:39 +0000 (07:13 +0000)
committerAndy Fleming <afleming@freescale.com>
Mon, 22 Oct 2012 20:52:46 +0000 (15:52 -0500)
Starting from QMan3.0, the QMan clock cycle needs be exposed so that the kernel
driver can use it to calculate the shaper prescaler and rate.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc85xx/speed.c
include/e500.h

index 892bfa4c60699d15768e660023623846e9bdab73..db232e64f841aac58a7a8d6357aaeb695c6a20a5 100644 (file)
@@ -217,6 +217,10 @@ int checkcpu (void)
        }
 #endif
 
+#ifdef CONFIG_SYS_DPAA_QBMAN
+       printf("       QMAN:  %s MHz\n", strmhz(buf1, sysinfo.freqQMAN));
+#endif
+
 #ifdef CONFIG_SYS_DPAA_PME
        printf("       PME:   %s MHz\n", strmhz(buf1, sysinfo.freqPME));
 #endif
index a364ef216a86122b16101109cfa6b9231be51d1e..ab0933076df9352b7ecb401686941c9cf7cbc1c1 100644 (file)
@@ -411,6 +411,11 @@ static void ft_fixup_dpaa_clks(void *blob)
 #endif
 #endif
 
+#ifdef CONFIG_SYS_DPAA_QBMAN
+       do_fixup_by_compat_u32(blob, "fsl,qman",
+                       "clock-frequency", sysinfo.freqQMAN, 1);
+#endif
+
 #ifdef CONFIG_SYS_DPAA_PME
        do_fixup_by_compat_u32(blob, "fsl,pme",
                "clock-frequency", sysinfo.freqPME, 1);
index 8a8f317f8d70b6e48b62461860914f15e17765ef..801ee078c088c135dfe110aea276ca11a73a045e 100644 (file)
@@ -167,6 +167,10 @@ void get_sys_info (sys_info_t * sysInfo)
        }
 #endif
 
+#ifdef CONFIG_SYS_DPAA_QBMAN
+       sysInfo->freqQMAN = sysInfo->freqSystemBus / 2;
+#endif
+
 #ifdef CONFIG_SYS_DPAA_FMAN
        switch ((rcw_tmp & FM1_CLK_SEL) >> FM1_CLK_SHIFT) {
        case 1:
index e1708b9dc956f01573da0e71c2bf0f4b9a56c628..0ff8e89a1e345f8274f3c83da715f301ca1ce0a8 100644 (file)
@@ -18,6 +18,9 @@ typedef struct
 #ifdef CONFIG_SYS_DPAA_FMAN
   unsigned long freqFMan[CONFIG_SYS_NUM_FMAN];
 #endif
+#ifdef CONFIG_SYS_DPAA_QBMAN
+  unsigned long freqQMAN;
+#endif
 #ifdef CONFIG_SYS_DPAA_PME
   unsigned long freqPME;
 #endif