* [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources
@ 2010-11-29 2:10 Kuninori Morimoto
2010-11-29 4:01 ` Paul Mundt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2010-11-29 2:10 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ag5evm.c | 41 +++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 7336a00..d4c82bd 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -33,6 +33,8 @@
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
+#include <sound/sh_fsi.h>
+
#include <mach/hardware.h>
#include <mach/sh73a0.h>
#include <mach/common.h>
@@ -113,9 +115,41 @@ static struct platform_device keysc_device = {
},
};
+/* FSI A */
+static struct sh_fsi_platform_info fsi_info = {
+ .porta_flags = SH_FSI_OUT_SLAVE_MODE |
+ SH_FSI_IN_SLAVE_MODE |
+ SH_FSI_OFMT(I2S) |
+ SH_FSI_IFMT(I2S),
+};
+
+static struct resource fsi_resources[] = {
+ [0] = {
+ .name = "FSI",
+ .start = 0xEC230000,
+ .end = 0xEC230400 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(146),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device fsi_device = {
+ .name = "sh_fsi2",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(fsi_resources),
+ .resource = fsi_resources,
+ .dev = {
+ .platform_data = &fsi_info,
+ },
+};
+
static struct platform_device *ag5evm_devices[] __initdata = {
ð_device,
&keysc_device,
+ &fsi_device,
};
static struct map_desc ag5evm_io_desc[] __initdata = {
@@ -195,6 +229,13 @@ static void __init ag5evm_init(void)
gpio_request(GPIO_PORT145, NULL); /* RESET */
gpio_direction_output(GPIO_PORT145, 1);
+ /* FSI A */
+ gpio_request(GPIO_FN_FSIACK, NULL);
+ gpio_request(GPIO_FN_FSIAILR, NULL);
+ gpio_request(GPIO_FN_FSIAIBT, NULL);
+ gpio_request(GPIO_FN_FSIAISLD, NULL);
+ gpio_request(GPIO_FN_FSIAOSLD, NULL);
+
#ifdef CONFIG_CACHE_L2X0
/* Shared attribute override enable, 64K*8way */
l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources
2010-11-29 2:10 [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources Kuninori Morimoto
@ 2010-11-29 4:01 ` Paul Mundt
2011-01-14 7:39 ` [PATCH] ARM: mach-shmobile: ag5evm: Add IrDA support Kuninori Morimoto
2011-01-14 10:57 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2010-11-29 4:01 UTC (permalink / raw)
To: linux-sh
On Mon, Nov 29, 2010 at 11:10:08AM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/board-ag5evm.c | 41 +++++++++++++++++++++++++++++++++
> 1 files changed, 41 insertions(+), 0 deletions(-)
>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: mach-shmobile: ag5evm: Add IrDA support
2010-11-29 2:10 [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources Kuninori Morimoto
2010-11-29 4:01 ` Paul Mundt
@ 2011-01-14 7:39 ` Kuninori Morimoto
2011-01-14 10:57 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2011-01-14 7:39 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ag5evm.c | 28 ++++++++++++++++++++++++++++
arch/arm/mach-shmobile/clock-sh73a0.c | 4 +++-
2 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 2f13592..b416c08 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -183,11 +183,33 @@ static struct platform_device mmc_device = {
.resource = sh_mmcif_resources,
};
+/* IrDA */
+#define IRQ_IRDA gic_spi(95)
+static struct resource irda_resources[] = {
+ [0] = {
+ .start = 0xE6D00000,
+ .end = 0xE6D01FD4 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_IRDA,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device irda_device = {
+ .name = "sh_irda",
+ .id = 0,
+ .resource = irda_resources,
+ .num_resources = ARRAY_SIZE(irda_resources),
+};
+
static struct platform_device *ag5evm_devices[] __initdata = {
ð_device,
&keysc_device,
&fsi_device,
&mmc_device,
+ &irda_device,
};
static struct map_desc ag5evm_io_desc[] __initdata = {
@@ -287,6 +309,12 @@ static void __init ag5evm_init(void)
gpio_request(GPIO_FN_FSIAISLD, NULL);
gpio_request(GPIO_FN_FSIAOSLD, NULL);
+ /* IrDA */
+ gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL);
+ gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL);
+ gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
+ set_irq_type(IRQ_IRDA, IRQ_TYPE_LEVEL_LOW);
+
#ifdef CONFIG_CACHE_L2X0
/* Shared attribute override enable, 64K*8way */
l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 4195818..d9d6d02 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -258,7 +258,7 @@ enum { MSTP001,
MSTP125, MSTP116,
MSTP219,
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
- MSTP331, MSTP329, MSTP323, MSTP312,
+ MSTP331, MSTP329, MSTP325, MSTP323, MSTP312,
MSTP411, MSTP410, MSTP403,
MSTP_NR };
@@ -279,6 +279,7 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */
[MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */
[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
+ [MSTP325] = MSTP(&div4_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */
[MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */
[MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */
[MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */
@@ -308,6 +309,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
+ CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */
CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: ag5evm: Add IrDA support
2010-11-29 2:10 [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources Kuninori Morimoto
2010-11-29 4:01 ` Paul Mundt
2011-01-14 7:39 ` [PATCH] ARM: mach-shmobile: ag5evm: Add IrDA support Kuninori Morimoto
@ 2011-01-14 10:57 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2011-01-14 10:57 UTC (permalink / raw)
To: linux-sh
Dear Paul
> + /* IrDA */
> + gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL);
> + gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL);
> + gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
> + set_irq_type(IRQ_IRDA, IRQ_TYPE_LEVEL_LOW);
This set_irq_type is not needed for now.
I will send v2 patch soon.
Thank you Magnus for your advice.
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-14 10:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-29 2:10 [PATCH] ARM: mach-shmobile: ag5evm: Add FSI resources Kuninori Morimoto
2010-11-29 4:01 ` Paul Mundt
2011-01-14 7:39 ` [PATCH] ARM: mach-shmobile: ag5evm: Add IrDA support Kuninori Morimoto
2011-01-14 10:57 ` Kuninori Morimoto
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).