linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13
@ 2013-12-13  2:30 Simon Horman
  2013-12-13  2:30 ` [PATCH 1/3] ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB Simon Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Simon Horman @ 2013-12-13  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Kevin, Hi Arnd,

please consider these Renesas ARM based SoC fixes for v3.13.

The following changes since commit 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae:

  Linux 3.13-rc1 (2013-11-22 11:30:55 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes-for-v3.13

for you to fetch changes up to 23de2278ebc3a2f971ce45ca5e5e35c9d5a74040:

  ARM: shmobile: r8a7790: Fix GPIO resources in DTS (2013-11-28 17:04:39 +0900)

----------------------------------------------------------------
Renesas ARM based SoC fixes for v3.13

* r8a7790 (R-Car H1) SoC
  - Correct GPIO resources in DT.

    This problem has been present since GPIOs were added to the r8a7790 SoC
    by f98e10c88aa95bf7 ("ARM: shmobile: r8a7790: Add GPIO controller
    devices to device tree") in v3.12-rc1.

* irqchip renesas-intc-irqpin
  - Correct register bitfield shift calculation

    This bug has been present since the renesas-intc-irqpin driver was
    introduced by 443580486e3b9657 ("irqchip: Renesas INTC External IRQ pin
    driver") in v3.10-rc1

* Lager board
  - Do not build the phy fixup unless CONFIG_PHYLIB is enabled

    This problem was introduced by 48c8b96f21817aad

----------------------------------------------------------------
Laurent Pinchart (1):
      irqchip: renesas-intc-irqpin: Fix register bitfield shift calculation

Magnus Damm (1):
      ARM: shmobile: r8a7790: Fix GPIO resources in DTS

Simon Horman (1):
      ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB

 arch/arm/boot/dts/r8a7790.dtsi            | 24 ++++++++++++------------
 arch/arm/mach-shmobile/board-lager.c      |  4 +++-
 drivers/irqchip/irq-renesas-intc-irqpin.c |  8 +++++---
 3 files changed, 20 insertions(+), 16 deletions(-)

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

* [PATCH 1/3] ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB
  2013-12-13  2:30 [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Simon Horman
@ 2013-12-13  2:30 ` Simon Horman
  2013-12-13  2:30 ` [PATCH 2/3] irqchip: renesas-intc-irqpin: Fix register bitfield shift calculation Simon Horman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-12-13  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

Do not build the phy fixup unless CONFIG_PHYLIB is enabled.

Other than not being useful it is also not possible to link
the code under this condition as phy_register_fixup_for_id(),
mdiobus_read() and mdiobus_write() are absent.

arch/arm/mach-shmobile/built-in.o: In function `lager_ksz8041_fixup':
board-lager.c:(.text+0xb8): undefined reference to `mdiobus_read'
board-lager.c:(.text+0xd4): undefined reference to `mdiobus_write'
arch/arm/mach-shmobile/built-in.o: In function `lager_init':
board-lager.c:(.init.text+0xafc): undefined reference to `phy_register_fixup_for_id'

This problem was introduced by 48c8b96f21817aad
("ARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup")

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/board-lager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index a8d3ce6..e0406fd 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -245,7 +245,9 @@ static void __init lager_init(void)
 {
 	lager_add_standard_devices();
 
-	phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
+	if (IS_ENABLED(CONFIG_PHYLIB))
+		phy_register_fixup_for_id("r8a7790-ether-ff:01",
+					  lager_ksz8041_fixup);
 }
 
 static const char * const lager_boards_compat_dt[] __initconst = {
-- 
1.8.4

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

* [PATCH 2/3] irqchip: renesas-intc-irqpin: Fix register bitfield shift calculation
  2013-12-13  2:30 [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Simon Horman
  2013-12-13  2:30 ` [PATCH 1/3] ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB Simon Horman
@ 2013-12-13  2:30 ` Simon Horman
  2013-12-13  2:30 ` [PATCH 3/3] ARM: shmobile: r8a7790: Fix GPIO resources in DTS Simon Horman
  2013-12-20 19:41 ` [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-12-13  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The SENSE register bitfield position is incorrectly computed for SoCs
that use 2-bit IRQ sense fields. Fix it.

This has been tested on the Marzen (H1) and Bockw (M1) boards.

This bug has been present since the renesas-intc-irqpin driver was
introduced by 443580486e3b9657 ("irqchip: Renesas INTC External IRQ pin
driver") in v3.10-rc1.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 82cec63..3ee78f02 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -149,8 +149,9 @@ static void intc_irqpin_read_modify_write(struct intc_irqpin_priv *p,
 static void intc_irqpin_mask_unmask_prio(struct intc_irqpin_priv *p,
 					 int irq, int do_mask)
 {
-	int bitfield_width = 4; /* PRIO assumed to have fixed bitfield width */
-	int shift = (7 - irq) * bitfield_width; /* PRIO assumed to be 32-bit */
+	/* The PRIO register is assumed to be 32-bit with fixed 4-bit fields. */
+	int bitfield_width = 4;
+	int shift = 32 - (irq + 1) * bitfield_width;
 
 	intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_PRIO,
 				      shift, bitfield_width,
@@ -159,8 +160,9 @@ static void intc_irqpin_mask_unmask_prio(struct intc_irqpin_priv *p,
 
 static int intc_irqpin_set_sense(struct intc_irqpin_priv *p, int irq, int value)
 {
+	/* The SENSE register is assumed to be 32-bit. */
 	int bitfield_width = p->config.sense_bitfield_width;
-	int shift = (7 - irq) * bitfield_width; /* SENSE assumed to be 32-bit */
+	int shift = 32 - (irq + 1) * bitfield_width;
 
 	dev_dbg(&p->pdev->dev, "sense irq = %d, mode = %d\n", irq, value);
 
-- 
1.8.4

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

* [PATCH 3/3] ARM: shmobile: r8a7790: Fix GPIO resources in DTS
  2013-12-13  2:30 [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Simon Horman
  2013-12-13  2:30 ` [PATCH 1/3] ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB Simon Horman
  2013-12-13  2:30 ` [PATCH 2/3] irqchip: renesas-intc-irqpin: Fix register bitfield shift calculation Simon Horman
@ 2013-12-13  2:30 ` Simon Horman
  2013-12-20 19:41 ` [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-12-13  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

The r8a7790 GPIO resources are currently incorrect. Fix that
by making them match the English r8a7790 v0.6 data sheet.

Tested with GPIO LED using Lager DT reference.

This problem has been present since GPIOs were added to the r8a7790 SoC by
f98e10c88aa95bf7 ("ARM: shmobile: r8a7790: Add GPIO controller devices to
device tree") in v3.12-rc1.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7790.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index ee845fa..46e1d7e 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -87,9 +87,9 @@
 		interrupts = <1 9 0xf04>;
 	};
 
-	gpio0: gpio at ffc40000 {
+	gpio0: gpio at e6050000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc40000 0 0x2c>;
+		reg = <0 0xe6050000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 4 0x4>;
 		#gpio-cells = <2>;
@@ -99,9 +99,9 @@
 		interrupt-controller;
 	};
 
-	gpio1: gpio at ffc41000 {
+	gpio1: gpio at e6051000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc41000 0 0x2c>;
+		reg = <0 0xe6051000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 5 0x4>;
 		#gpio-cells = <2>;
@@ -111,9 +111,9 @@
 		interrupt-controller;
 	};
 
-	gpio2: gpio at ffc42000 {
+	gpio2: gpio at e6052000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc42000 0 0x2c>;
+		reg = <0 0xe6052000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 6 0x4>;
 		#gpio-cells = <2>;
@@ -123,9 +123,9 @@
 		interrupt-controller;
 	};
 
-	gpio3: gpio at ffc43000 {
+	gpio3: gpio at e6053000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc43000 0 0x2c>;
+		reg = <0 0xe6053000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 7 0x4>;
 		#gpio-cells = <2>;
@@ -135,9 +135,9 @@
 		interrupt-controller;
 	};
 
-	gpio4: gpio at ffc44000 {
+	gpio4: gpio at e6054000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc44000 0 0x2c>;
+		reg = <0 0xe6054000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 8 0x4>;
 		#gpio-cells = <2>;
@@ -147,9 +147,9 @@
 		interrupt-controller;
 	};
 
-	gpio5: gpio at ffc45000 {
+	gpio5: gpio at e6055000 {
 		compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
-		reg = <0 0xffc45000 0 0x2c>;
+		reg = <0 0xe6055000 0 0x50>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 9 0x4>;
 		#gpio-cells = <2>;
-- 
1.8.4

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

* [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13
  2013-12-13  2:30 [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Simon Horman
                   ` (2 preceding siblings ...)
  2013-12-13  2:30 ` [PATCH 3/3] ARM: shmobile: r8a7790: Fix GPIO resources in DTS Simon Horman
@ 2013-12-20 19:41 ` Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2013-12-20 19:41 UTC (permalink / raw)
  To: linux-arm-kernel

Simon Horman <horms+renesas@verge.net.au> writes:

> Hi Olof, Hi Kevin, Hi Arnd,
>
> please consider these Renesas ARM based SoC fixes for v3.13.
>
> The following changes since commit 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae:
>
>   Linux 3.13-rc1 (2013-11-22 11:30:55 -0800)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes-for-v3.13
>
> for you to fetch changes up to 23de2278ebc3a2f971ce45ca5e5e35c9d5a74040:
>
>   ARM: shmobile: r8a7790: Fix GPIO resources in DTS (2013-11-28 17:04:39 +0900)
>
> ----------------------------------------------------------------
> Renesas ARM based SoC fixes for v3.13
>
> * r8a7790 (R-Car H1) SoC
>   - Correct GPIO resources in DT.
>
>     This problem has been present since GPIOs were added to the r8a7790 SoC
>     by f98e10c88aa95bf7 ("ARM: shmobile: r8a7790: Add GPIO controller
>     devices to device tree") in v3.12-rc1.
>
> * irqchip renesas-intc-irqpin
>   - Correct register bitfield shift calculation
>
>     This bug has been present since the renesas-intc-irqpin driver was
>     introduced by 443580486e3b9657 ("irqchip: Renesas INTC External IRQ pin
>     driver") in v3.10-rc1
>
> * Lager board
>   - Do not build the phy fixup unless CONFIG_PHYLIB is enabled
>
>     This problem was introduced by 48c8b96f21817aad
>
> ----------------------------------------------------------------

Pulled into fixes.

Thanks,

Kevin

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

end of thread, other threads:[~2013-12-20 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13  2:30 [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Simon Horman
2013-12-13  2:30 ` [PATCH 1/3] ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB Simon Horman
2013-12-13  2:30 ` [PATCH 2/3] irqchip: renesas-intc-irqpin: Fix register bitfield shift calculation Simon Horman
2013-12-13  2:30 ` [PATCH 3/3] ARM: shmobile: r8a7790: Fix GPIO resources in DTS Simon Horman
2013-12-20 19:41 ` [GIT PULL 0/3] Renesas ARM based SoC fixes for v3.13 Kevin Hilman

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).