ARM: shmobile: Break out R-Car SYSC PM code
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
From: Magnus Damm <[email protected]>
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
---
Developed on top of renesas-devel-v3.13-rc8-20140115
arch/arm/mach-shmobile/Makefile | 2 arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 ++ arch/arm/mach-shmobile/include/mach/r8a7779.h | 13 -- arch/arm/mach-shmobile/pm-r8a7779.c | 131 +---------------------- arch/arm/mach-shmobile/pm-rcar.c | 142 +++++++++++++++++++++++++ arch/arm/mach-shmobile/smp-r8a7779.c | 17 +- 6 files changed, 177 insertions(+), 143 deletions(-)
arch/arm/mach-shmobile/Makefile +1 -1
@@ -52,7 +52,7 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o -obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o +obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o # Board objects ifdef CONFIG_ARCH_SHMOBILE_MULTI
arch/arm/mach-shmobile/include/mach/pm-rcar.h new file +15 -0
@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { +unsigned long chan_offs; +unsigned int chan_bit; +unsigned int isr_bit; +}; + +int rcar_sysc_power_down (struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up (struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off (struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init (phys_addr_t base); + +#endif /* PM_RCAR_H */
arch/arm/mach-shmobile/include/mach/r8a7779.h +3 -10
@@ -3,6 +3,7 @@#include <linux/sh_clk.h> #include <linux/pm_domain.h> +#include <mach/pm-rcar.h> /* HPB-DMA slave IDs */ enum {
@@ -11,18 +12,12 @@ enum { HPBDMA_SLAVE_SDHI0_RX, }; -struct r8a7779_pm_ch { -unsigned long chan_offs; -unsigned int chan_bit; -unsigned int isr_bit; -}; -struct r8a7779_pm_domain {struct generic_pm_domain genpd; -struct r8a7779_pm_ch ch; +struct rcar_sysc_ch ch; }; -static inline struct r8a7779_pm_ch *to_r8a7779_ch (struct generic_pm_domain *d) +static inline struct rcar_sysc_ch *to_r8a7779_ch (struct generic_pm_domain *d) { return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; }
@@ -41,8 +36,6 @@ extern void r8a7779_clock_init(void);extern void r8a7779_pinmux_init (void );extern void r8a7779_pm_init (void );extern void r8a7779_register_twd (void ); -extern int r8a7779_sysc_power_down (struct r8a7779_pm_ch *r8a7779_ch); -extern int r8a7779_sysc_power_up (struct r8a7779_pm_ch *r8a7779_ch);#ifdef CONFIG_PM extern void __init r8a7779_init_pm_domains (void );
arch/arm/mach-shmobile/pm-r8a7779.c +7 -124
163 lines not on this page · raw message
arch/arm/mach-shmobile/pm-rcar.c new file +142 -0
142 lines not on this page · raw message
arch/arm/mach-shmobile/smp-r8a7779.c +9 -8
@@ -24,6 +24,7 @@#include <linux/io.h> #include <linux/delay.h> #include <mach/common.h> +#include <mach/pm-rcar.h> #include <mach/r8a7779.h> #include <asm/cacheflush.h> #include <asm/smp_plat.h>
@@ -33,25 +34,25 @@#define AVECR IOMEM(0xfe700040)#define R8A7779_SCU_BASE 0xf0000000 -static struct r8a7779_pm_ch r8a7779_ch_cpu1 = { +static struct rcar_sysc_ch r8a7779_ch_cpu1 = { .chan_offs =0x40 ,/* PWRSR0 .. PWRER0 */ .chan_bit =1 ,/* ARM1 */ .isr_bit =1 ,/* ARM1 */ }; -static struct r8a7779_pm_ch r8a7779_ch_cpu2 = { +static struct rcar_sysc_ch r8a7779_ch_cpu2 = { .chan_offs =0x40 ,/* PWRSR0 .. PWRER0 */ .chan_bit =2 ,/* ARM2 */ .isr_bit =2 ,/* ARM2 */ }; -static struct r8a7779_pm_ch r8a7779_ch_cpu3 = { +static struct rcar_sysc_ch r8a7779_ch_cpu3 = { .chan_offs =0x40 ,/* PWRSR0 .. PWRER0 */ .chan_bit =3 ,/* ARM3 */ .isr_bit =3 ,/* ARM3 */ }; -static struct r8a7779_pm_ch *r8a7779_ch_cpu[4 ] = { +static struct rcar_sysc_ch *r8a7779_ch_cpu[4 ] = { [1 ] = &r8a7779_ch_cpu1, [2 ] = &r8a7779_ch_cpu2, [3 ] = &r8a7779_ch_cpu3,
@@ -67,7 +68,7 @@ void __init r8a7779_register_twd(void)static int r8a7779_platform_cpu_kill (unsigned int cpu) { -struct r8a7779_pm_ch *ch =NULL ; +struct rcar_sysc_ch *ch =NULL ;int ret = -EIO ; cpu =cpu_logical_map (cpu);
@@ -76,14 +77,14 @@ static int r8a7779_platform_cpu_kill(uns ch = r8a7779_ch_cpu[cpu];if (ch) - ret =r8a7779_sysc_power_down (ch); + ret =rcar_sysc_power_down (ch);return ret ? ret :1 ; }static int r8a7779_boot_secondary (unsigned int cpu,struct task_struct *idle) { -struct r8a7779_pm_ch *ch =NULL ; +struct rcar_sysc_ch *ch =NULL ;unsigned int lcpu =cpu_logical_map (cpu);int ret;
@@ -91,7 +92,7 @@ static int r8a7779_boot_secondary(unsign ch = r8a7779_ch_cpu[lcpu];if (ch) - ret =r8a7779_sysc_power_up (ch); + ret =rcar_sysc_power_up (ch);else ret = -EIO ;
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
Is this also useful for the r8a7778 (the other Gen 1 SoC in mainline) ?
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Hi Simon and Morimoto-san,
Quoted 9 lines · Simon Horman
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
Is this also useful for the r8a7778 (the other Gen 1 SoC in mainline) ?
I don't know actually. =) What does Morimoto-san say about this?
Cheers,
/ magnus
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Hi Magnus, Simon
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
Is this also useful for the r8a7778 (the other Gen 1 SoC in mainline) ?
I don't know actually. =) What does Morimoto-san say about this?
Thank you for this patch.
it is useful, but, unfortunately r8a7778 (= M1) doesn't have SYSC
Best regards
---
Kuninori Morimoto
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 8 lines · Kuninori Morimoto
Hi Magnus, Simon
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Is this also useful for the r8a7778 (the other Gen 1 SoC in mainline) ?
I don't know actually. =) What does Morimoto-san say about this?
Thank you for this patch.
it is useful, but, unfortunately r8a7778 (= M1) doesn't have SYSC
Thanks, one less thing to worry about :)
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
In reply to Magnus DammQuoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Break out the R-Car SYSC power management code from the r8a7779 SoC code. With this new shared R-Car SYSC code base it is possible to hook in Generation 2 SoCs as well.
Signed-off-by Magnus Damm <[email protected]>
Thanks, I have queued this up.
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
In reply to Magnus DammHi,
I spotted this patch since it adds new include/mach contents, comment below:
Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */
These prototypes are only ever used by code in arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.
So, I suggest moving this to be at arch/arm/mach-shmobile/pm-rcar.h instead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).
-Olof
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Hi Olof,
Quoted 31 lines · Olof Johansson
Hi,
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).
Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
For multiplatform we do currently work around the issue by the following line in the Makefile:
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) :=
-I$(srctree)/arch/arm/mach-shmobile/include
Thanks,
/ magnus
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.
Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
Cheers,
/ magnus
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 56 lines · Magnus Damm
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
Quoted 4 lines
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
It certainly looks like a good way forward, thanks for doing this.
(Apologies for the delay in response, I've been ignoring my upstream email for a while and I'm dealing with the backlog now)
-Olof
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 57 lines · Olof Johansson
Quoted 56 lines · Magnus Damm
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
Quoted 6 lines
Quoted 4 lines
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
It certainly looks like a good way forward, thanks for doing this.
Ok, thanks. The list of patches above is the first step forward from my side.
I'm afraid that I'm a bit confused by your comments in thread:
"Re: [PATCH v2] ARM: shmobile: Add temporary include workaround"
The single v2 patch on the line above is just a bug fixed version of [01/12].
Can you please clarify if you're ok with the series or if you want me to rework it somehow?
Quoted 2 lines
(Apologies for the delay in response, I've been ignoring my upstream email for a while and I'm dealing with the backlog now)
No problem!
Thanks,
/ magnus
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 67 lines · Magnus Damm
Quoted 57 lines · Olof Johansson
Quoted 56 lines · Magnus Damm
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
Quoted 6 lines
Quoted 4 lines
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
It certainly looks like a good way forward, thanks for doing this.
Ok, thanks. The list of patches above is the first step forward from my side.
Quoted 7 lines
I'm afraid that I'm a bit confused by your comments in thread:
"Re: [PATCH v2] ARM: shmobile: Add temporary include workaround"The single v2 patch on the line above is just a bug fixed version of [01/12].
Can you please clarify if you're ok with the series or if you want me to rework it somehow?
Oh, yeah, that's confusing -- my "looks good, please go ahead" was for patch 2-12, I don't think you actually need 1/12 at this time since you move the include file over and change the include statements in the same time in the other 11 patches?
-Olof
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 73 lines · Olof Johansson
Quoted 72 lines · Magnus Damm
Quoted 57 lines · Olof Johansson
Quoted 56 lines · Magnus Damm
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
Quoted 6 lines
Quoted 4 lines
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
It certainly looks like a good way forward, thanks for doing this.
Ok, thanks. The list of patches above is the first step forward from my side.
I'm afraid that I'm a bit confused by your comments in thread:
"Re: [PATCH v2] ARM: shmobile: Add temporary include workaround"The single v2 patch on the line above is just a bug fixed version of [01/12].
Quoted 7 lines
Quoted 2 lines
Can you please clarify if you're ok with the series or if you want me to rework it somehow?
Oh, yeah, that's confusing -- my "looks good, please go ahead" was for patch 2-12, I don't think you actually need 1/12 at this time since you move the include file over and change the include statements in the same time in the other 11 patches?
My current set of patches do not move the location of the include file just yet. The reason for this is that this series targets SoC code only, but both board files and SoC files use the same header files. So until all files are converted the workaround is needed.
I'd be happy to adjust the patches to fit your recommendation and move the header file in the same patch. But then I need to touch both SoC code and board code in the same patch - which is fine - but I would like to know what branch to target if so.
So how would you like to consume this cleanup? And when? =)
Thanks,
/ magnus
PATCH 1/1 ARM: shmobile: Break out R-Car SYSC PM code
Quoted 82 lines · Magnus Damm
Quoted 73 lines · Olof Johansson
Quoted 72 lines · Magnus Damm
Quoted 57 lines · Olof Johansson
Quoted 56 lines · Magnus Damm
Hi Olof,
Quoted 30 lines · Magnus Damm
Quoted 29 lines · Olof Johansson
I spotted this patch since it adds new
include/machcontents, comment below:Quoted 8 lines · Magnus Damm
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +5
-0@@ -0,0 +1,15 @@ +#ifndef PM_RCAR_H +#define PM_RCAR_H + +struct rcar_sysc_ch { + unsigned long chan_offs;arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 line 15
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/pm-rcar.h 2014-01-15 13:30:38.000000000 +0900 new file +10
-0+ unsigned int chan_bit; + unsigned int isr_bit; +}; + +int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +void __iomem *rcar_sysc_init(phys_addr_t base); + +#endif /* PM_RCAR_H */These prototypes are only ever used by code in
arch/arm/mach-shmobile, right? There's no reason to expose it to the global include namespace, and you'll just have to remove it when the platform is converted to multiplatform.Quoted 6 lines
Quoted 2 lines
So, I suggest moving this to be at
arch/arm/mach-shmobile/pm-rcar.hinstead (and included as "pm-rcar.h" instead of <mach/pm-rcar.h>).Thanks for your help with the patches! You are right that these are never used outside mach-shmobile, and moving headers out of "mach" certainly makes sense.
FYI, the following series includes my attempt to address this issue:
[PATCH 00/12] ARM: shmobile: Rework include path for SoC files [PATCH 01/12] ARM: shmobile: Add temporary include workaround [PATCH 02/12] ARM: shmobile: Rework include path for sh7372 [PATCH 03/12] ARM: shmobile: Rework include path for sh73a0 [PATCH 04/12] ARM: shmobile: Rework include path for EMEV2 [PATCH 05/12] ARM: shmobile: Rework include path for r8a7740 [PATCH 06/12] ARM: shmobile: Rework include path for r8a7778 [PATCH 07/12] ARM: shmobile: Rework include path for r8a7779 [PATCH 08/12] ARM: shmobile: Rework include path for r8a7790 [PATCH 09/12] ARM: shmobile: Rework include path for r8a7791 [PATCH 10/12] ARM: shmobile: Rework include path for r8a73a4 [PATCH 11/12] ARM: shmobile: Rework include path for r7s72100 [PATCH 12/12] ARM: shmobile: Rework include path for common bits
Quoted 6 lines
Quoted 4 lines
If you would like me to rework the code somehow then please let me know. I also intend to ask a different developer to convert the actual boards once these changes have been merged by Simon, hope this is a good way forward for you.
It certainly looks like a good way forward, thanks for doing this.
Ok, thanks. The list of patches above is the first step forward from my side.
I'm afraid that I'm a bit confused by your comments in thread:
"Re: [PATCH v2] ARM: shmobile: Add temporary include workaround"The single v2 patch on the line above is just a bug fixed version of [01/12].
Quoted 7 lines
Quoted 2 lines
Can you please clarify if you're ok with the series or if you want me to rework it somehow?
Oh, yeah, that's confusing -- my "looks good, please go ahead" was for patch 2-12, I don't think you actually need 1/12 at this time since you move the include file over and change the include statements in the same time in the other 11 patches?
Quoted 4 lines
My current set of patches do not move the location of the include file just yet. The reason for this is that this series targets SoC code only, but both board files and SoC files use the same header files. So until all files are converted the workaround is needed.
Oh, my bad. When I saw the change from <mach/file.h> to "file.h", I missed that there was no diff move that accompanied it.
Quoted 4 lines
I'd be happy to adjust the patches to fit your recommendation and move the header file in the same patch. But then I need to touch both SoC code and board code in the same patch - which is fine - but I would like to know what branch to target if so.
We're still talking mostly about code under mach-shmobile though, right? I think most of these header files are only actually used underneath of there.
If so, then it's fine to just do it in one branch. The rules for how we sort our branches are guidelines, and where it doesn't make sense to follow them, we don't. :)
Quoted 1 line
So how would you like to consume this cleanup? And when? =)
For something like this, that has a build-time possibility to check for introduced breakage (i.e. no likelihood for some strange random regression at runtime), I'm OK with the patches coming in late. I.e. there's time for 3.15 if you want to try getting it in. If not, we can queue it up as a base branch for any other changes for 3.16.
As far as how to consume it: send a branch with these patches on there, we'll merge it in. If it's relatively conflict-free we'll do it under next/clenaup for early merge, otherwise we'll save it for the end of our branches, etc. It'd be a great cleanup to get merged so we'll make it work somehow!
-Olof