Second Round of Renesas ARM Based SoC Cleanup for v4.4

* Remove now unused legacy pm domain code
 * Add missing of_node_put to pm-rmobile
 * Corresct spelling of interrupt-names in renesas-memory-controller binding
   documentation
 * Correct signdness of CPU id in shmobile apmu implementation
 * Make some functions static as appropriate
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWHvIfAAoJENfPZGlqN0++VqsQAI+fxALXRc+tTii6UQmZJdZ4
 vwHowfz2whPEbbyJfPik5yxL4/hhIaIt+xkRcheSQlF4GXrgXOKxFDio1+a0j6JA
 hduM4UfAsA1FZ8ANA+9oGitqmvtz4mibNZHsQ7OyS7qas35TBJo1PfuLUoNGrewz
 OqntlgY/wgw+Xrcc6YXxKx7OYTk8DEAx0ptd8szJL6/f67WWuDvf8sO7U5DwMBF1
 7Ygb0dujW5e7bIIPFim4dZBwJPdhTZ8jJle0N4E/IvpGnVL+po3JaK4fD3ThcGa6
 CpBrl1Uxhm4P1Zv/HNHsuwdddWRI0TzuvxC/mQz6M7ACQo6GVExoizUJVKrYGMyX
 xMTK0N009dC7zWh7Ceg0jTzoXHmdb3sHfaZ5fsGnaXnB31+bCWVOeltNxUm+WxoC
 1smSAWdXrc82d8CXghm4QvcVO2bGcW+t3IFTWCGt+JCQhNRbQN8XHIu5JtInBFvr
 B98bDVTJBI0uZIjID8ohkMQcDUoejJNIloxUKnyn2bCeq/VNU7+WFssNbqsW6SEt
 2NUdP89R4TrhWBtgbzIfphQKQ37llM/mtyIrlZz/tjuqRm6bkCFG5qTr0GqChNQL
 8zo1ETyWiuE2tSm6trQPx/HgAPqsnW60gDuQUyV+QPyOJCQnuRFbglEdQ3cXu03q
 wpVz9ttMdAAxIhOCWKRB
 =XNZw
 -----END PGP SIGNATURE-----

Merge tag 'renesas-cleanup2-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

Second Round of Renesas ARM Based SoC Cleanup for v4.4

* Remove now unused legacy pm domain code
* Add missing of_node_put to pm-rmobile
* Corresct spelling of interrupt-names in renesas-memory-controller binding
  documentation
* Correct signdness of CPU id in shmobile apmu implementation
* Make some functions static as appropriate

* tag 'renesas-cleanup2-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: R-Mobile: add missing of_node_put
  ARM: shmobile: dt: Rename incorrect interrupt related binding
  ARM: shmobile: apmu: correct type of CPU id
  ARM: shmobile: r8a7779: Remove legacy PM Domain remainings
  ARM: shmobile: r8a7778: Make r8a7778_init_irq_dt() static
  ARM: shmobile: smp: Make shmobile_smp_apmu_cpu_shutdown() static

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2015-10-22 09:48:02 -07:00
commit 9aa2b26bd3
6 changed files with 10 additions and 112 deletions

View File

@ -24,7 +24,7 @@ Required properties:
Optional properties:
- interrupts: Must contain a list of interrupt specifiers for memory
controller interrupts, if available.
- interrupts-names: Must contain a list of interrupt names corresponding to
- interrupt-names: Must contain a list of interrupt names corresponding to
the interrupts in the interrupts property, if available.
Valid interrupt names are:
- "sec" (secure interrupt)

View File

@ -88,7 +88,7 @@ static void apmu_init_cpu(struct resource *res, int cpu, int bit)
static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit),
struct rcar_apmu_config *apmu_config, int num)
{
u32 id;
int id;
int k;
int bit, index;
bool is_allowed;
@ -170,7 +170,7 @@ static inline void cpu_enter_lowpower_a15(void)
dsb();
}
void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
static void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
{
/* Select next sleep mode using the APMU */

View File

@ -9,20 +9,8 @@
* for more details.
*/
#include <linux/pm.h>
#include <linux/suspend.h>
#include <linux/err.h>
#include <linux/pm_clock.h>
#include <linux/pm_domain.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/console.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
#include "r8a7779.h"
@ -30,17 +18,6 @@
#define SYSCIER 0x0c
#define SYSCIMR 0x10
struct r8a7779_pm_domain {
struct generic_pm_domain genpd;
struct rcar_sysc_ch ch;
};
static inline
const struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
{
return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
}
#if defined(CONFIG_PM) || defined(CONFIG_SMP)
static void __init r8a7779_sysc_init(void)
@ -58,82 +35,6 @@ static inline void r8a7779_sysc_init(void) {}
#endif /* CONFIG_PM || CONFIG_SMP */
#ifdef CONFIG_PM
static int pd_power_down(struct generic_pm_domain *genpd)
{
return rcar_sysc_power_down(to_r8a7779_ch(genpd));
}
static int pd_power_up(struct generic_pm_domain *genpd)
{
return rcar_sysc_power_up(to_r8a7779_ch(genpd));
}
static bool pd_is_off(struct generic_pm_domain *genpd)
{
return rcar_sysc_power_is_off(to_r8a7779_ch(genpd));
}
static bool pd_active_wakeup(struct device *dev)
{
return true;
}
static void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
{
struct generic_pm_domain *genpd = &r8a7779_pd->genpd;
pm_genpd_init(genpd, NULL, false);
genpd->dev_ops.active_wakeup = pd_active_wakeup;
genpd->power_off = pd_power_down;
genpd->power_on = pd_power_up;
if (pd_is_off(&r8a7779_pd->genpd))
pd_power_up(&r8a7779_pd->genpd);
}
static struct r8a7779_pm_domain r8a7779_pm_domains[] = {
{
.genpd.name = "SH4A",
.ch = {
.chan_offs = 0x80, /* PWRSR1 .. PWRER1 */
.isr_bit = 16, /* SH4A */
},
},
{
.genpd.name = "SGX",
.ch = {
.chan_offs = 0xc0, /* PWRSR2 .. PWRER2 */
.isr_bit = 20, /* SGX */
},
},
{
.genpd.name = "VDP1",
.ch = {
.chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
.isr_bit = 21, /* VDP */
},
},
{
.genpd.name = "IMPX3",
.ch = {
.chan_offs = 0x140, /* PWRSR4 .. PWRER4 */
.isr_bit = 24, /* IMP */
},
},
};
void __init r8a7779_init_pm_domains(void)
{
int j;
for (j = 0; j < ARRAY_SIZE(r8a7779_pm_domains); j++)
r8a7779_init_pm_domain(&r8a7779_pm_domains[j]);
}
#endif /* CONFIG_PM */
void __init r8a7779_pm_init(void)
{
static int once;

View File

@ -342,8 +342,10 @@ static int __init rmobile_add_pm_domains(void __iomem *base,
}
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd)
if (!pd) {
of_node_put(np);
return -ENOMEM;
}
pd->genpd.name = np->name;
pd->base = base;

View File

@ -3,12 +3,6 @@
extern void r8a7779_pm_init(void);
#ifdef CONFIG_PM
extern void __init r8a7779_init_pm_domains(void);
#else
static inline void r8a7779_init_pm_domains(void) {}
#endif /* CONFIG_PM */
extern struct smp_operations r8a7779_smp_ops;
#endif /* __ASM_R8A7779_H__ */

View File

@ -42,7 +42,8 @@ static void __init r8a7778_timer_init(void)
#define INT2NTSR0 0x00018 /* 0xfe700018 */
#define INT2NTSR1 0x0002c /* 0xfe70002c */
void __init r8a7778_init_irq_dt(void)
static void __init r8a7778_init_irq_dt(void)
{
void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000);