qe: move drivers/qe/qe.h to include/fsl_qe.h
Subsystems (3)
PATCH v3 1/3 qe: move drivers/qe/qe.h to include/fsl_qe.h
As the QE firmware struct is shared with Fman, move the header file out of drivers/qe/.
---
V3:
- Move file changes about "qe.h" to this patch.
V2:
- New Patch.
arch/powerpc/cpu/mpc85xx/cpu_init.c | 2 +- arch/powerpc/cpu/mpc85xx/fdt.c | 2 +- board/freescale/common/arm_sleep.c | 2 +- board/freescale/common/mpc85xx_sleep.c | 2 +- board/freescale/ls1021aqds/ls1021aqds.c | 2 +- board/freescale/ls1021atwr/ls1021atwr.c | 2 +- drivers/net/fm/fm.c | 2 +- drivers/qe/fdt.c | 2 +- drivers/qe/qe.c | 2 +- drivers/qe/uccf.c | 2 +- drivers/qe/uccf.h | 2 +- drivers/qe/uec.c | 2 +- drivers/qe/uec.h | 2 +- drivers/qe/uec_phy.c | 2 +- drivers/qe/qe.h => include/fsl_qe.h | 0 15 files changed, 14 insertions(+), 14 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -1
@@ -45,7 +45,7 @@#include "../../../../drivers/block/fsl_sata.h" #ifdef CONFIG_U_QE -#include "../../../../drivers/qe/qe.h" +#include <fsl_qe.h> #endif DECLARE_GLOBAL_DATA_PTR ;
arch/powerpc/cpu/mpc85xx/fdt.c +1 -1
@@ -19,7 +19,7 @@#ifdef CONFIG_FSL_ESDHC #include <fsl_esdhc.h> #endif -#include "../../../../drivers/qe/qe.h" /* For struct qe_firmware */ +#include <fsl_qe.h> /* For struct qe_firmware */ DECLARE_GLOBAL_DATA_PTR ;
board/freescale/common/arm_sleep.c +1 -1
@@ -19,7 +19,7 @@#include "sleep.h" #ifdef CONFIG_U_QE -#include "../../../drivers/qe/qe.h" +#include <fsl_qe.h> #endif DECLARE_GLOBAL_DATA_PTR ;
board/freescale/common/mpc85xx_sleep.c +1 -1
@@ -8,7 +8,7 @@#include <asm/immap_85xx.h> #include "sleep.h" #ifdef CONFIG_U_QE -#include "../../../drivers/qe/qe.h" +#include <fsl_qe.h> #endif DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls1021aqds/ls1021aqds.c +1 -1
@@ -27,7 +27,7 @@#include "../common/qixis.h" #include "ls1021aqds_qixis.h" #ifdef CONFIG_U_QE -#include "../../../drivers/qe/qe.h" +#include <fsl_qe.h> #endif #define PIN_MUX_SEL_CAN 0x03
board/freescale/ls1021atwr/ls1021atwr.c +1 -1
@@ -28,7 +28,7 @@#include <spl.h> #include "../common/sleep.h" #ifdef CONFIG_U_QE -#include "../../../drivers/qe/qe.h" +#include <fsl_qe.h> #endif
drivers/net/fm/fm.c +1 -1
@@ -10,7 +10,7 @@#include <asm/errno.h> #include "fm.h" -#include "../../qe/qe.h" /* For struct qe_firmware */ +#include <fsl_qe.h> /* For struct qe_firmware */ #ifdef CONFIG_SYS_QE_FMAN_FW_IN_NAND #include <nand.h>
drivers/qe/fdt.c +1 -1
@@ -10,7 +10,7 @@#include <common.h> #include <libfdt.h> #include <fdt_support.h> -#include "qe.h" +#include <fsl_qe.h> #ifdef CONFIG_QE DECLARE_GLOBAL_DATA_PTR ;
drivers/qe/qe.c +1 -1
@@ -12,7 +12,7 @@#include "asm/errno.h" #include "asm/io.h" #include "linux/immap_qe.h" -#include "qe.h" +#include <fsl_qe.h> #ifdef CONFIG_LS102XA #include <asm/arch/immap_ls102xa.h> #endif
drivers/qe/uccf.c +1 -1
@@ -12,8 +12,8 @@#include "asm/errno.h" #include "asm/io.h" #include "linux/immap_qe.h" -#include "qe.h" #include "uccf.h" +#include <fsl_qe.h> void ucc_fast_transmit_on_demand (ucc_fast_private_t *uccf) {
drivers/qe/uccf.h +1 -1
@@ -11,8 +11,8 @@#define __UCCF_H__#include "common.h" -#include "qe.h" #include "linux/immap_qe.h" +#include <fsl_qe.h> /* Fast or Giga ethernet */
drivers/qe/uec.c +1 -1
@@ -12,11 +12,11 @@#include "asm/errno.h" #include "asm/io.h" #include "linux/immap_qe.h" -#include "qe.h" #include "uccf.h" #include "uec.h" #include "uec_phy.h" #include "miiphy.h" +#include <fsl_qe.h> #include <phy.h> /* Default UTBIPAR SMI address */
drivers/qe/uec.h +1 -1
@@ -10,8 +10,8 @@#ifndef __UEC_H__#define __UEC_H__ -#include "qe.h" #include "uccf.h" +#include <fsl_qe.h> #include <phy.h> #define MAX_TX_THREADS 8
drivers/qe/uec_phy.c +1 -1
@@ -16,11 +16,11 @@#include "asm/errno.h" #include "linux/immap_qe.h" #include "asm/io.h" -#include "qe.h" #include "uccf.h" #include "uec.h" #include "uec_phy.h" #include "miiphy.h" +#include <fsl_qe.h> #include <phy.h> #define ugphy_printk(format, arg...) \
include/fsl_qe.h renamed from drivers/qe/qe.h +0 -0
Signature · 1 line
2.1.0.27.g96db324
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Both Freescale Layerscape and powerpc/mpc85xx platforms are using fdt_fixup_fman_firmware() to insert Fman ucode blob into the device tree. So move the function to driver code.
---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.
arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------- drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)
arch/powerpc/cpu/mpc85xx/fdt.c +5 -120
@@ -19,7 +19,9 @@#ifdef CONFIG_FSL_ESDHC #include <fsl_esdhc.h> #endif -#include <fsl_qe.h> /* For struct qe_firmware */ +#ifdef CONFIG_SYS_DPAA_FMAN +#include <fsl_fman.h> +#endif DECLARE_GLOBAL_DATA_PTR ;
@@ -488,125 +490,6 @@ static void ft_fixup_qe_snum(void *blob) }#endif -/** -* fdt_fixup_fman_firmware -- insert the Fman firmware into the device tree -* -* The binding for an Fman firmware node is documented in -* Documentation/powerpc/dts-bindings/fsl/dpaa/fman.txt. This node contains -* the actual Fman firmware binary data. The operating system is expected to -* be able to parse the binary data to determine any attributes it needs. -*/ -#ifdef CONFIG_SYS_DPAA_FMAN -void fdt_fixup_fman_firmware (void *blob) -{ -int rc, fmnode, fwnode =-1 ; -uint32_t phandle; -struct qe_firmware *fmanfw; -const struct qe_header *hdr; -unsigned int length; -uint32_t crc; -const char *p; - -/* The first Fman we find will contain the actual firmware. */ - fmnode =fdt_node_offset_by_compatible (blob,-1 ,"fsl,fman" ); -if (fmnode <0 ) -/* Exit silently if there are no Fman devices */ -return ; - -/* If we already have a firmware node, then also exit silently. */ -if (fdt_node_offset_by_compatible (blob,-1 ,"fsl,fman-firmware" ) >0 ) -return ; - -/* If the environment variable is not set, then exit silently */ - p =getenv ("fman_ucode" ); -if (!p) -return ; - - fmanfw = (struct qe_firmware *)simple_strtoul (p,NULL ,16 ); -if (!fmanfw) -return ; - - hdr = &fmanfw->header; - length =be32_to_cpu (hdr->length); - -/* Verify the firmware. */ -if ((hdr->magic[0 ] !='Q' ) || (hdr->magic[1 ] !='E' ) || - (hdr->magic[2 ] !='F' )) { -printf ("Data at %p is not an Fman firmware\n" , fmanfw); -return ; - } - -if (length >CONFIG_SYS_QE_FMAN_FW_LENGTH ) { -printf ("Fman firmware at %p is too large (size=%u)\n" , - fmanfw, length); -return ; - } - - length -=sizeof (u32);/* Subtract the size of the CRC */ - crc =be32_to_cpu (*(u32 *)((void *)fmanfw + length)); -if (crc !=crc32_no_comp (0 , (void *)fmanfw, length)) { -printf ("Fman firmware at %p has invalid CRC\n" , fmanfw); -return ; - } - -/* Increase the size of the fdt to make room for the node. */ - rc =fdt_increase_size (blob, fmanfw->header.length); -if (rc <0 ) { -printf ("Unable to make room for Fman firmware: %s\n" , -fdt_strerror (rc)); -return ; - } - -/* Create the firmware node. */ - fwnode =fdt_add_subnode (blob, fmnode,"fman-firmware" ); -if (fwnode <0 ) { -char s[64 ]; -fdt_get_path (blob, fmnode, s,sizeof (s)); -printf ("Could not add firmware node to %s: %s\n" , s, -fdt_strerror (fwnode)); -return ; - } - rc =fdt_setprop_string (blob, fwnode,"compatible" ,"fsl,fman-firmware" ); -if (rc <0 ) { -char s[64 ]; -fdt_get_path (blob, fwnode, s,sizeof (s)); -printf ("Could not add compatible property to node %s: %s\n" , s, -fdt_strerror (rc)); -return ; - } - phandle =fdt_create_phandle (blob, fwnode); -if (!phandle) { -char s[64 ]; -fdt_get_path (blob, fwnode, s,sizeof (s)); -printf ("Could not add phandle property to node %s: %s\n" , s, -fdt_strerror (rc)); -return ; - } - rc =fdt_setprop (blob, fwnode,"fsl,firmware" , fmanfw, fmanfw->header.length); -if (rc <0 ) { -char s[64 ]; -fdt_get_path (blob, fwnode, s,sizeof (s)); -printf ("Could not add firmware property to node %s: %s\n" , s, -fdt_strerror (rc)); -return ; - } - -/* Find all other Fman nodes and point them to the firmware node. */ -while ((fmnode =fdt_node_offset_by_compatible (blob, fmnode,"fsl,fman" )) >0 ) { - rc =fdt_setprop_cell (blob, fmnode,"fsl,firmware-phandle" , phandle); -if (rc <0 ) { -char s[64 ]; -fdt_get_path (blob, fmnode, s,sizeof (s)); -printf ("Could not add pointer property to node %s: %s\n" , - s,fdt_strerror (rc)); -return ; - } - } -} -#else -#define fdt_fixup_fman_firmware (x) -#endif -#if defined(CONFIG_PPC_P4080 )static void fdt_fixup_usb (void *fdt) {
@@ -752,7 +635,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)ft_fixup_qe_snum (blob);#endif +#ifdef CONFIG_SYS_DPAA_FMAN fdt_fixup_fman_firmware (blob); +#endif #ifdef CONFIG_SYS_NS16550 do_fixup_by_compat_u32(blob, "ns16550",
drivers/net/fm/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-y += dtsec.o obj-y += eth.o +obj-y += fdt.o obj-y += fm.o obj-y += init.o obj-y += tgec.o
drivers/net/fm/fdt.c new file +129 -0
129 lines not on this page · raw message
include/fsl_fman.h +1 -0
@@ -462,4 +462,5 @@ typedef struct ccsr_fman { u8 res5[4*1024]; } ccsr_fman_t; +void fdt_fixup_fman_firmware (void *blob);#endif /*__FSL_FMAN_H__*/
Signature · 1 line
2.1.0.27.g96db324
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 12 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.
Quoted 7 lines
arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)
Again, pass -M -C to git format-patch.
-Scott
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 31 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 12 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.Quoted 8 lines
arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C --stat ...".
Regards,
Qianyu
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 31 lines · Qianyu Gong
Quoted 31 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 20 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)
Quoted 6 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C --stat ...".
Scott means using -M and -C, git should detect the moving instead of adding and deleting the same code. Try to add --find-copies-harder to see if it generates a smaller patch.
York
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 34 lines · york sun
Quoted 33 lines · Qianyu Gong
Quoted 33 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 12 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.Quoted 8 lines
arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Again, pass -M -C to git format-patch.
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
-Scott
I don't understand but I've already used "git format-patch -M -C --stat ...".
Scott means using -M and -C, git should detect the moving instead of adding and deleting the same code. Try to add --find-copies-harder to see if it generates a smaller patch.
Qianyu,
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work. Even you are moving the function from one file to another, "git format-patch" cannot detect the moving because both files exist before and after this change, and the change set is not significant enough to be detected.
York
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 51 lines · york sun
Quoted 41 lines · york sun
Quoted 32 lines · Qianyu Gong
Quoted 32 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman
driver codeQuoted 20 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 7 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C --stat ...".
Quoted 6 lines
Scott means using -M and -C, git should detect the moving instead of adding and
deleting the same code. Try to add --find-copies-harder to see if it generates a
smaller patch.Qianyu,
Quoted 7 lines
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change,
and the change set is not significant enough to be detected.
It looks like the patch is creating drivers/net/fm/fdt.c...
-Scott
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 60 lines · Scott Wood
Quoted 51 lines · york sun
Quoted 41 lines · york sun
Quoted 32 lines · Qianyu Gong
Quoted 32 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman
driver codeQuoted 20 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 7 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C --stat ...".
Quoted 6 lines
Scott means using -M and -C, git should detect the moving instead of adding and
deleting the same code. Try to add --find-copies-harder to see if it generates a
smaller patch.Qianyu,
Quoted 7 lines
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change,
and the change set is not significant enough to be detected.
Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...
I was fooled and tried to adjust -M with numbers. I only noticed when I compared these two files before and after this patch.
Even it is moving a chunk of code from file A to file B, git cannot generate a patch saying so.
York
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 68 lines · york sun
Quoted 64 lines · Scott Wood
Quoted 55 lines · york sun
Quoted 45 lines · york sun
Quoted 35 lines · Qianyu Gong
Quoted 35 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to
Fman
driver codeQuoted 22 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device
tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 8 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C - -stat
...".Quoted 6 lines
Scott means using -M and -C, git should detect the moving instead of adding and
deleting the same code. Try to add --find-copies-harder to see if it generates a
smaller patch.Qianyu,
Quoted 7 lines
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change,
and the change set is not significant enough to be detected.Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...
Quoted 7 lines
I was fooled and tried to adjust -M with numbers. I only noticed when I compared
these two files before and after this patch.Even it is moving a chunk of code from file A to file B, git cannot generate a
patch saying so.
It can show it as a copy with the portions not copied deleted, though maybe not enough was copied in this case.
-Scott
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 66 lines · Scott Wood
Quoted 65 lines · york sun
Quoted 64 lines · Scott Wood
Quoted 62 lines · york sun
Quoted 45 lines · york sun
Quoted 35 lines · Qianyu Gong
Quoted 35 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to
Fman
driver codeQuoted 22 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device
tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 8 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C - -stat
...".Quoted 6 lines
Scott means using -M and -C, git should detect the moving instead of adding and
deleting the same code. Try to add --find-copies-harder to see if it generates a
smaller patch.Qianyu,
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change,
and the change set is not significant enough to be detected.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...
Actually you were right. This patch creates a new file. There are also other small changes here and there. Maybe that's the reason git doesn't detect the move.
Anyway, let me know if you have further comment. I am testing these patches.
York
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 75 lines
-----Original Message-----
From: york sun
Sent: Friday, February 12, 2016 1:39 AM
To: Scott Wood <[email protected]>; Qianyu Gong <[email protected]>; u- boot at lists.denx.de
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 62 lines · Scott Wood
Quoted 61 lines · york sun
Quoted 60 lines · Scott Wood
Quoted 58 lines · york sun
Quoted 41 lines · york sun
Quoted 32 lines · Qianyu Gong
Quoted 32 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 21 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 7 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C
- -stat ...".Quoted 6 lines
Scott means using -M and -C, git should detect the moving instead of adding and
deleting the same code. Try to add --find-copies-harder to see if it generates a
smaller patch.Qianyu,
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change,
and the change set is not significant enough to be detected.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...
Quoted 6 lines
Actually you were right. This patch creates a new file. There are also other small changes here and there. Maybe that's the reason git doesn't detect the move.
Anyway, let me know if you have further comment. I am testing these patches.
York
Hi York,
Thanks! I did make small changes in the function to make it work for both powerpc and arm platforms.
Regards,
Qianyu
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 92 lines · Qianyu Gong
Quoted 92 lines
-----Original Message-----
From: york sun
Sent: Friday, February 12, 2016 1:39 AM
To: Scott Wood <[email protected]>; Qianyu Gong <[email protected]>; u- boot at lists.denx.de
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman
driver codeQuoted 71 lines · Scott Wood
Quoted 70 lines · york sun
Quoted 69 lines · Scott Wood
Quoted 67 lines · york sun
Quoted 45 lines · york sun
Quoted 35 lines · Qianyu Gong
Quoted 35 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode
fixup to Fman driver codeQuoted 23 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are
usingfdt_fixup_fman_firmware()to insert Fman ucode blob into the
device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120 deletions(-)Quoted 8 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git format-patch -M -C
- -stat ...".Quoted 8 lines
Scott means using -M and -C, git should detect the moving instead of
adding and
deleting the same code. Try to add --find-copies-harder to see if it
generates a
smaller patch.Qianyu,
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't
work.
Even you are moving the function from one file to another, "git format
-patch"
cannot detect the moving because both files exist before and after this
change,
and the change set is not significant enough to be detected.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...Actually you were right. This patch creates a new file. There are also other
small changes here and there. Maybe that's the reason git doesn't detect the move.Anyway, let me know if you have further comment. I am testing these patches.
Quoted 7 lines
Quoted 1 line
York
Hi York,
Thanks! I did make small changes in the function to make it work for both powerpc
and arm platforms.
Those changes should have been a separate patch -- otherwise it's a lot of work to see what those changes are and review them.
-Scott
PATCH v3 2/3 fm: fdt: Move fman ucode fixup to Fman driver code
Quoted 101 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Wednesday, February 17, 2016 5:23 AM
To: Qianyu Gong <[email protected]>; york sun <[email protected]>; u- boot at lists.denx.de
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 91 lines · Qianyu Gong
Quoted 80 lines
-----Original Message-----
From: york sun
Sent: Friday, February 12, 2016 1:39 AM
To: Scott Wood <[email protected]>; Qianyu Gong <[email protected]>; u- boot at lists.denx.de
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 68 lines · Scott Wood
Quoted 67 lines · york sun
Quoted 66 lines · Scott Wood
Quoted 64 lines · york sun
Quoted 47 lines · york sun
Quoted 37 lines · Qianyu Gong
Quoted 37 lines
-----Original Message-----
From: Scott Wood [mailto:oss at buserror.net]
Sent: Tuesday, January 26, 2016 1:17 AM
To: Qianyu Gong <[email protected]>; u-boot at lists.denx.de
Cc: B07421 at freescale.com; Shaohui Xie <[email protected]>
Subject: Re: [U-Boot] [Patch V3 2/3] fm: fdt: Move fman ucode fixup to Fman driver codeQuoted 24 lines · Gong Qianyu
Both Freescale Layerscape and powerpc/mpc85xx platforms are using
fdt_fixup_fman_firmware()to insert Fman ucode blob into the device tree. So move the function to driver code.Signed-off-by Gong Qianyu <[email protected]>---
V3:
- Remove file changes about "qe.h".
(Should be put in the first patch of this
patchset)
V2:
- New patch.arch/powerpc/cpu/mpc85xx/fdt.c | 125 ++------------------------------------ - drivers/net/fm/Makefile | 1 + drivers/net/fm/fdt.c | 129 +++++++++++++++++++++++++++++++++++++++++ include/fsl_fman.h | 1 + 4 files changed, 136 insertions(+), 120deletions(-)
Quoted 8 lines
Quoted 3 lines
Again, pass -M -C to git format-patch.
-Scott
I don't understand but I've already used "git
format-patch -M -C
- -stat ...".Quoted 5 lines
Scott means using -M and -C, git should detect the moving instead of adding and deleting the same code. Try to add --find-copies-harder to see if it generates a smaller patch.
Qianyu,
Since you are on holiday, I tried it for you. Adjusting "-M -C" doesn't
work.
Even you are moving the function from one file to another, "git format -patch"
cannot detect the moving because both files exist before and after this change, and the change set is not significant enough to be detected.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
It looks like the patch is creating
drivers/net/fm/fdt.c...Quoted 8 lines
Actually you were right. This patch creates a new file. There are also other small changes here and there. Maybe that's the reason git doesn't detect the move.
Anyway, let me know if you have further comment. I am testing these patches.
York
Hi York,
Quoted 7 lines
Quoted 2 lines
Thanks! I did make small changes in the function to make it work for both powerpc and arm platforms.
Those changes should have been a separate patch -- otherwise it's a lot of work to see what those changes are and review them.
-Scott
OK.. Thanks for your reminder.
Regards,
Qianyu
PATCH v3 3/3 armv8/fsl-layerscape: fdt: add fixup for Fman ucode
In reply to Gong QianyuAdd fdt fixup to insert Fman firmware into the device tree.
---
V3:
- Remove fman clock fixup.
- Revise commit message too.
V2:
- Removed the duplicated function.
arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/fdt.c +7 -0
@@ -14,6 +14,9 @@#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
@@ -204,4 +207,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)#ifdef CONFIG_FSL_LSCH3 fdt_fixup_smmu (blob);#endif + +#ifdef CONFIG_SYS_DPAA_FMAN +fdt_fixup_fman_firmware (blob); +#endif }
Signature · 1 line
2.1.0.27.g96db324