devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] Fix orion-mdio resource/interrupt issues indentified while reviewing mvpp2
@ 2017-01-07 11:26 Russell King - ARM Linux
       [not found] ` <20170107112656.GL14217-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2017-01-07 11:26 UTC (permalink / raw)
  To: Thomas Petazzoni, Andrew Lunn, Jason Cooper, Gregory Clement,
	Mark Rutland, Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marcin Wojtas,
	netdev-u79uwXL29TY76Z2rM5mHXA, Sebastian Hesselbarth

This patch series fixes some issues identified while reviewing the
mvpp2 driver changes recently posted by Thomas.  I've left the clock
issue, and the question over whether this should be separate out of
this series, concentrating on the resource size / interrupt issue.

This series updates the binding to reflect reality, and ensures that
the driver will not try to access registers outside its binding.  It
also ensures that it doesn't leave the interrupt enabled in hardware
on probe failure.

 .../devicetree/bindings/net/marvell-orion-mdio.txt      | 17 +++++++++++++++--
 drivers/net/ethernet/marvell/mvmdio.c                   | 11 ++++++++++-
 2 files changed, 25 insertions(+), 3 deletions(-)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH RFC 3/4] dt-bindings: correct marvell orion MDIO binding document
       [not found] ` <20170107112656.GL14217-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
@ 2017-01-07 11:28   ` Russell King
  2017-01-09 10:31     ` Mark Rutland
       [not found]     ` <E1cPpAk-0005uJ-TM-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Russell King @ 2017-01-07 11:28 UTC (permalink / raw)
  To: Thomas Petazzoni, Andrew Lunn, Jason Cooper, Gregory Clement,
	Mark Rutland, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Marcin Wojtas,
	Sebastian Hesselbarth, netdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Correct the Marvell Orion MDIO binding document to properly reflect the
cases where an interrupt is present.  Augment the examples to show this.

Signed-off-by: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
---
 .../devicetree/bindings/net/marvell-orion-mdio.txt      | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
index 9417e54c26c0..ca733ff68ab9 100644
--- a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
+++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
@@ -7,7 +7,10 @@ interface.
 
 Required properties:
 - compatible: "marvell,orion-mdio"
-- reg: address and length of the SMI register
+- reg: address and length of the MDIO registers.  When an interrupt is
+  not present, the length is the size of the SMI register (4 bytes)
+  otherwise it must be 0x84 bytes to cover the interrupt control
+  registers.
 
 Optional properties:
 - interrupts: interrupt line number for the SMI error/done interrupt
@@ -17,7 +20,7 @@ The child nodes of the MDIO driver are the individual PHY devices
 connected to this MDIO bus. They must have a "reg" property given the
 PHY address on the MDIO bus.
 
-Example at the SoC level:
+Example at the SoC level without an interrupt property:
 
 mdio {
 	#address-cells = <1>;
@@ -26,6 +29,16 @@ mdio {
 	reg = <0xd0072004 0x4>;
 };
 
+Example with an interrupt property:
+
+mdio {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	compatible = "marvell,orion-mdio";
+	reg = <0xd0072004 0x84>;
+	interrupts = <30>;
+};
+
 And at the board level:
 
 mdio {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RFC 3/4] dt-bindings: correct marvell orion MDIO binding document
  2017-01-07 11:28   ` [PATCH RFC 3/4] dt-bindings: correct marvell orion MDIO binding document Russell King
@ 2017-01-09 10:31     ` Mark Rutland
       [not found]     ` <E1cPpAk-0005uJ-TM-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2017-01-09 10:31 UTC (permalink / raw)
  To: Russell King
  Cc: Thomas Petazzoni, Andrew Lunn, Jason Cooper, devicetree, netdev,
	Rob Herring, Gregory Clement, Marcin Wojtas, linux-arm-kernel,
	Sebastian Hesselbarth

On Sat, Jan 07, 2017 at 11:28:30AM +0000, Russell King wrote:
> Correct the Marvell Orion MDIO binding document to properly reflect the
> cases where an interrupt is present.  Augment the examples to show this.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

This looks fine to me.

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  .../devicetree/bindings/net/marvell-orion-mdio.txt      | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
> index 9417e54c26c0..ca733ff68ab9 100644
> --- a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
> +++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt
> @@ -7,7 +7,10 @@ interface.
>  
>  Required properties:
>  - compatible: "marvell,orion-mdio"
> -- reg: address and length of the SMI register
> +- reg: address and length of the MDIO registers.  When an interrupt is
> +  not present, the length is the size of the SMI register (4 bytes)
> +  otherwise it must be 0x84 bytes to cover the interrupt control
> +  registers.
>  
>  Optional properties:
>  - interrupts: interrupt line number for the SMI error/done interrupt
> @@ -17,7 +20,7 @@ The child nodes of the MDIO driver are the individual PHY devices
>  connected to this MDIO bus. They must have a "reg" property given the
>  PHY address on the MDIO bus.
>  
> -Example at the SoC level:
> +Example at the SoC level without an interrupt property:
>  
>  mdio {
>  	#address-cells = <1>;
> @@ -26,6 +29,16 @@ mdio {
>  	reg = <0xd0072004 0x4>;
>  };
>  
> +Example with an interrupt property:
> +
> +mdio {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	compatible = "marvell,orion-mdio";
> +	reg = <0xd0072004 0x84>;
> +	interrupts = <30>;
> +};
> +
>  And at the board level:
>  
>  mdio {
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RFC 3/4] dt-bindings: correct marvell orion MDIO binding document
       [not found]     ` <E1cPpAk-0005uJ-TM-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
@ 2017-01-10  5:35       ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-01-10  5:35 UTC (permalink / raw)
  To: Russell King
  Cc: Thomas Petazzoni, Andrew Lunn, Jason Cooper, Gregory Clement,
	Mark Rutland, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Marcin Wojtas, Sebastian Hesselbarth,
	netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, Jan 07, 2017 at 11:28:30AM +0000, Russell King wrote:
> Correct the Marvell Orion MDIO binding document to properly reflect the
> cases where an interrupt is present.  Augment the examples to show this.
> 
> Signed-off-by: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
> ---
>  .../devicetree/bindings/net/marvell-orion-mdio.txt      | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-10  5:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-07 11:26 [PATCH RFC 0/4] Fix orion-mdio resource/interrupt issues indentified while reviewing mvpp2 Russell King - ARM Linux
     [not found] ` <20170107112656.GL14217-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-01-07 11:28   ` [PATCH RFC 3/4] dt-bindings: correct marvell orion MDIO binding document Russell King
2017-01-09 10:31     ` Mark Rutland
     [not found]     ` <E1cPpAk-0005uJ-TM-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2017-01-10  5:35       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).