* Re: [PATCH v2 4/8] ARM: shmobile: move GIC and I2C devices from sh73a0 common .dtsi to reference
From: Guennadi Liakhovetski @ 2013-02-13 9:59 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-5-git-send-email-g.liakhovetski@gmx.de>
Hi Simon
On Wed, 13 Feb 2013, Simon Horman wrote:
> On Fri, Feb 08, 2013 at 07:38:28PM +0100, Guennadi Liakhovetski wrote:
> > In "legacy" mode, when all devices are initialised by the board .c file,
> > there is no need to install the GIC and all I2C devices from the device
> > tree too. Move them to the reference implementation, that fully relies upon
> > DT.
>
> The motivation for placing the code in sh73a0.dtsi was so that
> it would be available to the non-reference board code if/when it
> moves over to using DT.
>
> I'm happy to switch things around if its preferred to keep
> the dts small.
As I said, I do think it is good to keep devices in a central .dtsi,
included by all, but they should be disabled by default, using the
'status="disabled"' property, and only enabled on boards, that actually
use those devices. I'm just not sure what's the difference between the two
DT-"patching" syntaxes - using '&' and not using it.
Thanks
Guennadi
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >
> > I think, this is a fix and should be applied.
> >
> > arch/arm/boot/dts/sh73a0-reference.dtsi | 69 +++++++++++++++++++++++++++++++
> > arch/arm/boot/dts/sh73a0.dtsi | 69 -------------------------------
> > 2 files changed, 69 insertions(+), 69 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/sh73a0-reference.dtsi b/arch/arm/boot/dts/sh73a0-reference.dtsi
> > index d4bb012..457afc7 100644
> > --- a/arch/arm/boot/dts/sh73a0-reference.dtsi
> > +++ b/arch/arm/boot/dts/sh73a0-reference.dtsi
> > @@ -21,4 +21,73 @@
> > 0 141 0x4>;
> > reg-io-width = <4>;
> > };
> > +
> > + gic: interrupt-controller@f0001000 {
> > + compatible = "arm,cortex-a9-gic";
> > + #interrupt-cells = <3>;
> > + #address-cells = <1>;
> > + interrupt-controller;
> > + reg = <0xf0001000 0x1000>,
> > + <0xf0000100 0x100>;
> > + };
> > +
> > + i2c0: i2c@0xe6820000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "renesas,rmobile-iic";
> > + reg = <0xe6820000 0x425>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <0 167 0x4
> > + 0 168 0x4
> > + 0 169 0x4
> > + 0 170 0x4>;
> > + };
> > +
> > + i2c1: i2c@0xe6822000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "renesas,rmobile-iic";
> > + reg = <0xe6822000 0x425>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <0 51 0x4
> > + 0 52 0x4
> > + 0 53 0x4
> > + 0 54 0x4>;
> > + };
> > +
> > + i2c2: i2c@0xe6824000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "renesas,rmobile-iic";
> > + reg = <0xe6824000 0x425>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <0 171 0x4
> > + 0 172 0x4
> > + 0 173 0x4
> > + 0 174 0x4>;
> > + };
> > +
> > + i2c3: i2c@0xe6826000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "renesas,rmobile-iic";
> > + reg = <0xe6826000 0x425>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <0 183 0x4
> > + 0 184 0x4
> > + 0 185 0x4
> > + 0 186 0x4>;
> > + };
> > +
> > + i2c4: i2c@0xe6828000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "renesas,rmobile-iic";
> > + reg = <0xe6828000 0x425>;
> > + interrupt-parent = <&gic>;
> > + interrupts = <0 187 0x4
> > + 0 188 0x4
> > + 0 189 0x4
> > + 0 190 0x4>;
> > + };
> > };
> > diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
> > index 8a59465..6837b3f 100644
> > --- a/arch/arm/boot/dts/sh73a0.dtsi
> > +++ b/arch/arm/boot/dts/sh73a0.dtsi
> > @@ -28,73 +28,4 @@
> > reg = <1>;
> > };
> > };
> > -
> > - gic: interrupt-controller@f0001000 {
> > - compatible = "arm,cortex-a9-gic";
> > - #interrupt-cells = <3>;
> > - #address-cells = <1>;
> > - interrupt-controller;
> > - reg = <0xf0001000 0x1000>,
> > - <0xf0000100 0x100>;
> > - };
> > -
> > - i2c0: i2c@0xe6820000 {
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > - compatible = "renesas,rmobile-iic";
> > - reg = <0xe6820000 0x425>;
> > - interrupt-parent = <&gic>;
> > - interrupts = <0 167 0x4
> > - 0 168 0x4
> > - 0 169 0x4
> > - 0 170 0x4>;
> > - };
> > -
> > - i2c1: i2c@0xe6822000 {
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > - compatible = "renesas,rmobile-iic";
> > - reg = <0xe6822000 0x425>;
> > - interrupt-parent = <&gic>;
> > - interrupts = <0 51 0x4
> > - 0 52 0x4
> > - 0 53 0x4
> > - 0 54 0x4>;
> > - };
> > -
> > - i2c2: i2c@0xe6824000 {
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > - compatible = "renesas,rmobile-iic";
> > - reg = <0xe6824000 0x425>;
> > - interrupt-parent = <&gic>;
> > - interrupts = <0 171 0x4
> > - 0 172 0x4
> > - 0 173 0x4
> > - 0 174 0x4>;
> > - };
> > -
> > - i2c3: i2c@0xe6826000 {
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > - compatible = "renesas,rmobile-iic";
> > - reg = <0xe6826000 0x425>;
> > - interrupt-parent = <&gic>;
> > - interrupts = <0 183 0x4
> > - 0 184 0x4
> > - 0 185 0x4
> > - 0 186 0x4>;
> > - };
> > -
> > - i2c4: i2c@0xe6828000 {
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > - compatible = "renesas,rmobile-iic";
> > - reg = <0xe6828000 0x425>;
> > - interrupt-parent = <&gic>;
> > - interrupts = <0 187 0x4
> > - 0 188 0x4
> > - 0 189 0x4
> > - 0 190 0x4>;
> > - };
> > };
> > --
> > 1.7.2.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH] ARM: shmobile: marzen: Include mmc/host.h
From: Guennadi Liakhovetski @ 2013-02-13 9:52 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1360748750-11911-1-git-send-email-horms+renesas@verge.net.au>
On Wed, 13 Feb 2013, Simon Horman wrote:
> mmc/host.h provides MMC_CAP_SD_HIGHSPEED which is used in board-marzen.c
>
> This resolves a build problem observed when compiling with
> "mmc: tmio: remove unused and deprecated symbols" applied.
>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Thanks
Guennadi
> ---
> arch/arm/mach-shmobile/board-marzen.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
> index 0020506..3b3554a 100644
> --- a/arch/arm/mach-shmobile/board-marzen.c
> +++ b/arch/arm/mach-shmobile/board-marzen.c
> @@ -32,6 +32,7 @@
> #include <linux/smsc911x.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/sh_hspi.h>
> +#include <linux/mmc/host.h>
> #include <linux/mmc/sh_mobile_sdhi.h>
> #include <linux/mfd/tmio.h>
> #include <linux/usb/otg.h>
> --
> 1.7.10.4
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* [PATCH] ARM: shmobile: marzen: Include mmc/host.h
From: Simon Horman @ 2013-02-13 9:45 UTC (permalink / raw)
To: linux-arm-kernel
mmc/host.h provides MMC_CAP_SD_HIGHSPEED which is used in board-marzen.c
This resolves a build problem observed when compiling with
"mmc: tmio: remove unused and deprecated symbols" applied.
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-marzen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 0020506..3b3554a 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -32,6 +32,7 @@
#include <linux/smsc911x.h>
#include <linux/spi/spi.h>
#include <linux/spi/sh_hspi.h>
+#include <linux/mmc/host.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <linux/usb/otg.h>
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH 00/08] clocksource: sh_cmt: CMT driver update
From: Guennadi Liakhovetski @ 2013-02-13 9:45 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, johnstul, horms, shinya.kuribayashi.px,
tglx
In-Reply-To: <20121214055323.10081.12056.sendpatchset@w520>
Hi Magnus
On Fri, 14 Dec 2012, Magnus Damm wrote:
> clocksource: sh_cmt: CMT driver update
>
> [PATCH 01/08] clocksource: sh_cmt: Take care of clk_put() when setup_irq() fails
> [PATCH 02/08] clocksource: sh_cmt: Initialize 'max_match_value' and 'lock' in sh_cmt_setup()
> [PATCH 03/08] clocksource: sh_cmt: Consolidate platform_set_drvdata() call
> [PATCH 04/08] clocksource: sh_cmt: Introduce per-register functions
> [PATCH 05/08] clocksource: sh_cmt: CMSTR and CMCSR register access update
> [PATCH 06/08] clocksource: sh_cmt: CMCNT and CMCOR register access update
> [PATCH 07/08] clocksource: sh_cmt: Add control register callbacks
> [PATCH 08/08] clocksource: sh_cmt: Add CMT register layout comment
On a kzm9g board with -reference DT configuration and on armadillo800eva:
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Thanks
Guennadi
> This patch series contains a couple of driver updates from Kuribayashi-san
> together with some register access changes from me. The register access
> changes work towards adding support for 32-bit only CMT hardware, but
> the final bits are not yet included in this series due to lack of hardware.
>
> Patches 1-3:
> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
> Signed-off-by: Magnus Damm <damm@opensource.se>
>
> Patches 4-8:
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> drivers/clocksource/sh_cmt.c | 257 ++++++++++++++++++++++++------------------
> 1 file changed, 152 insertions(+), 105 deletions(-)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH 3/2] pinctrl: sh-pfc: fix a typo and simplify a definition on sh73a0
From: Simon Horman @ 2013-02-13 8:53 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <Pine.LNX.4.64.1302121633000.7059@axis700.grange>
On Wed, Feb 13, 2013 at 08:02:56AM +0100, Guennadi Liakhovetski wrote:
> On Wed, 13 Feb 2013, Guennadi Liakhovetski wrote:
>
> > Hi Simon
> >
> > On Wed, 13 Feb 2013, Simon Horman wrote:
> >
> > > [CC Linus and Laurent]
> > >
> > > On Tue, Feb 12, 2013 at 04:34:31PM +0100, Guennadi Liakhovetski wrote:
> > > > Fix definition of the SDHIWP0 function and simplify the CPU_ALL_PORT
> > > > definition on sh73a0.
> > > >
> > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > >
> > > This patch appears to be against code that has been merged into arm-soc
> > > for 3.9.
> > >
> > > In particular the following change in the pfc branch of the renesas tree
> > > a.k.a the arm-soc/renesas/pinmux branch of the arm-soc tree.
> > >
> > > commit 5d5166dc39bcbe2c21d4fca034540133c415dce6
> > > Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > Date: Sat Dec 15 23:51:24 2012 +0100
> > >
> > > sh-pfc: Add sh73a0 pinmux support
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > Acked-by: Paul Mundt <lethal@linux-sh.org>
> > > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > >
> > > As such, I would like to handle it separately from the other two patches
> > > in this series which are against un-merged code.
> > >
> > > Before I do so I would like to:
> > >
> > > * Know about the severity of this problem.
> > > Does it break things?
> >
> > Yes, .dts doesn't compile without the semicolon.
>
> Ok, sorry, obviously, I was thinking about a different patch. Please,
> ignore this.
>
> As for breakage - so far I'm personally unaware of any breakage, which is
> of course not to say, that none is possible.
Thanks. In any case it is probably appropriate for v3.10.
In any case I'll wait to see what Laurent and Linus have to say.
^ permalink raw reply
* Cortex-A15 MM patches
From: Simon Horman @ 2013-02-13 8:41 UTC (permalink / raw)
To: linux-arm-kernel
Hi Catalin, Hi All,
I would like to enquire about the status of two patches which I believe
were part of TC2 Evaluation Build which uses commit
7d80417ef67d51db15d5e72ac336aa6e0586014f of linaro-tracking.git.
http://releases.linaro.org/12.10/android/vexpress
1. ARM: LPAE: Invalidate the TLB for module addresses during translation fault
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/086036.html
2. ARMv7: Do not clean the PTE if coherent page table walk is supported
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/055379.html
As per the links above the patches have been posted upstream some time ago.
In the case of the first patch an alternate approach was discussed.
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/086147.html
However, I do not see these changes upstream as of next-20120212.
I am wondering if an alternate approach has been taken upstream
or if these patches are still required upstream.
Thanks
^ permalink raw reply
* Re: [PATCH] gpio: em: Use irq_domain_add_simple() to fix runtime error
From: Simon Horman @ 2013-02-13 8:11 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <20130212155613.13396.44355.sendpatchset@w520>
On Wed, Feb 13, 2013 at 12:56:13AM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Adjust the gpio-em.c driver to reconsider the pdata->irq_base
> variable. Non-DT board code like for instance board-kzm9d.c
> needs to operate of a static IRQ range for platform devices.
>
> So this patch is updating the code to make use of the function
> irq_domain_add_simple() instead of irq_domain_add_linear().
>
> Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
> 7385500 gpio/em: convert to linear IRQ domain
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Reported-by: Simon Horman <horms+renesas@verge.net.au>
This appears to be a regression between v3.7 and v3.8-rc1 which
(possibly amongst other things) prevents the NIC on the KZM9D
from functioning.
> ---
>
> drivers/gpio/gpio-em.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- 0001/drivers/gpio/gpio-em.c
> +++ work/drivers/gpio/gpio-em.c 2013-02-12 22:40:16.000000000 +0900
> @@ -299,8 +299,9 @@ static int em_gio_probe(struct platform_
> irq_chip->irq_set_type = em_gio_irq_set_type;
> irq_chip->flags = IRQCHIP_SKIP_SET_WAKE;
>
> - p->irq_domain = irq_domain_add_linear(pdev->dev.of_node,
> + p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
> pdata->number_of_pins,
> + pdata->irq_base,
> &em_gio_irq_domain_ops, p);
> if (!p->irq_domain) {
> ret = -ENXIO;
>
^ permalink raw reply
* Re: [PATCH/RFC v2 7/8] ARM: shmobile: parse DT and configure pinmux early on kzm9g-reference
From: Simon Horman @ 2013-02-13 8:06 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-8-git-send-email-g.liakhovetski@gmx.de>
On Wed, Feb 13, 2013 at 07:45:51AM +0100, Guennadi Liakhovetski wrote:
> Hi Simon
>
> On Wed, 13 Feb 2013, Simon Horman wrote:
>
> > On Fri, Feb 08, 2013 at 07:38:31PM +0100, Guennadi Liakhovetski wrote:
> > > GPIOs can be provided by the pinctrl subsystem, which can be initialised
> > > by DT. Therefore DT has to be parsed before requesting GPIOs. Also non-DT
> > > pinmux has to be configured early.
> >
> > Thanks, applied to the boards-kzm9g-reference branch.
> >
> > I am intending to merge that branch, which includes
> > the basic kzm9g reference code, into v3.10.
>
> Thanks for merging. However, there's already a gotcha with this patch too:
> this version is for a stack without sh73a0 DT pinctrl. If that's how
> you're going to merge this patch - that is ok. However, if it should go on
> top of DT pinctrl, the sh73a0_pinmux_init() call shouldn't be added, which
> is also the version, that I've sent to you yesterday. IIUC sh73a0 pinctrl
> DT isn't going to be in your tree yes, so, this patch should be ok. Then,
> when merging pinctrl DT we'll have to remember to remove that call again.
Thanks for bringing that to my attention.
I did notice this problem when applying your patches today and my plan is:
* To apply this patch without sh73a0 DT pinctrl.
* Remove the sh73a0_pinmux_init() call as part of the sh73a0 DT pinctrl
series.
^ permalink raw reply
* Re: [PATCH 3/3] ARM: shmobile: streamline mackerel SD and MMC devices
From: Simon Horman @ 2013-02-13 7:56 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360689333-13525-4-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 06:15:33PM +0100, Guennadi Liakhovetski wrote:
> This patch fixes the following issues with SD and MMC interfaces on mackerel:
> 1. replace custom card-detection functions with standard GPIO CD API
> 2. resources don't have to be numbered
> 3. add SDHI interrupt names
> 4. remove OCR masks, where regulators are used
> 5. only specify SDHI CD interrupts on interfaces where a CD pin is present -
> SDHI0
> 6. don't instantiate an MMCIF device and initialise MMCIF pins if SDHI1 is
> selected
With this patch applied on top of next I see the following:
mmc2: host doesn't support card's voltages
mmc2: error -22 whilst initialising MMC card
mmc2: host doesn't support card's voltages
mmc2: error -22 whilst initialising MMC card
mmc2: host doesn't support card's voltages
mmc2: error -22 whilst initialising MMC card
mmc2: host doesn't support card's voltages
mmc2: error -22 whilst initialising MMC card
mmc2: host doesn't support card's voltages
mmc2: error -22 whilst initialising MMC card
mmc2: host doesn't support card's voltages
Am I missing some dependencies?
(I know you send me a bunch of patches off-list,
but I'd appreciate not having to hunt through them individually
to answer this question)
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> arch/arm/mach-shmobile/board-mackerel.c | 104 +++++++++++-------------------
> 1 files changed, 38 insertions(+), 66 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 3004083..45e04b9 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -966,15 +966,6 @@ static struct platform_device nand_flash_device = {
> },
> };
>
> -/*
> - * The card detect pin of the top SD/MMC slot (CN7) is active low and is
> - * connected to GPIO A22 of SH7372 (GPIO_PORT41).
> - */
> -static int slot_cn7_get_cd(struct platform_device *pdev)
> -{
> - return !gpio_get_value(GPIO_PORT41);
> -}
> -
> /* SDHI0 */
> static struct sh_mobile_sdhi_info sdhi0_info = {
> .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
> @@ -985,21 +976,21 @@ static struct sh_mobile_sdhi_info sdhi0_info = {
> };
>
> static struct resource sdhi0_resources[] = {
> - [0] = {
> + {
> .name = "SDHI0",
> .start = 0xe6850000,
> .end = 0xe68500ff,
> .flags = IORESOURCE_MEM,
> - },
> - [1] = {
> + }, {
> + .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
> .start = evt2irq(0x0e00) /* SDHI0_SDHI0I0 */,
> .flags = IORESOURCE_IRQ,
> - },
> - [2] = {
> + }, {
> + .name = SH_MOBILE_SDHI_IRQ_SDCARD,
> .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */,
> .flags = IORESOURCE_IRQ,
> - },
> - [3] = {
> + }, {
> + .name = SH_MOBILE_SDHI_IRQ_SDIO,
> .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */,
> .flags = IORESOURCE_IRQ,
> },
> @@ -1017,34 +1008,28 @@ static struct platform_device sdhi0_device = {
>
> #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
> /* SDHI1 */
> +
> +/* GPIO_PORT41 can trigger IRQ8, but it is used by USBHS1, we have to poll */
> static struct sh_mobile_sdhi_info sdhi1_info = {
> .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
> .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
> - .tmio_ocr_mask = MMC_VDD_165_195,
> - .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
> + .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_USE_GPIO_CD,
> .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
> MMC_CAP_NEEDS_POLL,
> - .get_cd = slot_cn7_get_cd,
> + .cd_gpio = GPIO_PORT41,
> };
>
> static struct resource sdhi1_resources[] = {
> - [0] = {
> + {
> .name = "SDHI1",
> .start = 0xe6860000,
> .end = 0xe68600ff,
> .flags = IORESOURCE_MEM,
> - },
> - [1] = {
> - .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
> - .start = evt2irq(0x0e80), /* SDHI1_SDHI1I0 */
> - .flags = IORESOURCE_IRQ,
> - },
> - [2] = {
> + }, {
> .name = SH_MOBILE_SDHI_IRQ_SDCARD,
> .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */
> .flags = IORESOURCE_IRQ,
> - },
> - [3] = {
> + }, {
> .name = SH_MOBILE_SDHI_IRQ_SDIO,
> .start = evt2irq(0x0ec0), /* SDHI1_SDHI1I2 */
> .flags = IORESOURCE_IRQ,
> @@ -1062,43 +1047,32 @@ static struct platform_device sdhi1_device = {
> };
> #endif
>
> +/* SDHI2 */
> +
> /*
> * The card detect pin of the top SD/MMC slot (CN23) is active low and is
> * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
> */
> -static int slot_cn23_get_cd(struct platform_device *pdev)
> -{
> - return !gpio_get_value(GPIO_PORT162);
> -}
> -
> -/* SDHI2 */
> static struct sh_mobile_sdhi_info sdhi2_info = {
> .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
> .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX,
> - .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
> + .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_USE_GPIO_CD,
> .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
> MMC_CAP_NEEDS_POLL,
> - .get_cd = slot_cn23_get_cd,
> + .cd_gpio = GPIO_PORT162,
> };
>
> static struct resource sdhi2_resources[] = {
> - [0] = {
> + {
> .name = "SDHI2",
> .start = 0xe6870000,
> .end = 0xe68700ff,
> .flags = IORESOURCE_MEM,
> - },
> - [1] = {
> - .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
> - .start = evt2irq(0x1200), /* SDHI2_SDHI2I0 */
> - .flags = IORESOURCE_IRQ,
> - },
> - [2] = {
> + }, {
> .name = SH_MOBILE_SDHI_IRQ_SDCARD,
> .start = evt2irq(0x1220), /* SDHI2_SDHI2I1 */
> .flags = IORESOURCE_IRQ,
> - },
> - [3] = {
> + }, {
> .name = SH_MOBILE_SDHI_IRQ_SDIO,
> .start = evt2irq(0x1240), /* SDHI2_SDHI2I2 */
> .flags = IORESOURCE_IRQ,
> @@ -1137,11 +1111,12 @@ static struct resource sh_mmcif_resources[] = {
>
> static struct sh_mmcif_plat_data sh_mmcif_plat = {
> .sup_pclk = 0,
> - .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
> .caps = MMC_CAP_4_BIT_DATA |
> MMC_CAP_8_BIT_DATA |
> MMC_CAP_NEEDS_POLL,
> - .get_cd = slot_cn7_get_cd,
> + .use_cd_gpio = true,
> + /* card detect pin for SD/MMC slot (CN7) */
> + .cd_gpio = GPIO_PORT41,
> .slave_id_tx = SHDMA_SLAVE_MMCIF_TX,
> .slave_id_rx = SHDMA_SLAVE_MMCIF_RX,
> };
> @@ -1266,9 +1241,10 @@ static struct platform_device *mackerel_devices[] __initdata = {
> &sdhi0_device,
> #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
> &sdhi1_device,
> +#else
> + &sh_mmcif_device,
> #endif
> &sdhi2_device,
> - &sh_mmcif_device,
> &ceu_device,
> &mackerel_camera,
> &hdmi_device,
> @@ -1348,10 +1324,11 @@ static void __init mackerel_init(void)
> { "A3SP", &usbhs0_device, },
> { "A3SP", &usbhs1_device, },
> { "A3SP", &nand_flash_device, },
> - { "A3SP", &sh_mmcif_device, },
> { "A3SP", &sdhi0_device, },
> #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
> { "A3SP", &sdhi1_device, },
> +#else
> + { "A3SP", &sh_mmcif_device, },
> #endif
> { "A3SP", &sdhi2_device, },
> { "A4R", &ceu_device, },
> @@ -1477,21 +1454,7 @@ static void __init mackerel_init(void)
> gpio_request(GPIO_FN_SDHID1_2, NULL);
> gpio_request(GPIO_FN_SDHID1_1, NULL);
> gpio_request(GPIO_FN_SDHID1_0, NULL);
> -#endif
> - /* card detect pin for MMC slot (CN7) */
> - gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL);
> -
> - /* enable SDHI2 */
> - gpio_request(GPIO_FN_SDHICMD2, NULL);
> - gpio_request(GPIO_FN_SDHICLK2, NULL);
> - gpio_request(GPIO_FN_SDHID2_3, NULL);
> - gpio_request(GPIO_FN_SDHID2_2, NULL);
> - gpio_request(GPIO_FN_SDHID2_1, NULL);
> - gpio_request(GPIO_FN_SDHID2_0, NULL);
> -
> - /* card detect pin for microSD slot (CN23) */
> - gpio_request_one(GPIO_PORT162, GPIOF_IN, NULL);
> -
> +#else
> /* MMCIF */
> gpio_request(GPIO_FN_MMCD0_0, NULL);
> gpio_request(GPIO_FN_MMCD0_1, NULL);
> @@ -1503,6 +1466,15 @@ static void __init mackerel_init(void)
> gpio_request(GPIO_FN_MMCD0_7, NULL);
> gpio_request(GPIO_FN_MMCCMD0, NULL);
> gpio_request(GPIO_FN_MMCCLK0, NULL);
> +#endif
> +
> + /* enable SDHI2 */
> + gpio_request(GPIO_FN_SDHICMD2, NULL);
> + gpio_request(GPIO_FN_SDHICLK2, NULL);
> + gpio_request(GPIO_FN_SDHID2_3, NULL);
> + gpio_request(GPIO_FN_SDHID2_2, NULL);
> + gpio_request(GPIO_FN_SDHID2_1, NULL);
> + gpio_request(GPIO_FN_SDHID2_0, NULL);
>
> /* FLCTL */
> gpio_request(GPIO_FN_D0_NAF0, NULL);
> --
> 1.7.2.5
>
^ permalink raw reply
* [PATCH] ARM: mach-shmobile: mackerel: enable MMCIF and SDHI in defconfig
From: Simon Horman @ 2013-02-13 7:49 UTC (permalink / raw)
To: linux-arm-kernel
I'm unsure why this isn't already the case.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/configs/mackerel_defconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig
index 7594b3a..ec8e605 100644
--- a/arch/arm/configs/mackerel_defconfig
+++ b/arch/arm/configs/mackerel_defconfig
@@ -94,6 +94,9 @@ CONFIG_USB_RENESAS_USBHS=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_RENESAS_USBHS_UDC=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHI=y
+CONFIG_MMC_SH_MMCIF=y
CONFIG_DMADEVICES=y
CONFIG_SH_DMAE=y
CONFIG_EXT2_FS=y
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH 2/3] ARM: shmobile: switch SDHI0 to GPIO regulator on armadillo800eva
From: Simon Horman @ 2013-02-13 7:33 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360689333-13525-3-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 04:53:51PM -0800, Kuninori Morimoto wrote:
>
> Hi Guennadi
>
> > When regulators are used with MMC devices, explicitly provided OCR masks
> > are ignored, they can be removed from platform data. Also switch SDHI0
> > from fixed regulator with hard-wired GPIO levels to a proper GPIO regulator
> > instance to enable dynamic voltage switching.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
>
> I got "checkpatch.pl" warning on this patch.
> I don't care so much about "Avoid CamelCase",
> but please fix "line over 80 characters" and "{" position.
Thanks Morimoto-san.
Guennadi I'm holding off on applying this for the above tweaks.
^ permalink raw reply
* Re: [PATCH 2/3] ARM: shmobile: switch SDHI0 to GPIO regulator on armadillo800eva
From: Simon Horman @ 2013-02-13 7:30 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360689333-13525-3-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 04:53:51PM -0800, Kuninori Morimoto wrote:
>
> Hi Guennadi
>
> > When regulators are used with MMC devices, explicitly provided OCR masks
> > are ignored, they can be removed from platform data. Also switch SDHI0
> > from fixed regulator with hard-wired GPIO levels to a proper GPIO regulator
> > instance to enable dynamic voltage switching.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
>
> I got "checkpatch.pl" warning on this patch.
> I don't care so much about "Avoid CamelCase",
> but please fix "line over 80 characters" and "{" position.
It seems that with this change in place it would also be good
to update the defconfig to enable CONFIG_REGULATOR and possibly
CONFIG_REGULATOR_DUMMY.
Guennadi could you make a separate patch to do this?
^ permalink raw reply
* Re: [PATCH 3/2] pinctrl: sh-pfc: fix a typo and simplify a definition on sh73a0
From: Guennadi Liakhovetski @ 2013-02-13 7:02 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <Pine.LNX.4.64.1302121633000.7059@axis700.grange>
On Wed, 13 Feb 2013, Guennadi Liakhovetski wrote:
> Hi Simon
>
> On Wed, 13 Feb 2013, Simon Horman wrote:
>
> > [CC Linus and Laurent]
> >
> > On Tue, Feb 12, 2013 at 04:34:31PM +0100, Guennadi Liakhovetski wrote:
> > > Fix definition of the SDHIWP0 function and simplify the CPU_ALL_PORT
> > > definition on sh73a0.
> > >
> > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> >
> > This patch appears to be against code that has been merged into arm-soc
> > for 3.9.
> >
> > In particular the following change in the pfc branch of the renesas tree
> > a.k.a the arm-soc/renesas/pinmux branch of the arm-soc tree.
> >
> > commit 5d5166dc39bcbe2c21d4fca034540133c415dce6
> > Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > Date: Sat Dec 15 23:51:24 2012 +0100
> >
> > sh-pfc: Add sh73a0 pinmux support
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > Acked-by: Paul Mundt <lethal@linux-sh.org>
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > As such, I would like to handle it separately from the other two patches
> > in this series which are against un-merged code.
> >
> > Before I do so I would like to:
> >
> > * Know about the severity of this problem.
> > Does it break things?
>
> Yes, .dts doesn't compile without the semicolon.
Ok, sorry, obviously, I was thinking about a different patch. Please,
ignore this.
As for breakage - so far I'm personally unaware of any breakage, which is
of course not to say, that none is possible.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH 3/2] pinctrl: sh-pfc: fix a typo and simplify a definition on sh73a0
From: Guennadi Liakhovetski @ 2013-02-13 6:59 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <Pine.LNX.4.64.1302121633000.7059@axis700.grange>
Hi Simon
On Wed, 13 Feb 2013, Simon Horman wrote:
> [CC Linus and Laurent]
>
> On Tue, Feb 12, 2013 at 04:34:31PM +0100, Guennadi Liakhovetski wrote:
> > Fix definition of the SDHIWP0 function and simplify the CPU_ALL_PORT
> > definition on sh73a0.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> This patch appears to be against code that has been merged into arm-soc
> for 3.9.
>
> In particular the following change in the pfc branch of the renesas tree
> a.k.a the arm-soc/renesas/pinmux branch of the arm-soc tree.
>
> commit 5d5166dc39bcbe2c21d4fca034540133c415dce6
> Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Date: Sat Dec 15 23:51:24 2012 +0100
>
> sh-pfc: Add sh73a0 pinmux support
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Acked-by: Paul Mundt <lethal@linux-sh.org>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> As such, I would like to handle it separately from the other two patches
> in this series which are against un-merged code.
>
> Before I do so I would like to:
>
> * Know about the severity of this problem.
> Does it break things?
Yes, .dts doesn't compile without the semicolon.
> * Know what the author of the code, Laurent (CCed) thinks about this.
I thinik, you're the author. The semicolon disappears as a result of your
merge, AFAICS both original conflicting patches were ok. However, I might
easily have misinterpreted the merge history.
Thanks
Guennadi
> * Know what the pin control maintainer, Linus (CCed) thinks about this.
>
> Linus, I'm happy to handle this as its code that went through
> my tree. Or I'm happy for you to take it. In the case of the former
> an ack or otherwise would be appreciated.
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH/RFC v2 7/8] ARM: shmobile: parse DT and configure pinmux early on kzm9g-reference
From: Guennadi Liakhovetski @ 2013-02-13 6:45 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-8-git-send-email-g.liakhovetski@gmx.de>
Hi Simon
On Wed, 13 Feb 2013, Simon Horman wrote:
> On Fri, Feb 08, 2013 at 07:38:31PM +0100, Guennadi Liakhovetski wrote:
> > GPIOs can be provided by the pinctrl subsystem, which can be initialised
> > by DT. Therefore DT has to be parsed before requesting GPIOs. Also non-DT
> > pinmux has to be configured early.
>
> Thanks, applied to the boards-kzm9g-reference branch.
>
> I am intending to merge that branch, which includes
> the basic kzm9g reference code, into v3.10.
Thanks for merging. However, there's already a gotcha with this patch too:
this version is for a stack without sh73a0 DT pinctrl. If that's how
you're going to merge this patch - that is ok. However, if it should go on
top of DT pinctrl, the sh73a0_pinmux_init() call shouldn't be added, which
is also the version, that I've sent to you yesterday. IIUC sh73a0 pinctrl
DT isn't going to be in your tree yes, so, this patch should be ok. Then,
when merging pinctrl DT we'll have to remember to remove that call again.
Thanks
Guennadi
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >
> > Also a hack, that should be replaced by a proper pinctrl DT support.
> >
> > arch/arm/mach-shmobile/board-kzm9g-reference.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > index 8280d8a..728c810 100644
> > --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > @@ -34,6 +34,9 @@
> >
> > static void __init kzm_init(void)
> > {
> > + sh73a0_add_standard_devices_dt();
> > + sh73a0_pinmux_init();
> > +
> > /* enable SCIFA4 */
> > gpio_request(GPIO_FN_SCIFA4_TXD, NULL);
> > gpio_request(GPIO_FN_SCIFA4_RXD, NULL);
> > @@ -81,8 +84,6 @@ static void __init kzm_init(void)
> > /* Early BRESP enable, Shared attribute override enable, 64K*8way */
> > l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
> > #endif
> > -
> > - sh73a0_add_standard_devices_dt();
> > }
> >
> > static void kzm9g_restart(char mode, const char *cmd)
> > --
> > 1.7.2.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply
* Re: [PATCH v2 5/8] ARM: shmobile: add sh73a0-specific timer initialisation to kzm9g-reference
From: Simon Horman @ 2013-02-13 5:37 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-6-git-send-email-g.liakhovetski@gmx.de>
On Wed, Feb 13, 2013 at 02:04:43PM +0900, Magnus Damm wrote:
> Hi Simon,
>
> On Wed, Feb 13, 2013 at 1:41 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Feb 13, 2013 at 01:15:59PM +0900, Magnus Damm wrote:
> >> Hi Simon,
> >>
> >> On Wed, Feb 13, 2013 at 12:46 PM, Simon Horman <horms@verge.net.au> wrote:
> >> > On Fri, Feb 08, 2013 at 07:38:29PM +0100, Guennadi Liakhovetski wrote:
> >> >> This patch fixes failing boot of the kzm9g-reference kernel.
> >> >
> >> > Magnus specifically asked for the DT reference code not to use
> >> > early timers.
> >> >
> >> > As you have no doubt observed the current code doesn't work with SMP.
> >> > I have not been able to find a solution that does work with CONFIG_SMP
> >> > enabled without using early timers. I would welcome some ideas
> >> > on how to resolve this problem without using early timers.
> >>
> >> I have now tracked down and submitted a fix for the KZM9D regression
> >> you pointed me to earlier.
> >>
> >> Next step is to figure out what is wrong with KZM9G in DT-only mode.
> >> Can you guide me to reproduce off-list?
> >
> > I'd prefer to guide you on list so the knowledge is archived.
>
> Ok, thanks, that's fine too of course.
>
> > 1. Obtain the reference code.
> >
> > I suggest the boards-kzm9g-reference branch of the renesas tree.
> >
> > 2. Configure
> >
> > ARCH=arm make kzm9g_defconfig
> >
> > Also, enable CONFIG_MACH_KZM9G_REFERENCE and CONFIG_ARM_APPENDED_DTB
> >
> > N.B: CONFIG_ARM_APPENDED_DTB will be enabled by default in 3.8
> >
> > 3. Compile
> >
> > 4. Append arch/arm/boot/dts/sh73a0-kzm9g-reference.dtb to zImage and
> > refresh uImage
> >
> > 4. Boot, you should see the boot halt at:
> >
> > ...
> > NR_IRQS:16 nr_irqs:16 16
> > sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 3489660920ms
> > Console: colour dummy device 80x30
> > console [tty0] enabled
> > Calibrating delay loop (skipped) preset value.. 2287.41 BogoMIPS (lpj‰36512)
> > pid_max: default: 32768 minimum: 301
> > Mount-cache hash table entries: 512
> > CPU: Testing write buffer coherency: ok
> > CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> > Setting up static identity map for 0x4132aaf8 - 0x4132ab50
>
> I assume someone has already tested the obvious things like booting
> with maxcpus=1 and checking if disabling TWD helps.
Yes.
^ permalink raw reply
* Re: [PATCH v2 5/8] ARM: shmobile: add sh73a0-specific timer initialisation to kzm9g-reference
From: Magnus Damm @ 2013-02-13 5:04 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-6-git-send-email-g.liakhovetski@gmx.de>
Hi Simon,
On Wed, Feb 13, 2013 at 1:41 PM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Feb 13, 2013 at 01:15:59PM +0900, Magnus Damm wrote:
>> Hi Simon,
>>
>> On Wed, Feb 13, 2013 at 12:46 PM, Simon Horman <horms@verge.net.au> wrote:
>> > On Fri, Feb 08, 2013 at 07:38:29PM +0100, Guennadi Liakhovetski wrote:
>> >> This patch fixes failing boot of the kzm9g-reference kernel.
>> >
>> > Magnus specifically asked for the DT reference code not to use
>> > early timers.
>> >
>> > As you have no doubt observed the current code doesn't work with SMP.
>> > I have not been able to find a solution that does work with CONFIG_SMP
>> > enabled without using early timers. I would welcome some ideas
>> > on how to resolve this problem without using early timers.
>>
>> I have now tracked down and submitted a fix for the KZM9D regression
>> you pointed me to earlier.
>>
>> Next step is to figure out what is wrong with KZM9G in DT-only mode.
>> Can you guide me to reproduce off-list?
>
> I'd prefer to guide you on list so the knowledge is archived.
Ok, thanks, that's fine too of course.
> 1. Obtain the reference code.
>
> I suggest the boards-kzm9g-reference branch of the renesas tree.
>
> 2. Configure
>
> ARCH=arm make kzm9g_defconfig
>
> Also, enable CONFIG_MACH_KZM9G_REFERENCE and CONFIG_ARM_APPENDED_DTB
>
> N.B: CONFIG_ARM_APPENDED_DTB will be enabled by default in 3.8
>
> 3. Compile
>
> 4. Append arch/arm/boot/dts/sh73a0-kzm9g-reference.dtb to zImage and
> refresh uImage
>
> 4. Boot, you should see the boot halt at:
>
> ...
> NR_IRQS:16 nr_irqs:16 16
> sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 3489660920ms
> Console: colour dummy device 80x30
> console [tty0] enabled
> Calibrating delay loop (skipped) preset value.. 2287.41 BogoMIPS (lpj‰36512)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 512
> CPU: Testing write buffer coherency: ok
> CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> Setting up static identity map for 0x4132aaf8 - 0x4132ab50
I assume someone has already tested the obvious things like booting
with maxcpus=1 and checking if disabling TWD helps.
Thanks,
/ magnus
^ permalink raw reply
* Re: [PATCH v2 5/8] ARM: shmobile: add sh73a0-specific timer initialisation to kzm9g-reference
From: Simon Horman @ 2013-02-13 4:41 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-6-git-send-email-g.liakhovetski@gmx.de>
On Wed, Feb 13, 2013 at 01:15:59PM +0900, Magnus Damm wrote:
> Hi Simon,
>
> On Wed, Feb 13, 2013 at 12:46 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Fri, Feb 08, 2013 at 07:38:29PM +0100, Guennadi Liakhovetski wrote:
> >> This patch fixes failing boot of the kzm9g-reference kernel.
> >
> > Magnus specifically asked for the DT reference code not to use
> > early timers.
> >
> > As you have no doubt observed the current code doesn't work with SMP.
> > I have not been able to find a solution that does work with CONFIG_SMP
> > enabled without using early timers. I would welcome some ideas
> > on how to resolve this problem without using early timers.
>
> I have now tracked down and submitted a fix for the KZM9D regression
> you pointed me to earlier.
>
> Next step is to figure out what is wrong with KZM9G in DT-only mode.
> Can you guide me to reproduce off-list?
I'd prefer to guide you on list so the knowledge is archived.
1. Obtain the reference code.
I suggest the boards-kzm9g-reference branch of the renesas tree.
2. Configure
ARCH=arm make kzm9g_defconfig
Also, enable CONFIG_MACH_KZM9G_REFERENCE and CONFIG_ARM_APPENDED_DTB
N.B: CONFIG_ARM_APPENDED_DTB will be enabled by default in 3.8
3. Compile
4. Append arch/arm/boot/dts/sh73a0-kzm9g-reference.dtb to zImage and
refresh uImage
4. Boot, you should see the boot halt at:
...
NR_IRQS:16 nr_irqs:16 16
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 3489660920ms
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop (skipped) preset value.. 2287.41 BogoMIPS (lpj‰36512)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x4132aaf8 - 0x4132ab50
^ permalink raw reply
* Re: [PATCH/RFC 3/3] ARM: shmobile: switch SDHI and MMCIF interfaces on kzm9g-reference to pinctrl
From: Simon Horman @ 2013-02-13 4:32 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360684204-12888-4-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 04:50:04PM +0100, Guennadi Liakhovetski wrote:
> The recently added on sh73a0 DT pinctrl support enables us to switch SDHI
> and MMCIF interface pins to pinctrl and to add GPIO bindings for their
> card-detection pins and regulators.
This depends on an earlier patch of yours
"ARM: shmobile: move GIC and I2C devices from sh73a0 common .dtsi to reference"
which I have replied to.
^ permalink raw reply
* Re: [PATCH/RFC 2/3] pinctrl: sh-pfc: add pin groups for all SD/MMC interfaces on sh73a0
From: Simon Horman @ 2013-02-13 4:31 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360684204-12888-3-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 04:50:03PM +0100, Guennadi Liakhovetski wrote:
> Add pin group definitions for SDHI0, SDHI1, SDHI2 and MMCIF interfaces on
> sh73a0.
Also applied to topic/pinmux-sparse.
^ permalink raw reply
* Re: [PATCH/RFC 1/3] pinctrl: sh-pfc: support sparse GPIO numbers
From: Simon Horman @ 2013-02-13 4:31 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360684204-12888-2-git-send-email-g.liakhovetski@gmx.de>
On Tue, Feb 12, 2013 at 04:50:02PM +0100, Guennadi Liakhovetski wrote:
> Not on all sh-/r-mobile platfotms all pins are numbered contiguously from 0
> to N-1. On all ARM-based platforms datasheets use simple numbers to identify
> them, unlike some SuperH-based SoC, naming pins, using strings, e.g. A31:A0,
> B11:B0, C31:C0, etc. So far the sg-pfc pinctrl driver supported only
> contiguous pin numbering. This patch adds support for sparse pin numbers to
> support sh73a0 and any other similar SoCs.
Applied to a new topic branch, topic/pinmux-sparse.
^ permalink raw reply
* Re: [PATCH v2 5/8] ARM: shmobile: add sh73a0-specific timer initialisation to kzm9g-reference
From: Magnus Damm @ 2013-02-13 4:15 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-6-git-send-email-g.liakhovetski@gmx.de>
Hi Simon,
On Wed, Feb 13, 2013 at 12:46 PM, Simon Horman <horms@verge.net.au> wrote:
> On Fri, Feb 08, 2013 at 07:38:29PM +0100, Guennadi Liakhovetski wrote:
>> This patch fixes failing boot of the kzm9g-reference kernel.
>
> Magnus specifically asked for the DT reference code not to use
> early timers.
>
> As you have no doubt observed the current code doesn't work with SMP.
> I have not been able to find a solution that does work with CONFIG_SMP
> enabled without using early timers. I would welcome some ideas
> on how to resolve this problem without using early timers.
I have now tracked down and submitted a fix for the KZM9D regression
you pointed me to earlier.
Next step is to figure out what is wrong with KZM9G in DT-only mode.
Can you guide me to reproduce off-list?
Thanks,
/ magnus
^ permalink raw reply
* Re: [PATCH/RFC v2 3/8] ARM: shmobile: SDHI and MMCIF interfaces to kzm9g-reference
From: Simon Horman @ 2013-02-13 4:01 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-4-git-send-email-g.liakhovetski@gmx.de>
On Fri, Feb 08, 2013 at 07:38:27PM +0100, Guennadi Liakhovetski wrote:
> Add SDHI0 and SDHI2 interfaces to kzm9g-reference. With no pinctrl DT
> support we cannot use GPIO card-detection and regulator switching.
> Also update the MMCIF DT node to use all 8 data lines and avoid
> redundant information in DT.
This seems reasonable to me and I have added it to the
boards-kzm9g-reference branch which is targeted at v3.10.
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> NOTE: With no DT pinctrl support this is very limited - no GPIO card
> detection, no dynamically switchable regulators. But after all the
> patching this brings interfaces up.
>
> NOTE 2: I'm not sure the way MMCIF is added to .dtsi and then extended
> here is a very good idea. Not all sh73a0 boards will want MMCIF, actually,
> same holds for I2C. I see some examples, where device DT node templates
> are provided in .dtsi with a 'status="disabled"' property. Then, if a
> board wants to use that template it patches it with 'status="okay".'
> However, what also confuses me, they don't use the '&' "patching" symbol.
> E.g. see "sdi0_per1@80126000" node in snowball.dts and its template in
> dbx5x0.dtsi.
I'm unsure too.
It was my understanding that I2C and MMCIF are part of the SoC and
thus should logically go in the SOC's dtsi file.
Do we actually have any sh73a0 boards that don't use I2C or MMCIF?
If not perhaps its a problem for another day.
> v2:
> 1. renamed regulators to match armadillo800eva
> 2. changed SDHI0/2 Vcc supply to 2.8V to match the original OCR mask from
> board-kzm9g.c. Schematics suggests it's actually 3.3V. No idea which is
> correct.
> 3. added "always-on" and "boot-on" regulator properties
> 4. fixed identical regulator node names
> 5. added a "bus-width" property to MMCIF to avoid running in 1-bit mode
> 6. removed unused CD IRQ on SDHI2
> 7. removed the optional vqmmc-supply on MMCIF - it isn't needed, if
> identical to vmmc-supply
>
> arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 42 ++++++++++++++++++++++--
> arch/arm/mach-shmobile/board-kzm9g-reference.c | 21 ++++++++++++
> 2 files changed, 60 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> index 06f52f9..7fad4b9 100644
> --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> @@ -27,15 +27,51 @@
> reg = <0x41000000 0x1e800000>;
> };
>
> - fixedregulator1v8: fixedregulator@0 {
> + reg_1p8v: regulator@0 {
> compatible = "regulator-fixed";
> regulator-name = "fixed-1.8V";
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + reg_2p8v: regulator@1 {
> + compatible = "regulator-fixed";
> + regulator-name = "fixed-2.8V";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + sdhi0: sdhi@0xee100000 {
> + compatible = "renesas,shmobile-sdhi";
> + reg = <0xee100000 0x100>;
> + interrupt-parent = <&gic>;
> + interrupts = <0 83 4
> + 0 84 4
> + 0 85 4>;
> + vmmc-supply = <®_2p8v>;
> + bus-width = <4>;
> + toshiba,mmc-has-idle-wait;
> + };
> +
> + sdhi2: sdhi@0xee140000 {
> + compatible = "renesas,shmobile-sdhi";
> + reg = <0xee140000 0x100>;
> + interrupt-parent = <&gic>;
> + interrupts = <0 104 4
> + 0 105 4>;
> + vmmc-supply = <®_2p8v>;
> + bus-width = <4>;
> + broken-cd;
> + toshiba,mmc-wrprotect-disable;
> + toshiba,mmc-has-idle-wait;
> };
> };
>
> &mmcif {
> - vmmc-supply = <&fixedregulator1v8>;
> - vqmmc-supply = <&fixedregulator1v8>;
> + bus-width = <8>;
> + vmmc-supply = <®_1p8v>;
> };
> diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> index 6a1222e..534eee6 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> @@ -52,6 +52,27 @@ static void __init kzm_init(void)
> gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
> gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
>
> + /* enable SD */
> + gpio_request(GPIO_FN_SDHIWP0, NULL);
> + gpio_request(GPIO_FN_SDHICD0, NULL);
> + gpio_request(GPIO_FN_SDHICMD0, NULL);
> + gpio_request(GPIO_FN_SDHICLK0, NULL);
> + gpio_request(GPIO_FN_SDHID0_3, NULL);
> + gpio_request(GPIO_FN_SDHID0_2, NULL);
> + gpio_request(GPIO_FN_SDHID0_1, NULL);
> + gpio_request(GPIO_FN_SDHID0_0, NULL);
> + gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
> + gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
> +
> + /* enable Micro SD */
> + gpio_request(GPIO_FN_SDHID2_0, NULL);
> + gpio_request(GPIO_FN_SDHID2_1, NULL);
> + gpio_request(GPIO_FN_SDHID2_2, NULL);
> + gpio_request(GPIO_FN_SDHID2_3, NULL);
> + gpio_request(GPIO_FN_SDHICMD2, NULL);
> + gpio_request(GPIO_FN_SDHICLK2, NULL);
> + gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
> +
> /* I2C 3 */
> gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL);
> gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL);
> --
> 1.7.2.5
>
^ permalink raw reply
* Re: [PATCH/RFC v2 6/8] ARM: shmobile: add INTC interrupt controllers on sh73a0 in the DT case
From: Simon Horman @ 2013-02-13 3:57 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-7-git-send-email-g.liakhovetski@gmx.de>
On Wed, Feb 13, 2013 at 12:41:51PM +0900, Simon Horman wrote:
> On Fri, Feb 08, 2013 at 07:38:30PM +0100, Guennadi Liakhovetski wrote:
> > Temporary solution to enable INTC controllers on sh73a0 with DT.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >
> > Ths should probably be considered a hack / debug patch - until we get
> > proper INTC support in DT on sh73a0. But it was useful for me to get
> > ethernet running on kzm9g-reference.
>
> I will create a topic/kzm9g-reference-rfc branch for this and
> other patches that don't seem ready for kzm9g-reference-rfc.
Actually, on second thoughts, I think I would rather leave this
patch as a hack that lives on the mailing list.
> > arch/arm/mach-shmobile/board-kzm9g-reference.c | 2 +-
> > arch/arm/mach-shmobile/include/mach/common.h | 1 +
> > arch/arm/mach-shmobile/intc-sh73a0.c | 24 ++++++++++++++++++------
> > 3 files changed, 20 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > index 9f5cab757..8280d8a 100644
> > --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> > @@ -109,7 +109,7 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
> > .map_io = sh73a0_map_io,
> > .init_early = sh73a0_add_early_devices_dt,
> > .nr_irqs = NR_IRQS_LEGACY,
> > - .init_irq = sh73a0_init_irq_dt,
> > + .init_irq = sh73a0_init_irq_intc_dt,
> > .init_machine = kzm_init,
> > .init_late = shmobile_init_late,
> > .init_time = sh73a0_earlytimer_init,
> > diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
> > index 16dab18..3bd8873 100644
> > --- a/arch/arm/mach-shmobile/include/mach/common.h
> > +++ b/arch/arm/mach-shmobile/include/mach/common.h
> > @@ -36,6 +36,7 @@ extern struct clk sh7372_extal2_clk;
> >
> > extern void sh73a0_init_irq(void);
> > extern void sh73a0_init_irq_dt(void);
> > +void __init sh73a0_init_irq_intc_dt(void);
> > extern void sh73a0_map_io(void);
> > extern void sh73a0_earlytimer_init(void);
> > extern void sh73a0_add_early_devices(void);
> > diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
> > index 91faba6..209c597 100644
> > --- a/arch/arm/mach-shmobile/intc-sh73a0.c
> > +++ b/arch/arm/mach-shmobile/intc-sh73a0.c
> > @@ -417,16 +417,11 @@ static irqreturn_t sh73a0_pint1_demux(int irq, void *dev_id)
> > return IRQ_HANDLED;
> > }
> >
> > -void __init sh73a0_init_irq(void)
> > +static void __init __sh73a0_init_irq(void)
> > {
> > - void __iomem *gic_dist_base = IOMEM(0xf0001000);
> > - void __iomem *gic_cpu_base = IOMEM(0xf0000100);
> > void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE);
> > int k, n;
> >
> > - gic_init(0, 29, gic_dist_base, gic_cpu_base);
> > - gic_arch_extn.irq_set_wake = sh73a0_set_wake;
> > -
> > register_intc_controller(&intcs_desc);
> > register_intc_controller(&intca_irq_pins_desc);
> > register_intc_controller(&intc_pint0_desc);
> > @@ -461,10 +456,27 @@ void __init sh73a0_init_irq(void)
> > setup_irq(gic_spi(34), &sh73a0_pint1_cascade);
> > }
> >
> > +void __init sh73a0_init_irq(void)
> > +{
> > + void __iomem *gic_dist_base = IOMEM(0xf0001000);
> > + void __iomem *gic_cpu_base = IOMEM(0xf0000100);
> > +
> > + gic_init(0, 29, gic_dist_base, gic_cpu_base);
> > + gic_arch_extn.irq_set_wake = sh73a0_set_wake;
> > +
> > + __sh73a0_init_irq();
> > +}
> > +
> > #ifdef CONFIG_OF
> > void __init sh73a0_init_irq_dt(void)
> > {
> > irqchip_init();
> > gic_arch_extn.irq_set_wake = sh73a0_set_wake;
> > }
> > +
> > +void __init sh73a0_init_irq_intc_dt(void)
> > +{
> > + sh73a0_init_irq_dt();
> > + __sh73a0_init_irq();
> > +}
> > #endif
> > --
> > 1.7.2.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH v2 5/8] ARM: shmobile: add sh73a0-specific timer initialisation to kzm9g-reference
From: Simon Horman @ 2013-02-13 3:46 UTC (permalink / raw)
To: linux-sh
In-Reply-To: <1360348712-29255-6-git-send-email-g.liakhovetski@gmx.de>
On Fri, Feb 08, 2013 at 07:38:29PM +0100, Guennadi Liakhovetski wrote:
> This patch fixes failing boot of the kzm9g-reference kernel.
Magnus specifically asked for the DT reference code not to use
early timers.
As you have no doubt observed the current code doesn't work with SMP.
I have not been able to find a solution that does work with CONFIG_SMP
enabled without using early timers. I would welcome some ideas
on how to resolve this problem without using early timers.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> Also a fix.
>
> arch/arm/mach-shmobile/board-kzm9g-reference.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> index 534eee6..9f5cab757 100644
> --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
> +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
> @@ -112,7 +112,7 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
> .init_irq = sh73a0_init_irq_dt,
> .init_machine = kzm_init,
> .init_late = shmobile_init_late,
> - .init_time = shmobile_timer_init,
> + .init_time = sh73a0_earlytimer_init,
> .restart = kzm9g_restart,
> .dt_compat = kzm9g_boards_compat_dt,
> MACHINE_END
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox