QE: Move FDT support into a common file
PATCH 1/1 QE: Move FDT support into a common file
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
--- common/fdt_support.c | 48 -------------------------- cpu/mpc83xx/fdt.c | 13 ++----- cpu/mpc85xx/fdt.c | 8 ++--- drivers/qe/Makefile | 3 +- drivers/qe/fdt.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/qe/qe.h | 1 + 6 files changed, 99 insertions(+), 64 deletions(-) create mode 100644 drivers/qe/fdt.c
common/fdt_support.c +0 -48
@@ -30,9 +30,6 @@#include <fdt_support.h> #include <exports.h> -#ifdef CONFIG_QE -#include "../drivers/qe/qe.h" -#endif /* * Global data (for the gd->bd) */
@@ -617,49 +614,4 @@ void fdt_fixup_ethernet(void *fdt, bd_t *bd) #endif } } - -#ifdef CONFIG_QE -/* -* If a QE firmware has been uploaded, then add the 'firmware' node under -* the 'qe' node. -*/ -void fdt_fixup_qe_firmware (void *fdt) -{ -struct qe_firmware_info *qe_fw_info; -int node, ret; - - qe_fw_info =qe_get_firmware_info (); -if (!qe_fw_info) -return ; - - node =fdt_path_offset (fdt,"/qe" ); -if (node <0 ) -return ; - -/* We assume the node doesn't exist yet */ - node =fdt_add_subnode (fdt, node,"firmware" ); -if (node <0 ) -return ; - - ret =fdt_setprop (fdt, node,"extended-modes" , - &qe_fw_info->extended_modes,sizeof (u64)); -if (ret <0 ) - goto error; - - ret =fdt_setprop_string (fdt, node,"id" , qe_fw_info->id); -if (ret <0 ) - goto error; - - ret =fdt_setprop (fdt, node,"virtual-traps" , qe_fw_info->vtraps, -sizeof (qe_fw_info->vtraps)); -if (ret <0 ) - goto error; - -return ; - -error: -fdt_del_node (fdt, node); -} -#endif -#endif
cpu/mpc83xx/fdt.c +3 -10
@@ -30,6 +30,8 @@#include <libfdt.h> #include <fdt_support.h> +extern void ft_qe_setup (void *blob); +DECLARE_GLOBAL_DATA_PTR ;void ft_cpu_setup (void *blob,bd_t *bd)
@@ -48,16 +50,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)do_fixup_by_prop_u32 (blob,"device_type" ,"soc" ,4 ,"bus-frequency" , bd->bi_busfreq,1 );#ifdef CONFIG_QE -do_fixup_by_prop_u32 (blob,"device_type" ,"qe" ,4 , -"bus-frequency" , gd->qe_clk,1 ); -do_fixup_by_prop_u32 (blob,"device_type" ,"qe" ,4 , -"brg-frequency" , gd->brg_clk,1 ); -do_fixup_by_compat_u32 (blob,"fsl,qe" , -"clock-frequency" , gd->qe_clk,1 ); -do_fixup_by_compat_u32 (blob,"fsl,qe" , -"bus-frequency" , gd->qe_clk,1 ); -do_fixup_by_compat_u32 (blob,"fsl,qe" , -"brg-frequency" , gd->brg_clk,1 ); +ft_qe_setup (blob);#endif #ifdef CFG_NS16550
cpu/mpc85xx/fdt.c +3 -5
@@ -27,6 +27,8 @@#include <libfdt.h> #include <fdt_support.h> +extern void ft_qe_setup (void *blob); +void ft_cpu_setup (void *blob,bd_t *bd) { #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
@@ -43,11 +45,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)do_fixup_by_prop_u32 (blob,"device_type" ,"soc" ,4 ,"bus-frequency" , bd->bi_busfreq,1 );#ifdef CONFIG_QE -do_fixup_by_prop_u32 (blob,"device_type" ,"qe" ,4 , -"bus-frequency" , bd->bi_busfreq,1 ); -do_fixup_by_prop_u32 (blob,"device_type" ,"qe" ,4 , -"brg-frequency" , bd->bi_busfreq /2 ,1 ); -fdt_fixup_qe_firmware (blob); +ft_qe_setup (blob);#endif #ifdef CFG_NS16550
drivers/qe/Makefile +2 -1
@@ -24,7 +24,8 @@ include $(TOPDIR)/config.mk LIB := $(obj)qe.a -COBJS := qe.o uccf.o uec.o uec_phy.o +COBJS-$(CONFIG_OF_LIBFDT) += fdt.o +COBJS := qe.o uccf.o uec.o uec_phy.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
drivers/qe/fdt.c new file +90 -0
90 lines not on this page · raw message
drivers/qe/qe.h +1 -0
@@ -289,5 +289,6 @@ int qe_set_brg(uint brg, uint rate);int qe_set_mii_clk_src (int ucc_num);int qe_upload_firmware (const struct qe_firmware *firmware);struct qe_firmware_info *qe_get_firmware_info (void ); +void ft_qe_setup (void *blob);#endif /* __QE_H__ */
Signature · 1 line
1.5.3.7
PATCH 1/1 QE: Move FDT support into a common file
Quoted 4 lines · Kumar Gala
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Signed-off-by Kumar Gala <[email protected]>
FYI, this patch supersedes my previous patch, "83xx: add QE firmware node to device tree".
And Kumar, you should CC me on all QE patches.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 QE: Move FDT support into a common file
In reply to Kumar GalaQuoted 4 lines · Kumar Gala
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Signed-off-by Kumar Gala <[email protected]>
PATCH 1/1 QE: Move FDT support into a common file
Quoted 7 lines · On Fri, 18 Jan 2008 13:41:55 -0600 "Andy Fleming" <[email protected]> wrote:
Quoted 4 lines · Kumar Gala
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Signed-off-by Kumar Gala <[email protected]>Acked-by Andy Fleming <[email protected]>
WD, please apply directly, thanks,
Kim
Andy Fleming
AppliedPATCH 1/1 QE: Move FDT support into a common file
In reply to Kumar GalaQuoted 4 lines · Kumar Gala
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Signed-off-by Kumar Gala <[email protected]>
Applied, thanks!
Wolfgang Denk
AppliedPATCH 1/1 QE: Move FDT support into a common file
In reply to Kumar GalaQuoted 4 lines · In message <[email protected]> you wrote:
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Signed-off-by Kumar Gala <[email protected]>
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brontosaurus Principle: Organizations can grow faster than their
brains can manage them in relation to their environment and to their
own physiology: when this occurs, they are an endangered species.
- Thomas K. ConnellanPATCH 1/1 QE: Move FDT support into a common file
Quoted 4 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's.
Quoted 8 lines
Quoted 1 line
Signed-off-by Kumar Gala <[email protected]>Applied, thanks.
Best regards,
Wolfgang Denk
Thanks for applying this. I have one more patch for 1.3.2 that you may have
missed: "85xx, 86xx: Determine I2C clock frequencies and store in global_data".
It's in Andy Fleming's tree:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc85xx.git
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 QE: Move FDT support into a common file
Quoted 5 lines · In message <[email protected]> you wrote:
Thanks for applying this. I have one more patch for 1.3.2 that you may have
missed: "85xx, 86xx: Determine I2C clock frequencies and store inglobal_data".
It's in Andy Fleming's tree:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc85xx.git
I don't have this one on my list, and I haven't seen a pull request from Andy ?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A day without sunshine is like night.
PATCH 1/1 QE: Move FDT support into a common file
Quoted 7 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
Thanks for applying this. I have one more patch for 1.3.2 that you may have
missed: "85xx, 86xx: Determine I2C clock frequencies and store inglobal_data".
It's in Andy Fleming's tree:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc85xx.gitI don't have this one on my list,
I emailed the patch to this mailing list on Jan 9, and both Jon and Andy ack'd it in replies:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/34876
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/35917
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/35919
Quoted 2 lines
and I haven't seen a pull request
from Andy ?
Andy posted a pull request on Feb 5:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/36412/
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 QE: Move FDT support into a common file
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 6 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
Thanks for applying this. I have one more patch for 1.3.2 that you may have
missed: "85xx, 86xx: Determine I2C clock frequencies and store inglobal_data".
It's in Andy Fleming's tree:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc85xx.git
Quoted 8 lines
Quoted 1 line
I don't have this one on my list,
I emailed the patch to this mailing list on Jan 9, and both Jon and Andy ack'd it in replies:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/34876
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/35917
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/35919
OK, applied.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "How to make a million dollars: First, get a million dollars." - Steve Martin