Re: [PATCH] sh: sh7757: switch RSPI clock to dev ID match
Hi Geert-san, (2014/02/07 21:45), Geert Uytterhoeven wrote: > On Sun, Jan 12, 2014 at 11:30 AM, Geert Uytterhoeven > wrote: >> From: Geert Uytterhoeven >> >> Switch the RSPI MSTP clock on SH7757 from a con ID match to a dev ID >> match, so we can start looking it up using clk_get() with a NULL ID. >> >> Signed-off-by: Geert Uytterhoeven >> --- >> Untested, as I don't have the hardware, but this is a prerequisite for >> "spi: rspi: Use NULL as the clock ID". > > Is there anyone who can test this? > > "spi: rspi: Use NULL as the clock ID" is queued for v3.15: > https://git.kernel.org/cgit/linux/kernel/git/broonie/spi.git/commit/drivers/spi/spi-rspi.c?h=for-next=29f397b739ceef90c8b848f6579cbacd088e896e > and this patch should go in first. > > Thanks! > >> arch/sh/kernel/cpu/sh4a/clock-sh7757.c |2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c >> b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c >> index e84a43229b9c..5c0e3c335161 100644 >> --- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c >> +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c >> @@ -132,7 +132,7 @@ static struct clk_lookup lookups[] = { >> CLKDEV_CON_ID("usb_fck", _clks[MSTP103]), >> CLKDEV_DEV_ID("renesas_usbhs.0", _clks[MSTP102]), >> CLKDEV_CON_ID("mmc0", _clks[MSTP220]), >> - CLKDEV_CON_ID("rspi2", _clks[MSTP127]), >> + CLKDEV_DEV_ID("rspi.2", _clks[MSTP127]), >> }; >> >> int __init arch_clk_init(void) I could test this patch. And then, the patch worked correctly. Best regards, Yoshihiro Shimoda > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > ge...@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like > that. > -- Linus Torvalds > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] sh: sh7757: switch RSPI clock to dev ID match
Hi Geert-san, (2014/02/07 21:45), Geert Uytterhoeven wrote: On Sun, Jan 12, 2014 at 11:30 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: From: Geert Uytterhoeven geert+rene...@linux-m68k.org Switch the RSPI MSTP clock on SH7757 from a con ID match to a dev ID match, so we can start looking it up using clk_get() with a NULL ID. Signed-off-by: Geert Uytterhoeven geert+rene...@linux-m68k.org --- Untested, as I don't have the hardware, but this is a prerequisite for spi: rspi: Use NULL as the clock ID. Is there anyone who can test this? spi: rspi: Use NULL as the clock ID is queued for v3.15: https://git.kernel.org/cgit/linux/kernel/git/broonie/spi.git/commit/drivers/spi/spi-rspi.c?h=for-nextid=29f397b739ceef90c8b848f6579cbacd088e896e and this patch should go in first. Thanks! arch/sh/kernel/cpu/sh4a/clock-sh7757.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c index e84a43229b9c..5c0e3c335161 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c @@ -132,7 +132,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID(usb_fck, mstp_clks[MSTP103]), CLKDEV_DEV_ID(renesas_usbhs.0, mstp_clks[MSTP102]), CLKDEV_CON_ID(mmc0, mstp_clks[MSTP220]), - CLKDEV_CON_ID(rspi2, mstp_clks[MSTP127]), + CLKDEV_DEV_ID(rspi.2, mstp_clks[MSTP127]), }; int __init arch_clk_init(void) I could test this patch. And then, the patch worked correctly. Best regards, Yoshihiro Shimoda Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: rspi: fix build error when CONFIG_OF is not set
Hi Geert-san, (2014/02/03 17:47), Geert Uytterhoeven wrote: > Hi Shimoda-san, > > On Mon, 3 Feb 2014, Shimoda, Yoshihiro wrote: >> This patch fixes an issue that the following build error happens when >> the CONFIG_OF is not set: >> >> drivers/spi/spi-rspi.c: In function 'rspi_probe': >> drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use >> in this function) >> >> Signed-off-by: Yoshihiro Shimoda >> --- >> This patch is based on the latest origin/topic/rspi branch in the spi.git. >> >> drivers/spi/spi-rspi.c |1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c >> index 34ad4bc..e5cfc3d 100644 >> --- a/drivers/spi/spi-rspi.c >> +++ b/drivers/spi/spi-rspi.c >> @@ -1164,6 +1164,7 @@ static int rspi_parse_dt(struct device *dev, struct >> spi_master *master) >> return 0; >> } >> #else >> +#define rspi_of_match NULL >> static inline int rspi_parse_dt(struct device *dev, struct spi_master >> *master) >> { >> return -EINVAL; >> -- >> 1.7.1 > > Thanks, obviously I missed that of_match_device() still uses the ID table > parameter if CONFIG_OF=n :-( > > Below I have two alternative solutions: > 1. Uses rspi_of_match() to nullify the ID table pointer, like is done in > the platform_driver structure, > 2. Fixes it at the OF subsystem level, by nullifying the ID table pointer > inside of_match_device(). > > If 2 is accepted, drivers don't have to care about this anymore. > > What do you think? Thank you for the reply. I think the 2nd one is a nice idea. If I applied it without my patch, the build error disappeared. Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: rspi: fix build error when CONFIG_OF is not set
Hi Geert-san, (2014/02/03 17:47), Geert Uytterhoeven wrote: Hi Shimoda-san, On Mon, 3 Feb 2014, Shimoda, Yoshihiro wrote: This patch fixes an issue that the following build error happens when the CONFIG_OF is not set: drivers/spi/spi-rspi.c: In function 'rspi_probe': drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use in this function) Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com --- This patch is based on the latest origin/topic/rspi branch in the spi.git. drivers/spi/spi-rspi.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 34ad4bc..e5cfc3d 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1164,6 +1164,7 @@ static int rspi_parse_dt(struct device *dev, struct spi_master *master) return 0; } #else +#define rspi_of_match NULL static inline int rspi_parse_dt(struct device *dev, struct spi_master *master) { return -EINVAL; -- 1.7.1 Thanks, obviously I missed that of_match_device() still uses the ID table parameter if CONFIG_OF=n :-( Below I have two alternative solutions: 1. Uses rspi_of_match() to nullify the ID table pointer, like is done in the platform_driver structure, 2. Fixes it at the OF subsystem level, by nullifying the ID table pointer inside of_match_device(). If 2 is accepted, drivers don't have to care about this anymore. What do you think? Thank you for the reply. I think the 2nd one is a nice idea. If I applied it without my patch, the build error disappeared. Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] usb: gadget: r8a66597-udc: do not unlock unheld spinlock in r8a66597_sudmac_irq()
Hi, (2013/05/30 8:58), Felipe Balbi wrote: > HI, > > On Thu, May 30, 2013 at 12:51:37AM +0400, Alexey Khoroshilov wrote: >> r8a66597_irq() processes sudmac part (r8a66597_sudmac_irq()) before locking >> r8a66597->lock. >> But transfer_complete(), that is called inside >> (r8a66597_sudmac_irq()->sudmac_finish()->transfer_complete()), >> expects r8a66597->lock is locked. As a result unheld spinlock can be >> unlocked. >> >> The patch just moves locking before calling r8a66597_sudmac_irq(). >> >> Found by Linux Driver Verification project (linuxtesting.org). >> >> Signed-off-by: Alexey Khoroshilov > > should this go to stable ? Looks like this bug has been there since > 2.6.32. > Because non SMP CPUs have sudmac for now, this may not go to stable, I think. Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] usb: gadget: r8a66597-udc: do not unlock unheld spinlock in r8a66597_sudmac_irq()
Hi, (2013/05/30 8:58), Felipe Balbi wrote: HI, On Thu, May 30, 2013 at 12:51:37AM +0400, Alexey Khoroshilov wrote: r8a66597_irq() processes sudmac part (r8a66597_sudmac_irq()) before locking r8a66597-lock. But transfer_complete(), that is called inside (r8a66597_sudmac_irq()-sudmac_finish()-transfer_complete()), expects r8a66597-lock is locked. As a result unheld spinlock can be unlocked. The patch just moves locking before calling r8a66597_sudmac_irq(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru should this go to stable ? Looks like this bug has been there since 2.6.32. Because non SMP CPUs have sudmac for now, this may not go to stable, I think. Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: dma: sh: sudmac: use devm_ioremap_resource()
Hi, (2013/05/14 20:35), Laurent Navet wrote: > Replace a call to deprecated devm_request_and_ioremap by > devm_ioremap_resource. > Found with coccicheck and this semantic patch: > scripts/coccinelle/api/devm_ioremap_resource.cocci > > Signed-off-by: Laurent Navet > --- > drivers/dma/sh/sudmac.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Thank you for the patch. Acked-by: Yoshihiro Shimoda Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: dma: sh: sudmac: use devm_ioremap_resource()
Hi, (2013/05/14 20:35), Laurent Navet wrote: Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_ioremap_resource.cocci Signed-off-by: Laurent Navet laurent.na...@gmail.com --- drivers/dma/sh/sudmac.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Thank you for the patch. Acked-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com Best regards, Yoshihiro Shimoda -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/