[PATCH v2 02/30] Include generic parity.h in some architectures' bitops.h

2016-04-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng 

Use the generic version

Signed-off-by: Zhaoxiu Zeng 
---
 arch/arc/include/asm/bitops.h  | 1 +
 arch/arm/include/asm/bitops.h  | 1 +
 arch/arm64/include/asm/bitops.h| 1 +
 arch/avr32/include/asm/bitops.h| 1 +
 arch/c6x/include/asm/bitops.h  | 1 +
 arch/cris/include/asm/bitops.h | 1 +
 arch/frv/include/asm/bitops.h  | 1 +
 arch/h8300/include/asm/bitops.h| 1 +
 arch/hexagon/include/asm/bitops.h  | 1 +
 arch/m32r/include/asm/bitops.h | 1 +
 arch/m68k/include/asm/bitops.h | 1 +
 arch/metag/include/asm/bitops.h| 1 +
 arch/mn10300/include/asm/bitops.h  | 1 +
 arch/openrisc/include/asm/bitops.h | 1 +
 arch/parisc/include/asm/bitops.h   | 1 +
 arch/s390/include/asm/bitops.h | 1 +
 arch/sh/include/asm/bitops.h   | 1 +
 arch/xtensa/include/asm/bitops.h   | 1 +
 18 files changed, 18 insertions(+)

diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
index 0352fb8..7967e47 100644
--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -370,6 +370,7 @@ static inline __attribute__ ((const)) int __ffs(unsigned 
long x)
 #define ffz(x) __ffs(~(x))
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index e943e6c..99f28a6 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -313,6 +313,7 @@ static inline unsigned long __ffs(unsigned long x)
 
 #include 
 #include 
+#include 
 #include 
 
 #ifdef __ARMEB__
diff --git a/arch/arm64/include/asm/bitops.h b/arch/arm64/include/asm/bitops.h
index 9c19594..eac4965 100644
--- a/arch/arm64/include/asm/bitops.h
+++ b/arch/arm64/include/asm/bitops.h
@@ -44,6 +44,7 @@ extern int test_and_change_bit(int nr, volatile unsigned long 
*p);
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h
index 910d537..9f4a2ce 100644
--- a/arch/avr32/include/asm/bitops.h
+++ b/arch/avr32/include/asm/bitops.h
@@ -298,6 +298,7 @@ static inline int ffs(unsigned long word)
 #include 
 #include 
 #include 
+#include 
 #include 
 
 extern unsigned long find_next_zero_bit_le(const void *addr,
diff --git a/arch/c6x/include/asm/bitops.h b/arch/c6x/include/asm/bitops.h
index f0ab012..94eb0d1 100644
--- a/arch/c6x/include/asm/bitops.h
+++ b/arch/c6x/include/asm/bitops.h
@@ -87,6 +87,7 @@ static inline int ffs(int x)
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/arch/cris/include/asm/bitops.h b/arch/cris/include/asm/bitops.h
index 8062cb5..06bc246 100644
--- a/arch/cris/include/asm/bitops.h
+++ b/arch/cris/include/asm/bitops.h
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/arch/frv/include/asm/bitops.h b/arch/frv/include/asm/bitops.h
index 0df8e95..f2a7ee8 100644
--- a/arch/frv/include/asm/bitops.h
+++ b/arch/frv/include/asm/bitops.h
@@ -314,6 +314,7 @@ int __ilog2_u64(u64 n)
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h
index 05999ab..e392db2 100644
--- a/arch/h8300/include/asm/bitops.h
+++ b/arch/h8300/include/asm/bitops.h
@@ -172,6 +172,7 @@ static inline unsigned long __ffs(unsigned long word)
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/arch/hexagon/include/asm/bitops.h 
b/arch/hexagon/include/asm/bitops.h
index 5e4a59b..2df614e 100644
--- a/arch/hexagon/include/asm/bitops.h
+++ b/arch/hexagon/include/asm/bitops.h
@@ -290,6 +290,7 @@ static inline unsigned long __fls(unsigned long word)
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/arch/m32r/include/asm/bitops.h b/arch/m32r/include/asm/bitops.h
index 86ba2b4..e3cf46b 100644
--- a/arch/m32r/include/asm/bitops.h
+++ b/arch/m32r/include/asm/bitops.h
@@ -259,6 +259,7 @@ static __inline__ int test_and_change_bit(int nr, volatile 
void * addr)
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #endif /* __KERNEL__ */
diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h
index b4a9b0d..fd673ea 100644
--- a/arch/m68k/include/asm/bitops.h
+++ b/arch/m68k/include/asm/bitops.h
@@ -519,6 +519,7 @@ static inline int __fls(int x)
 #include 
 #include 
 #include 
+#include 
 #include 
 #endif /* __KERNEL__ */
 
diff --git a/arch/metag/include/asm/bitops.h b/arch/metag/include/asm/bitops.h
index 2671134..ad13087 100644
--- a/arch/metag/include/asm/bitops.h
+++ b/arch/metag/include/asm/bitops.h
@@ -118,6 +118,7 @@ static inline int test_and_change_bit(unsigned int bit,
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/arch/mn10300/include/asm/bitops.h 
b/arch/mn10300/include/asm/bitops.h
index fe6f8e2..60761b7 100644
--- a/arch/mn10300/include/asm/bitops.h
+++ b/arch/mn10300/include/asm/bitops.h
@@ -225,6 +225,7 @@ int ffs(int x)
 #include 
 #include 
 #include

Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-04-06 Thread Vineet Gupta
Hi,

On Thursday 17 March 2016 03:11 PM, Alexey Brodkin wrote:
> Following commit broke DW GMAC functionality on AXS10x boards:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
> 
> That's what happens on eth0 up:
> --->8
> libphy: PHY stmmac-0: not found
> eth0: Could not attach to PHY
> stmmac_open: Cannot attach to PHY (error: -19)
> --->8
> 
> Simplest solution is to add PHY description in board's .dts.
> And so we do here.
> 
> Signed-off-by: Alexey Brodkin 
> Cc: Rob Herring 
> Cc: Phil Reid 
> Cc: David S. Miller 
> Cc: linux-ker...@vger.kernel.org
> Cc: net...@vger.kernel.org
> Cc: sta...@vger.kernel.org # 4.5.x
> Cc: Sergei Shtylyov 
> ---
> 
> Changes v1 -> v2:
>  * PHY node name changed to match real PHY number being used (Sergei)
> 
>  arch/arc/boot/dts/axs10x_mb.dtsi | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi 
> b/arch/arc/boot/dts/axs10x_mb.dtsi
> index 44a578c..ab5d570 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -47,6 +47,14 @@
>   clocks = <&apbclk>;
>   clock-names = "stmmaceth";
>   max-speed = <100>;
> + mdio0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "snps,dwmac-mdio";
> + phy1: ethernet-phy@1 {
> + reg = <1>;
> + };
> + };
>   };
>  
>   ehci@0x4 {


So above DT fix for ARC went into 4.6-rc1 and ethernet was still broken on 
axs103
board.

-->8-
libphy: PHY stmmac-0: not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
-->8-

On 4.6-rc2 if I revert the DT change, ethernet works again.

@Giuseppe, @Phil, @Gabriel, I see you have made changes in that area. I presume
that above revert is the right/sufficient thing or do we need to do something 
else
as well.

TIA,
-Vineet

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-04-06 Thread Giuseppe CAVALLARO

On 4/6/2016 11:12 AM, Vineet Gupta wrote:

Hi,

On Thursday 17 March 2016 03:11 PM, Alexey Brodkin wrote:

Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

That's what happens on eth0 up:
--->8
libphy: PHY stmmac-0: not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
--->8

Simplest solution is to add PHY description in board's .dts.
And so we do here.

Signed-off-by: Alexey Brodkin 
Cc: Rob Herring 
Cc: Phil Reid 
Cc: David S. Miller 
Cc: linux-ker...@vger.kernel.org
Cc: net...@vger.kernel.org
Cc: sta...@vger.kernel.org # 4.5.x
Cc: Sergei Shtylyov 
---

Changes v1 -> v2:
  * PHY node name changed to match real PHY number being used (Sergei)

  arch/arc/boot/dts/axs10x_mb.dtsi | 8 
  1 file changed, 8 insertions(+)

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 44a578c..ab5d570 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -47,6 +47,14 @@
clocks = <&apbclk>;
clock-names = "stmmaceth";
max-speed = <100>;
+   mdio0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "snps,dwmac-mdio";
+   phy1: ethernet-phy@1 {
+   reg = <1>;
+   };
+   };
};

ehci@0x4 {



So above DT fix for ARC went into 4.6-rc1 and ethernet was still broken on 
axs103
board.

-->8-
libphy: PHY stmmac-0: not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
-->8-

On 4.6-rc2 if I revert the DT change, ethernet works again.

@Giuseppe, @Phil, @Gabriel, I see you have made changes in that area. I presume
that above revert is the right/sufficient thing or do we need to do something 
else
as well.


hmm I think so, we pushed all the changes in net-next to fix the MDIO
initialization according to the different DT parameter settings. So
unless there is some other case to cover, I think that the best
approach is to do the revert.

pls, let me know

peppe



TIA,
-Vineet





___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc