[U-Boot] [Patch V2 3/3] armv8/fsl-layerscape: fdt: add fixup for fman
Scott Wood
oss at buserror.net
Fri Jan 22 21:05:44 CET 2016
On Fri, 2016-01-22 at 20:07 +0800, Gong Qianyu wrote:
> Add fdt fixup for Fman clock and inserting Fman ucode blob
> into the device tree.
>
> Signed-off-by: Gong Qianyu <Qianyu.Gong at nxp.com>
> ---
> V2:
> - Removed the duplicated function.
>
> arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
> b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
> index eafdd71..8a6b694 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
> @@ -8,12 +8,16 @@
> #include <libfdt.h>
> #include <fdt_support.h>
> #include <phy.h>
> +#include <asm/arch/speed.h>
> #ifdef CONFIG_FSL_LSCH3
> #include <asm/arch/fdt.h>
> #endif
> #ifdef CONFIG_FSL_ESDHC
> #include <fsl_esdhc.h>
> #endif
> +#ifdef CONFIG_SYS_DPAA_FMAN
> +#include <fsl_fman.h>
> +#endif
> #ifdef CONFIG_MP
> #include <asm/arch/mp.h>
> #endif
> @@ -181,6 +185,10 @@ static void fdt_fixup_smmu(void *blob)
>
> void ft_cpu_setup(void *blob, bd_t *bd)
> {
> + struct sys_info sysinfo;
> +
> + get_sys_info(&sysinfo);
> +
> #ifdef CONFIG_MP
> ft_fixup_cpu(blob);
> #endif
> @@ -201,4 +209,10 @@ void ft_cpu_setup(void *blob, bd_t *bd)
> #ifdef CONFIG_FSL_LSCH3
> fdt_fixup_smmu(blob);
> #endif
> +
> +#ifdef CONFIG_SYS_DPAA_FMAN
> + do_fixup_by_compat_u32(blob, "fsl,fman",
> + "clock-frequency", sysinfo.freq_fman[0], 1);
> + fdt_fixup_fman_firmware(blob);
> +#endif
> }
There is no clock-frequency in the fman binding. A clocks property is used
instead (which does not require a fixup).
-Scott
More information about the U-Boot
mailing list