Skip to content
Snippets Groups Projects
Commit e2d0f255 authored by Kumar Gala's avatar Kumar Gala
Browse files

powerpc/85xx: Fix compile warnings/errors if CONFIG_SYS_DPAA_FMAN isn't set


Add ifdef protection around fman specific code related to device tree
clock setup.  If we dont have CONFIG_SYS_DPAA_FMAN defined we shouldn't
be executing this code.

Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent bc6bbd6b
No related branches found
No related tags found
No related merge requests found
...@@ -361,6 +361,7 @@ void fdt_add_enet_stashing(void *fdt) ...@@ -361,6 +361,7 @@ void fdt_add_enet_stashing(void *fdt)
} }
#if defined(CONFIG_SYS_DPAA_FMAN) || defined(CONFIG_SYS_DPAA_PME) #if defined(CONFIG_SYS_DPAA_FMAN) || defined(CONFIG_SYS_DPAA_PME)
#ifdef CONFIG_SYS_DPAA_FMAN
static void ft_fixup_clks(void *blob, const char *compat, u32 offset, static void ft_fixup_clks(void *blob, const char *compat, u32 offset,
unsigned long freq) unsigned long freq)
{ {
...@@ -374,12 +375,14 @@ static void ft_fixup_clks(void *blob, const char *compat, u32 offset, ...@@ -374,12 +375,14 @@ static void ft_fixup_clks(void *blob, const char *compat, u32 offset,
"for %s: %s\n", compat, fdt_strerror(off)); "for %s: %s\n", compat, fdt_strerror(off));
} }
} }
#endif
static void ft_fixup_dpaa_clks(void *blob) static void ft_fixup_dpaa_clks(void *blob)
{ {
sys_info_t sysinfo; sys_info_t sysinfo;
get_sys_info(&sysinfo); get_sys_info(&sysinfo);
#ifdef CONFIG_SYS_DPAA_FMAN
ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM1_OFFSET, ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM1_OFFSET,
sysinfo.freqFMan[0]); sysinfo.freqFMan[0]);
...@@ -387,6 +390,7 @@ static void ft_fixup_dpaa_clks(void *blob) ...@@ -387,6 +390,7 @@ static void ft_fixup_dpaa_clks(void *blob)
ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM2_OFFSET, ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM2_OFFSET,
sysinfo.freqFMan[1]); sysinfo.freqFMan[1]);
#endif #endif
#endif
#ifdef CONFIG_SYS_DPAA_PME #ifdef CONFIG_SYS_DPAA_PME
do_fixup_by_compat_u32(blob, "fsl,pme", do_fixup_by_compat_u32(blob, "fsl,pme",
......
...@@ -198,7 +198,10 @@ void fdt_fixup_qportals(void *blob) ...@@ -198,7 +198,10 @@ void fdt_fixup_qportals(void *blob)
u32 liodns[2]; u32 liodns[2];
#endif #endif
const int *ci = fdt_getprop(blob, off, "cell-index", NULL); const int *ci = fdt_getprop(blob, off, "cell-index", NULL);
int j, i = *ci; int i = *ci;
#ifdef CONFIG_SYS_DPAA_FMAN
int j;
#endif
err = fdt_setprop(blob, off, "compatible", compat, compat_len); err = fdt_setprop(blob, off, "compatible", compat, compat_len);
if (err < 0) if (err < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment