From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/85xx: Use fdt_node_offset_by_compat_reg for clock-frequency updates
Date: Thu, 15 Jul 2010 00:05:34 -0500 [thread overview]
Message-ID: <1279170338-25813-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1279170338-25813-2-git-send-email-galak@kernel.crashing.org>
Move to using fdt_node_offset_by_compat_reg to find the node offsets we
want to update instead of using aliases.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/cpu/mpc85xx/fdt.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 2628cc5..b4354f9 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -298,17 +298,17 @@ void fdt_add_enet_stashing(void *fdt)
}
#if defined(CONFIG_SYS_DPAA_FMAN) || defined(CONFIG_SYS_DPAA_PME)
-static void ft_fixup_clks(void *blob, const char *alias, unsigned long freq)
+static void ft_fixup_clks(void *blob, const char *compat, u32 offset,
+ unsigned long freq)
{
- const char *path = fdt_get_alias(blob, alias);
-
- int off = fdt_path_offset(blob, path);
+ phys_addr_t phys = offset + CONFIG_SYS_CCSRBAR_PHYS;
+ int off = fdt_node_offset_by_compat_reg(blob, compat, phys);
if (off >= 0) {
off = fdt_setprop_cell(blob, off, "clock-frequency", freq);
if (off > 0)
printf("WARNING enable to set clock-frequency "
- "for %s: %s\n", alias, fdt_strerror(off));
+ "for %s: %s\n", compat, fdt_strerror(off));
}
}
@@ -317,14 +317,17 @@ static void ft_fixup_dpaa_clks(void *blob)
sys_info_t sysinfo;
get_sys_info(&sysinfo);
- ft_fixup_clks(blob, "fman0", sysinfo.freqFMan[0]);
+ ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM1_OFFSET,
+ sysinfo.freqFMan[0]);
#if (CONFIG_SYS_NUM_FMAN == 2)
- ft_fixup_clks(blob, "fman1", sysinfo.freqFMan[1]);
+ ft_fixup_clks(blob, "fsl,fman", CONFIG_SYS_FSL_FM2_OFFSET,
+ sysinfo.freqFMan[1]);
#endif
#ifdef CONFIG_SYS_DPAA_PME
- ft_fixup_clks(blob, "pme", sysinfo.freqPME);
+ do_fixup_by_compat_u32(blob, "fsl,pme",
+ "clock-frequency", sysinfo.freqPME, 1);
#endif
}
#else
--
1.6.0.6
next prev parent reply other threads:[~2010-07-15 5:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 5:05 [U-Boot] [PATCH] powerpc/85xx: Add additional p4080 platform related defines/structs Kumar Gala
2010-07-15 5:05 ` [U-Boot] [PATCH] powerpc/fsl_fman: Add initial fman immap structures Kumar Gala
2010-07-15 5:05 ` Kumar Gala [this message]
2010-07-15 5:05 ` [U-Boot] [PATCH] powerpc/p4080: Add setting of clock-frequency for clockgen node Kumar Gala
2010-07-15 5:05 ` [U-Boot] [PATCH] powerpc/mpc85xx: Report FMAN # to match user manual Kumar Gala
2010-07-15 5:05 ` [U-Boot] [PATCH] powerpc/p5020: Add various p5020 related defines (and p5010) Kumar Gala
2010-07-15 5:05 ` [U-Boot] [PATCH] powerpc/p3041: Add various p3041 related defines Kumar Gala
2010-07-21 5:37 ` Kumar Gala
2010-07-21 5:37 ` [U-Boot] [PATCH] powerpc/p5020: Add various p5020 related defines (and p5010) Kumar Gala
2010-07-21 5:37 ` [U-Boot] [PATCH] powerpc/mpc85xx: Report FMAN # to match user manual Kumar Gala
2010-07-21 5:36 ` [U-Boot] [PATCH] powerpc/p4080: Add setting of clock-frequency for clockgen node Kumar Gala
2010-07-21 5:36 ` [U-Boot] [PATCH] powerpc/85xx: Use fdt_node_offset_by_compat_reg for clock-frequency updates Kumar Gala
2010-07-26 13:50 ` [U-Boot] [PATCH] powerpc/fsl_fman: Add initial fman immap structures Kumar Gala
2010-07-21 5:42 ` [U-Boot] [PATCH v2] powerpc/85xx: Add additional p4080 platform related defines/structs Kumar Gala
2010-07-26 13:50 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279170338-25813-3-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox