linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support
@ 2010-05-13  1:07 Kuninori Morimoto
  2010-05-20  3:15 ` Paul Mundt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2010-05-13  1:07 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-g3evm.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index 9247503..19b3bf3 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -38,6 +38,14 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+/*
+ * IrDA
+ *
+ * S67: 5bit : ON  power
+ *    : 6bit : ON  remote control
+ *             OFF IrDA
+ */
+
 static struct mtd_partition nor_flash_partitions[] = {
 	{
 		.name		= "loader",
@@ -209,11 +217,30 @@ static struct platform_device nand_flash_device = {
 	},
 };
 
+static struct resource irda_resources[] = {
+	[0] = {
+		.start	= 0xE6D00000,
+		.end	= 0xE6D01FD4 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = 20,
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device irda_device = {
+	.name		= "sh_irda",
+	.resource	= irda_resources,
+	.num_resources	= ARRAY_SIZE(irda_resources),
+};
+
 static struct platform_device *g3evm_devices[] __initdata = {
 	&nor_flash_device,
 	&usb_host_device,
 	&keysc_device,
 	&nand_flash_device,
+	&irda_device,
 };
 
 static struct map_desc g3evm_io_desc[] __initdata = {
@@ -318,6 +345,12 @@ static void __init g3evm_init(void)
 	/* FOE, FCDE, FSC on dedicated pins */
 	__raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048);
 
+	/* IrDA */
+	gpio_request(GPIO_FN_IRDA_OUT, NULL);
+	gpio_request(GPIO_FN_IRDA_IN, NULL);
+	gpio_request(GPIO_FN_IRDA_FIRSEL, NULL);
+	set_irq_type(20, IRQ_TYPE_LEVEL_LOW);
+
 	sh7367_add_standard_devices();
 
 	platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices));
-- 
1.7.0.4


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

* Re: [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support
  2010-05-13  1:07 [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support Kuninori Morimoto
@ 2010-05-20  3:15 ` Paul Mundt
  2010-05-20  3:46 ` Paul Mundt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2010-05-20  3:15 UTC (permalink / raw)
  To: linux-sh

On Thu, May 13, 2010 at 10:07:54AM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-g3evm.c |   33 +++++++++++++++++++++++++++++++++
>  1 files changed, 33 insertions(+), 0 deletions(-)
> 
Applied, thanks.

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

* Re: [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support
  2010-05-13  1:07 [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support Kuninori Morimoto
  2010-05-20  3:15 ` Paul Mundt
@ 2010-05-20  3:46 ` Paul Mundt
  2010-05-21  1:27 ` Kuninori Morimoto
  2010-05-21  1:30 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2010-05-20  3:46 UTC (permalink / raw)
  To: linux-sh

On Thu, May 13, 2010 at 10:07:54AM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-g3evm.c |   33 +++++++++++++++++++++++++++++++++
>  1 files changed, 33 insertions(+), 0 deletions(-)
> 
It should be noted that sh_sir presently is only built for SH and not
ARCH_SHMOBILE. Adding ARCH_SHMOBILE blocks up on the asm/clock.h include
and shows that the driver itself is using deprecated clock lookups. While
none of this matters for the platform device data, you'll still need to
post a patch that tidies up the sh_sir driver and allows us to enable it
for the ARCH_SHMOBILE case.

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

* Re: [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support
  2010-05-13  1:07 [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support Kuninori Morimoto
  2010-05-20  3:15 ` Paul Mundt
  2010-05-20  3:46 ` Paul Mundt
@ 2010-05-21  1:27 ` Kuninori Morimoto
  2010-05-21  1:30 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2010-05-21  1:27 UTC (permalink / raw)
  To: linux-sh


Dear Paul

Thank you for advice

> It should be noted that sh_sir presently is only built for SH and not
> ARCH_SHMOBILE. Adding ARCH_SHMOBILE blocks up on the asm/clock.h include
> and shows that the driver itself is using deprecated clock lookups. While
> none of this matters for the platform device data, you'll still need to
> post a patch that tidies up the sh_sir driver and allows us to enable it
> for the ARCH_SHMOBILE case.

Thanks. I will check it.
But there are 2 IrDA driver.
sh_sir / sh_irda

sh_sir  is used from SuperH chip (ex SH7724...).
sh_irda is used from SuperH ARM (ex g3)

and sh_irda is in linux-next / net-next now

Best regards
--
Kuninori Morimoto
 

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

* Re: [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support
  2010-05-13  1:07 [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2010-05-21  1:27 ` Kuninori Morimoto
@ 2010-05-21  1:30 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2010-05-21  1:30 UTC (permalink / raw)
  To: linux-sh

On Fri, May 21, 2010 at 10:27:41AM +0900, Kuninori Morimoto wrote:
> 
> Dear Paul
> 
> Thank you for advice
> 
> > It should be noted that sh_sir presently is only built for SH and not
> > ARCH_SHMOBILE. Adding ARCH_SHMOBILE blocks up on the asm/clock.h include
> > and shows that the driver itself is using deprecated clock lookups. While
> > none of this matters for the platform device data, you'll still need to
> > post a patch that tidies up the sh_sir driver and allows us to enable it
> > for the ARCH_SHMOBILE case.
> 
> Thanks. I will check it.
> But there are 2 IrDA driver.
> sh_sir / sh_irda
> 
> sh_sir  is used from SuperH chip (ex SH7724...).
> sh_irda is used from SuperH ARM (ex g3)
> 
> and sh_irda is in linux-next / net-next now
> 
Ah, ok, I missed that part. I'll wait for sh_irda to catch up then,
thanks.

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

end of thread, other threads:[~2010-05-21  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13  1:07 [PATCH] ARM: mach-shmobile: g3evm: Add IrDA support Kuninori Morimoto
2010-05-20  3:15 ` Paul Mundt
2010-05-20  3:46 ` Paul Mundt
2010-05-21  1:27 ` Kuninori Morimoto
2010-05-21  1:30 ` Paul Mundt

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