* [PATCH 03/11] ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 04/11] ARM: shmobile: sh73a0: " Simon Horman
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Bastian Hecht <hechtb@googlemail.com>
We can remove the extra code of modify_scu_cpu_psr() and use the cleaner
generic ARM helper scu_power_mode(). As every CPU only deals with its
own power register and scu_power_mode() operates with 8-bit accesses,
we save the locking overhead too.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/smp-emev2.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index f674562..535426c 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -32,24 +32,8 @@
#define EMEV2_SCU_BASE 0x1e000000
-static DEFINE_SPINLOCK(scu_lock);
static void __iomem *scu_base;
-static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
-{
- unsigned long tmp;
-
- /* we assume this code is running on a different cpu
- * than the one that is changing coherency setting */
- spin_lock(&scu_lock);
- tmp = readl(scu_base + 8);
- tmp &= ~clr;
- tmp |= set;
- writel(tmp, scu_base + 8);
- spin_unlock(&scu_lock);
-
-}
-
static unsigned int __init emev2_get_core_count(void)
{
if (!scu_base) {
@@ -95,7 +79,7 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *
cpu = cpu_logical_map(cpu);
/* enable cache coherency */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base, 0);
/* Tell ROM loader about our vector (in headsmp.S) */
emev2_set_boot_vector(__pa(shmobile_secondary_vector));
@@ -106,12 +90,10 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *
static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
{
- int cpu = cpu_logical_map(0);
-
scu_enable(scu_base);
/* enable cache coherency on CPU0 */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base, 0);
}
static void __init emev2_smp_init_cpus(void)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 04/11] ARM: shmobile: sh73a0: Replace modify_scu_cpu_psr with scu_power_mode
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
2012-11-01 0:41 ` [PATCH 03/11] ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 05/11] ARM: shmobile: r8a7779: " Simon Horman
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Bastian Hecht <hechtb@googlemail.com>
We can remove the extra code of modify_scu_cpu_psr() and use the cleaner
generic ARM helper scu_power_mode(). As every CPU only deals with its
own power register and scu_power_mode() operates with 8-bit accesses,
we save the locking overhead too.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/smp-sh73a0.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 624f00f..96ddb97 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -41,9 +41,6 @@ static void __iomem *scu_base_addr(void)
return (void __iomem *)0xf0000000;
}
-static DEFINE_SPINLOCK(scu_lock);
-static unsigned long tmp;
-
#ifdef CONFIG_HAVE_ARM_TWD
static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29);
void __init sh73a0_register_twd(void)
@@ -52,20 +49,6 @@ void __init sh73a0_register_twd(void)
}
#endif
-static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
-{
- void __iomem *scu_base = scu_base_addr();
-
- spin_lock(&scu_lock);
- tmp = __raw_readl(scu_base + 8);
- tmp &= ~clr;
- tmp |= set;
- spin_unlock(&scu_lock);
-
- /* disable cache coherency after releasing the lock */
- __raw_writel(tmp, scu_base + 8);
-}
-
static unsigned int __init sh73a0_get_core_count(void)
{
void __iomem *scu_base = scu_base_addr();
@@ -83,7 +66,7 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct
cpu = cpu_logical_map(cpu);
/* enable cache coherency */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base_addr(), 0);
if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) = 3)
__raw_writel(1 << cpu, WUPCR); /* wake up */
@@ -95,8 +78,6 @@ static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct
static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
{
- int cpu = cpu_logical_map(0);
-
scu_enable(scu_base_addr());
/* Map the reset vector (in headsmp.S) */
@@ -104,7 +85,7 @@ static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
__raw_writel(__pa(shmobile_secondary_vector), SBAR);
/* enable cache coherency on CPU0 */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base_addr(), 0);
}
static void __init sh73a0_smp_init_cpus(void)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 05/11] ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
2012-11-01 0:41 ` [PATCH 03/11] ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode Simon Horman
2012-11-01 0:41 ` [PATCH 04/11] ARM: shmobile: sh73a0: " Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 06/11] ARM: shmobile: r8a7740: fixup DT machine desc name typo Simon Horman
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Bastian Hecht <hechtb@googlemail.com>
We can remove the extra code of modify_scu_cpu_psr() and use the cleaner
generic ARM helper scu_power_mode(). As every CPU only deals with its
own power register and scu_power_mode() operates with 8-bit accesses,
we save the locking overhead too.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/smp-r8a7779.c | 25 +++----------------------
1 file changed, 3 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 2ce6af9..9def0f2 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -61,9 +61,6 @@ static void __iomem *scu_base_addr(void)
return (void __iomem *)0xf0000000;
}
-static DEFINE_SPINLOCK(scu_lock);
-static unsigned long tmp;
-
#ifdef CONFIG_HAVE_ARM_TWD
static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29);
@@ -73,20 +70,6 @@ void __init r8a7779_register_twd(void)
}
#endif
-static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
-{
- void __iomem *scu_base = scu_base_addr();
-
- spin_lock(&scu_lock);
- tmp = __raw_readl(scu_base + 8);
- tmp &= ~clr;
- tmp |= set;
- spin_unlock(&scu_lock);
-
- /* disable cache coherency after releasing the lock */
- __raw_writel(tmp, scu_base + 8);
-}
-
static unsigned int __init r8a7779_get_core_count(void)
{
void __iomem *scu_base = scu_base_addr();
@@ -102,7 +85,7 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu)
cpu = cpu_logical_map(cpu);
/* disable cache coherency */
- modify_scu_cpu_psr(3 << (cpu * 8), 0);
+ scu_power_mode(scu_base_addr(), 3);
if (cpu < ARRAY_SIZE(r8a7779_ch_cpu))
ch = r8a7779_ch_cpu[cpu];
@@ -145,7 +128,7 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct
cpu = cpu_logical_map(cpu);
/* enable cache coherency */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base_addr(), 0);
if (cpu < ARRAY_SIZE(r8a7779_ch_cpu))
ch = r8a7779_ch_cpu[cpu];
@@ -158,15 +141,13 @@ static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct
static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
{
- int cpu = cpu_logical_map(0);
-
scu_enable(scu_base_addr());
/* Map the reset vector (in headsmp.S) */
__raw_writel(__pa(shmobile_secondary_vector), AVECR);
/* enable cache coherency on CPU0 */
- modify_scu_cpu_psr(0, 3 << (cpu * 8));
+ scu_power_mode(scu_base_addr(), 0);
r8a7779_pm_init();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 06/11] ARM: shmobile: r8a7740: fixup DT machine desc name typo
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (2 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 05/11] ARM: shmobile: r8a7779: " Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 07/11] ARM: shmobile: r8a7779: add HSPI clock support Simon Horman
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
r8a7740 machine desc name should be R8A7740,
not SH7372
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 11bb1d9..9777e2d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -747,7 +747,7 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
NULL,
};
-DT_MACHINE_START(SH7372_DT, "Generic R8A7740 (Flattened Device Tree)")
+DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
.map_io = r8a7740_map_io,
.init_early = r8a7740_add_early_devices_dt,
.init_irq = r8a7740_init_irq,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 07/11] ARM: shmobile: r8a7779: add HSPI clock support
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (3 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 06/11] ARM: shmobile: r8a7740: fixup DT machine desc name typo Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 08/11] ARM: shmobile: r8a7779: add I2C " Simon Horman
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7779.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 3cafb6a..90d717b 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -89,6 +89,7 @@ static struct clk div4_clks[DIV4_NR] = {
enum { MSTP323, MSTP322, MSTP321, MSTP320,
MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
MSTP016, MSTP015, MSTP014,
+ MSTP007,
MSTP_NR };
static struct clk mstp_clks[MSTP_NR] = {
@@ -105,6 +106,7 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP016] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 16, 0), /* TMU0 */
[MSTP015] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 15, 0), /* TMU1 */
[MSTP014] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 14, 0), /* TMU2 */
+ [MSTP007] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR0, 7, 0), /* HSPI */
};
static unsigned long mul4_recalc(struct clk *clk)
@@ -154,6 +156,9 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
+ CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
+ CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
+ CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 08/11] ARM: shmobile: r8a7779: add I2C clock support
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (4 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 07/11] ARM: shmobile: r8a7779: add HSPI clock support Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 09/11] ARM: shmobile: r8a7779: add I2C driver support Simon Horman
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
This patch is required from R-Car I2C driver
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 90d717b..24f5a84 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -87,7 +87,8 @@ static struct clk div4_clks[DIV4_NR] = {
};
enum { MSTP323, MSTP322, MSTP321, MSTP320,
- MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
+ MSTP030,
+ MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
MSTP016, MSTP015, MSTP014,
MSTP007,
MSTP_NR };
@@ -97,6 +98,10 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */
[MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */
[MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */
+ [MSTP030] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 30, 0), /* I2C0 */
+ [MSTP029] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 29, 0), /* I2C1 */
+ [MSTP028] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 28, 0), /* I2C2 */
+ [MSTP027] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 27, 0), /* I2C3 */
[MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */
[MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */
[MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */
@@ -150,6 +155,10 @@ static struct clk_lookup lookups[] = {
/* MSTP32 clocks */
CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */
+ CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */
+ CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */
+ CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */
+ CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */
CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 09/11] ARM: shmobile: r8a7779: add I2C driver support
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (5 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 08/11] ARM: shmobile: r8a7779: add I2C " Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 10/11] ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372 Simon Horman
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
This patch enable R-Car I2C driver
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 2 +
arch/arm/mach-shmobile/setup-r8a7779.c | 77 ++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index 53382b6..f79b55c 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -69,6 +69,8 @@ CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=6
CONFIG_SERIAL_SH_SCI_CONSOLE=y
# CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_RCAR=y
CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 2917668..63de5cb 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -229,6 +229,79 @@ static struct platform_device tmu01_device = {
.num_resources = ARRAY_SIZE(tmu01_resources),
};
+/* I2C */
+static struct resource rcar_i2c0_res[] = {
+ {
+ .start = 0xffc70000,
+ .end = 0xffc70fff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = gic_spi(79),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device i2c0_device = {
+ .name = "i2c-rcar",
+ .id = 0,
+ .resource = rcar_i2c0_res,
+ .num_resources = ARRAY_SIZE(rcar_i2c0_res),
+};
+
+static struct resource rcar_i2c1_res[] = {
+ {
+ .start = 0xffc71000,
+ .end = 0xffc71fff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = gic_spi(82),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device i2c1_device = {
+ .name = "i2c-rcar",
+ .id = 1,
+ .resource = rcar_i2c1_res,
+ .num_resources = ARRAY_SIZE(rcar_i2c1_res),
+};
+
+static struct resource rcar_i2c2_res[] = {
+ {
+ .start = 0xffc72000,
+ .end = 0xffc72fff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = gic_spi(80),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device i2c2_device = {
+ .name = "i2c-rcar",
+ .id = 2,
+ .resource = rcar_i2c2_res,
+ .num_resources = ARRAY_SIZE(rcar_i2c2_res),
+};
+
+static struct resource rcar_i2c3_res[] = {
+ {
+ .start = 0xffc73000,
+ .end = 0xffc73fff,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = gic_spi(81),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device i2c3_device = {
+ .name = "i2c-rcar",
+ .id = 3,
+ .resource = rcar_i2c3_res,
+ .num_resources = ARRAY_SIZE(rcar_i2c3_res),
+};
+
static struct platform_device *r8a7779_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
@@ -238,6 +311,10 @@ static struct platform_device *r8a7779_early_devices[] __initdata = {
&scif5_device,
&tmu00_device,
&tmu01_device,
+ &i2c0_device,
+ &i2c1_device,
+ &i2c2_device,
+ &i2c3_device,
};
static struct platform_device *r8a7779_late_devices[] __initdata = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 10/11] ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (6 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 09/11] ARM: shmobile: r8a7779: add I2C driver support Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-01 0:41 ` [PATCH 11/11] ARM: shmobile: r8a7740: Enable PMU Simon Horman
2012-11-06 2:32 ` [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Bastian Hecht <hechtb@googlemail.com>
SH7372 can use DMA with the FLCTL flash controller. Add required slave
IDs and slave descriptors.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/include/mach/sh7372.h | 4 ++++
arch/arm/mach-shmobile/setup-sh7372.c | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
index eb98b45..d65fbbe 100644
--- a/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -452,6 +452,10 @@ enum {
SHDMA_SLAVE_SCIF5_RX,
SHDMA_SLAVE_SCIF6_TX,
SHDMA_SLAVE_SCIF6_RX,
+ SHDMA_SLAVE_FLCTL0_TX,
+ SHDMA_SLAVE_FLCTL0_RX,
+ SHDMA_SLAVE_FLCTL1_TX,
+ SHDMA_SLAVE_FLCTL1_RX,
SHDMA_SLAVE_SDHI0_RX,
SHDMA_SLAVE_SDHI0_TX,
SHDMA_SLAVE_SDHI1_RX,
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index a07954f..a360111 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -408,6 +408,26 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = {
.chcr = CHCR_RX(XMIT_SZ_8BIT),
.mid_rid = 0x3e,
}, {
+ .slave_id = SHDMA_SLAVE_FLCTL0_TX,
+ .addr = 0xe6a30050,
+ .chcr = CHCR_TX(XMIT_SZ_32BIT),
+ .mid_rid = 0x83,
+ }, {
+ .slave_id = SHDMA_SLAVE_FLCTL0_RX,
+ .addr = 0xe6a30050,
+ .chcr = CHCR_RX(XMIT_SZ_32BIT),
+ .mid_rid = 0x83,
+ }, {
+ .slave_id = SHDMA_SLAVE_FLCTL1_TX,
+ .addr = 0xe6a30060,
+ .chcr = CHCR_TX(XMIT_SZ_32BIT),
+ .mid_rid = 0x87,
+ }, {
+ .slave_id = SHDMA_SLAVE_FLCTL1_RX,
+ .addr = 0xe6a30060,
+ .chcr = CHCR_RX(XMIT_SZ_32BIT),
+ .mid_rid = 0x87,
+ }, {
.slave_id = SHDMA_SLAVE_SDHI0_TX,
.addr = 0xe6850030,
.chcr = CHCR_TX(XMIT_SZ_16BIT),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 11/11] ARM: shmobile: r8a7740: Enable PMU
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (7 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 10/11] ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372 Simon Horman
@ 2012-11-01 0:41 ` Simon Horman
2012-11-06 2:32 ` [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
9 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-01 0:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
This patch enables PMU for r8a7740.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
[horms@verge.net.au: corrected indentation]
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/armadillo800eva_defconfig | 1 +
arch/arm/mach-shmobile/setup-r8a7740.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig
index f78d259..3d76407 100644
--- a/arch/arm/configs/armadillo800eva_defconfig
+++ b/arch/arm/configs/armadillo800eva_defconfig
@@ -7,6 +7,7 @@ CONFIG_LOG_BUF_SHIFT\x16
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 9777e2d..6ac242c 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -590,6 +590,21 @@ static struct platform_device i2c1_device = {
.num_resources = ARRAY_SIZE(i2c1_resources),
};
+static struct resource pmu_resources[] = {
+ [0] = {
+ .start = evt2irq(0x19a0),
+ .end = evt2irq(0x19a0),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device pmu_device = {
+ .name = "arm-pmu",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(pmu_resources),
+ .resource = pmu_resources,
+};
+
static struct platform_device *r8a7740_late_devices[] __initdata = {
&i2c0_device,
&i2c1_device,
@@ -597,6 +612,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = {
&dma1_device,
&dma2_device,
&usb_dma_device,
+ &pmu_device,
};
/*
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [GIT PULL v3] Renesas ARM-based SoC for v3.8
2012-11-01 0:41 [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
` (8 preceding siblings ...)
2012-11-01 0:41 ` [PATCH 11/11] ARM: shmobile: r8a7740: Enable PMU Simon Horman
@ 2012-11-06 2:32 ` Simon Horman
2012-11-06 3:30 ` Nobuhiro Iwamatsu
9 siblings, 1 reply; 15+ messages in thread
From: Simon Horman @ 2012-11-06 2:32 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Nov 01, 2012 at 08:41:42AM +0800, Simon Horman wrote:
> Hi Olof, Hi Arnd,
>
> please consider the following SoC enhancements for 3.8.
Ping.
> ----------------------------------------------------------------
> The following changes since commit ddffeb8c4d0331609ef2581d84de4d763607bd37:
>
> Linux 3.7-rc1 (2012-10-14 14:41:04 -0700)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git soc
>
> for you to fetch changes up to 7b9621fb8a7f3602f86773e688e4fa4dd9bbfb73:
>
> ARM: shmobile: r8a7740: Enable PMU (2012-10-30 15:31:40 +0800)
>
> ----------------------------------------------------------------
> Bastian Hecht (4):
> ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode
> ARM: shmobile: sh73a0: Replace modify_scu_cpu_psr with scu_power_mode
> ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode
> ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372
>
> Kuninori Morimoto (4):
> ARM: shmobile: r8a7740: fixup DT machine desc name typo
> ARM: shmobile: r8a7779: add HSPI clock support
> ARM: shmobile: r8a7779: add I2C clock support
> ARM: shmobile: r8a7779: add I2C driver support
>
> Nobuhiro Iwamatsu (3):
> ARM: shmobile: Remove SH7367 support
> ARM: shmobile: Remove SH7377 support
> ARM: shmobile: r8a7740: Enable PMU
>
> arch/arm/boot/dts/sh7377.dtsi | 21 -
> arch/arm/configs/armadillo800eva_defconfig | 1 +
> arch/arm/configs/marzen_defconfig | 2 +
> arch/arm/mach-shmobile/Kconfig | 12 -
> arch/arm/mach-shmobile/Makefile | 6 -
> arch/arm/mach-shmobile/clock-r8a7779.c | 16 +-
> arch/arm/mach-shmobile/clock-sh7367.c | 355 ------
> arch/arm/mach-shmobile/clock-sh7377.c | 366 ------
> arch/arm/mach-shmobile/include/mach/common.h | 18 -
> arch/arm/mach-shmobile/include/mach/sh7367.h | 332 -----
> arch/arm/mach-shmobile/include/mach/sh7372.h | 4 +
> arch/arm/mach-shmobile/include/mach/sh7377.h | 360 ------
> arch/arm/mach-shmobile/intc-sh7367.c | 413 ------
> arch/arm/mach-shmobile/intc-sh7377.c | 592 ---------
> arch/arm/mach-shmobile/pfc-sh7367.c | 1727 --------------------------
> arch/arm/mach-shmobile/pfc-sh7372.c | 1663 -------------------------
> arch/arm/mach-shmobile/pfc-sh7377.c | 1688 -------------------------
> arch/arm/mach-shmobile/setup-r8a7740.c | 18 +-
> arch/arm/mach-shmobile/setup-r8a7779.c | 77 ++
> arch/arm/mach-shmobile/setup-sh7367.c | 481 -------
> arch/arm/mach-shmobile/setup-sh7372.c | 20 +
> arch/arm/mach-shmobile/setup-sh7377.c | 549 --------
> arch/arm/mach-shmobile/smp-emev2.c | 22 +-
> arch/arm/mach-shmobile/smp-r8a7779.c | 25 +-
> arch/arm/mach-shmobile/smp-sh73a0.c | 23 +-
> 25 files changed, 143 insertions(+), 8648 deletions(-)
> delete mode 100644 arch/arm/boot/dts/sh7377.dtsi
> delete mode 100644 arch/arm/mach-shmobile/clock-sh7367.c
> delete mode 100644 arch/arm/mach-shmobile/clock-sh7377.c
> delete mode 100644 arch/arm/mach-shmobile/include/mach/sh7367.h
> delete mode 100644 arch/arm/mach-shmobile/include/mach/sh7377.h
> delete mode 100644 arch/arm/mach-shmobile/intc-sh7367.c
> delete mode 100644 arch/arm/mach-shmobile/intc-sh7377.c
> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7367.c
> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7372.c
> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7377.c
> delete mode 100644 arch/arm/mach-shmobile/setup-sh7367.c
> delete mode 100644 arch/arm/mach-shmobile/setup-sh7377.c
> --
> 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 [flat|nested] 15+ messages in thread* Re: [GIT PULL v3] Renesas ARM-based SoC for v3.8
2012-11-06 2:32 ` [GIT PULL v3] Renesas ARM-based SoC for v3.8 Simon Horman
@ 2012-11-06 3:30 ` Nobuhiro Iwamatsu
2012-11-06 4:12 ` Simon Horman
0 siblings, 1 reply; 15+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-11-06 3:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi, Simon.
" ARM: shmobile: Remove SH7367 support" includes an unnecessary patch.
I already sent a new patch. Please update, if you still have time to apply.
Best regards,
Nobuhiro
On Tue, Nov 6, 2012 at 11:32 AM, Simon Horman <horms@verge.net.au> wrote:
> On Thu, Nov 01, 2012 at 08:41:42AM +0800, Simon Horman wrote:
>> Hi Olof, Hi Arnd,
>>
>> please consider the following SoC enhancements for 3.8.
>
> Ping.
>
>> ----------------------------------------------------------------
>> The following changes since commit ddffeb8c4d0331609ef2581d84de4d763607bd37:
>>
>> Linux 3.7-rc1 (2012-10-14 14:41:04 -0700)
>>
>> are available in the git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git soc
>>
>> for you to fetch changes up to 7b9621fb8a7f3602f86773e688e4fa4dd9bbfb73:
>>
>> ARM: shmobile: r8a7740: Enable PMU (2012-10-30 15:31:40 +0800)
>>
>> ----------------------------------------------------------------
>> Bastian Hecht (4):
>> ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode
>> ARM: shmobile: sh73a0: Replace modify_scu_cpu_psr with scu_power_mode
>> ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode
>> ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372
>>
>> Kuninori Morimoto (4):
>> ARM: shmobile: r8a7740: fixup DT machine desc name typo
>> ARM: shmobile: r8a7779: add HSPI clock support
>> ARM: shmobile: r8a7779: add I2C clock support
>> ARM: shmobile: r8a7779: add I2C driver support
>>
>> Nobuhiro Iwamatsu (3):
>> ARM: shmobile: Remove SH7367 support
>> ARM: shmobile: Remove SH7377 support
>> ARM: shmobile: r8a7740: Enable PMU
>>
>> arch/arm/boot/dts/sh7377.dtsi | 21 -
>> arch/arm/configs/armadillo800eva_defconfig | 1 +
>> arch/arm/configs/marzen_defconfig | 2 +
>> arch/arm/mach-shmobile/Kconfig | 12 -
>> arch/arm/mach-shmobile/Makefile | 6 -
>> arch/arm/mach-shmobile/clock-r8a7779.c | 16 +-
>> arch/arm/mach-shmobile/clock-sh7367.c | 355 ------
>> arch/arm/mach-shmobile/clock-sh7377.c | 366 ------
>> arch/arm/mach-shmobile/include/mach/common.h | 18 -
>> arch/arm/mach-shmobile/include/mach/sh7367.h | 332 -----
>> arch/arm/mach-shmobile/include/mach/sh7372.h | 4 +
>> arch/arm/mach-shmobile/include/mach/sh7377.h | 360 ------
>> arch/arm/mach-shmobile/intc-sh7367.c | 413 ------
>> arch/arm/mach-shmobile/intc-sh7377.c | 592 ---------
>> arch/arm/mach-shmobile/pfc-sh7367.c | 1727 --------------------------
>> arch/arm/mach-shmobile/pfc-sh7372.c | 1663 -------------------------
>> arch/arm/mach-shmobile/pfc-sh7377.c | 1688 -------------------------
>> arch/arm/mach-shmobile/setup-r8a7740.c | 18 +-
>> arch/arm/mach-shmobile/setup-r8a7779.c | 77 ++
>> arch/arm/mach-shmobile/setup-sh7367.c | 481 -------
>> arch/arm/mach-shmobile/setup-sh7372.c | 20 +
>> arch/arm/mach-shmobile/setup-sh7377.c | 549 --------
>> arch/arm/mach-shmobile/smp-emev2.c | 22 +-
>> arch/arm/mach-shmobile/smp-r8a7779.c | 25 +-
>> arch/arm/mach-shmobile/smp-sh73a0.c | 23 +-
>> 25 files changed, 143 insertions(+), 8648 deletions(-)
>> delete mode 100644 arch/arm/boot/dts/sh7377.dtsi
>> delete mode 100644 arch/arm/mach-shmobile/clock-sh7367.c
>> delete mode 100644 arch/arm/mach-shmobile/clock-sh7377.c
>> delete mode 100644 arch/arm/mach-shmobile/include/mach/sh7367.h
>> delete mode 100644 arch/arm/mach-shmobile/include/mach/sh7377.h
>> delete mode 100644 arch/arm/mach-shmobile/intc-sh7367.c
>> delete mode 100644 arch/arm/mach-shmobile/intc-sh7377.c
>> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7367.c
>> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7372.c
>> delete mode 100644 arch/arm/mach-shmobile/pfc-sh7377.c
>> delete mode 100644 arch/arm/mach-shmobile/setup-sh7367.c
>> delete mode 100644 arch/arm/mach-shmobile/setup-sh7377.c
>> --
>> 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
--
Nobuhiro Iwamatsu
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [GIT PULL v3] Renesas ARM-based SoC for v3.8
2012-11-06 3:30 ` Nobuhiro Iwamatsu
@ 2012-11-06 4:12 ` Simon Horman
2012-11-06 4:44 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 15+ messages in thread
From: Simon Horman @ 2012-11-06 4:12 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 06, 2012 at 12:30:41PM +0900, Nobuhiro Iwamatsu wrote:
> Hi, Simon.
>
> " ARM: shmobile: Remove SH7367 support" includes an unnecessary patch.
> I already sent a new patch. Please update, if you still have time to apply.
Sure, I can make an update. Is it only " ARM: shmobile: Remove SH7367 support"
that needs to be refreshed?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [GIT PULL v3] Renesas ARM-based SoC for v3.8
2012-11-06 4:12 ` Simon Horman
@ 2012-11-06 4:44 ` Nobuhiro Iwamatsu
2012-11-06 4:50 ` Simon Horman
0 siblings, 1 reply; 15+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-11-06 4:44 UTC (permalink / raw)
To: linux-arm-kernel
Simon Horman ????????:
> On Tue, Nov 06, 2012 at 12:30:41PM +0900, Nobuhiro Iwamatsu wrote:
>> Hi, Simon.
>>
>> " ARM: shmobile: Remove SH7367 support" includes an unnecessary patch.
>> I already sent a new patch. Please update, if you still have time to apply.
>
> Sure, I can make an update. Is it only " ARM: shmobile: Remove SH7367 support"
> that needs to be refreshed?
>
Yes, I need "ARM: shmobile: Remove SH7367 support" patch only.
Thanks!
Nobuhiro
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [GIT PULL v3] Renesas ARM-based SoC for v3.8
2012-11-06 4:44 ` Nobuhiro Iwamatsu
@ 2012-11-06 4:50 ` Simon Horman
0 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2012-11-06 4:50 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 06, 2012 at 01:44:51PM +0900, Nobuhiro Iwamatsu wrote:
> Simon Horman ????????:
> >On Tue, Nov 06, 2012 at 12:30:41PM +0900, Nobuhiro Iwamatsu wrote:
> >>Hi, Simon.
> >>
> >>" ARM: shmobile: Remove SH7367 support" includes an unnecessary patch.
> >>I already sent a new patch. Please update, if you still have time to apply.
> >
> >Sure, I can make an update. Is it only " ARM: shmobile: Remove SH7367 support"
> >that needs to be refreshed?
> >
> Yes, I need "ARM: shmobile: Remove SH7367 support" patch only.
Got it, will do.
^ permalink raw reply [flat|nested] 15+ messages in thread