Skip to contentSkip to conversation

mpc85xx: Put SDHC clock-frequency in device tree

U-Boot Gao Guanhua 2 participants 3 messages Sep 23, 2009 – Sep 24, 2009

lore
Share & tools
lore
#0 lore raw

The clock-frequency of SD controller comes from different source on different platform. We add a clock-frequency property in dts file and set the value in u-boot.

---
 cpu/mpc85xx/fdt.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
cpu/mpc85xx/fdt.c +6 -0
index 26a8f48..e549c66 100644
@@ -328,5 +328,11 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 	ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize);
 #endif
 
+#ifdef CONFIG_FSL_ESDHC
+	do_fixup_by_compat_u32(blob, "fsl,esdhc",
+		"clock-frequency", bd->bi_busfreq/2, 1);
+#endif
+
+
 	ft_fixup_cache(blob);
 }
Signature · 1 line
1.6.4
#1 lore raw
Quoted 13 lines · Gao Guanhua

The clock-frequency of SD controller comes from different source on different platform. We add a clock-frequency property in dts file and set the value in u-boot.
---
cpu/mpc85xx/fdt.c | 6 ++++++

1 files changed, 6 insertions(+), 0 deletions(-)
cpu/mpc85xx/fdt.c +0 -0
index 26a8f48..e549c66 100644
@@ -328,5 +328,11 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 	ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize);

cpu/mpc85xx/fdt.c void ft_cpu_setup(void *blob, bd_t *bd) · line 338

Quoted 10 lines
cpu/mpc85xx/fdt.c +6 -0
 #endif
 
+#ifdef CONFIG_FSL_ESDHC
+	do_fixup_by_compat_u32(blob, "fsl,esdhc",
+		"clock-frequency", bd->bi_busfreq/2, 1);
+#endif
+
+
 	ft_fixup_cache(blob);
 

We do this in fdt_fixup_esdhc()

- k

#2 lore raw
Quoted 28 lines

-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: Thursday, September 24, 2009 12:13 AM
To: Gao Guanhua-B22826
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] mpc85xx: Put SDHC clock-frequency in device tree

Quoted 2 lines · Gao Guanhua

The clock-frequency of SD controller comes from different source on different platform. We add a clock-frequency property in

dts file and

Quoted 13 lines

set the value in u-boot.
---
cpu/mpc85xx/fdt.c | 6 ++++++

1 files changed, 6 insertions(+), 0 deletions(-)
cpu/mpc85xx/fdt.c index renamed from cpu/mpc85xx/fdt.c +0 -0

26a8f48..e549c66 100644

cpu/mpc85xx/fdt.c +0 -0
@@ -328,5 +328,11 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 	ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize); 
 #endif
 
Quoted 8 lines

cpu/mpc85xx/fdt.c void ft_cpu_setup(void *blob, bd_t *bd)

Quoted 7 lines
cpu/mpc85xx/fdt.c +5 -0
+#ifdef CONFIG_FSL_ESDHC
+	do_fixup_by_compat_u32(blob, "fsl,esdhc",
+		"clock-frequency", bd->bi_busfreq/2, 1); #endif
+
+
 	ft_fixup_cache(blob);
 

We do this in fdt_fixup_esdhc()

Ok, I've found this function in the latest tree, so please ignore my patch.
Thanks.

Quoted 5 lines

- k