Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5afcd90f authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Simon Horman
Browse files

ARM: shmobile: r8a7779: Make struct rcar_sysc_ch const

parent bcb82437
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,8 @@ struct r8a7779_pm_domain {
	struct rcar_sysc_ch ch;
	struct rcar_sysc_ch ch;
};
};


static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
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;
	return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
}
}
+6 −6
Original line number Original line Diff line number Diff line
@@ -32,25 +32,25 @@
#define AVECR IOMEM(0xfe700040)
#define AVECR IOMEM(0xfe700040)
#define R8A7779_SCU_BASE 0xf0000000
#define R8A7779_SCU_BASE 0xf0000000


static struct rcar_sysc_ch r8a7779_ch_cpu1 = {
static const struct rcar_sysc_ch r8a7779_ch_cpu1 = {
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_bit = 1, /* ARM1 */
	.chan_bit = 1, /* ARM1 */
	.isr_bit = 1, /* ARM1 */
	.isr_bit = 1, /* ARM1 */
};
};


static struct rcar_sysc_ch r8a7779_ch_cpu2 = {
static const struct rcar_sysc_ch r8a7779_ch_cpu2 = {
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_bit = 2, /* ARM2 */
	.chan_bit = 2, /* ARM2 */
	.isr_bit = 2, /* ARM2 */
	.isr_bit = 2, /* ARM2 */
};
};


static struct rcar_sysc_ch r8a7779_ch_cpu3 = {
static const struct rcar_sysc_ch r8a7779_ch_cpu3 = {
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
	.chan_bit = 3, /* ARM3 */
	.chan_bit = 3, /* ARM3 */
	.isr_bit = 3, /* ARM3 */
	.isr_bit = 3, /* ARM3 */
};
};


static struct rcar_sysc_ch *r8a7779_ch_cpu[4] = {
static const struct rcar_sysc_ch * const r8a7779_ch_cpu[4] = {
	[1] = &r8a7779_ch_cpu1,
	[1] = &r8a7779_ch_cpu1,
	[2] = &r8a7779_ch_cpu2,
	[2] = &r8a7779_ch_cpu2,
	[3] = &r8a7779_ch_cpu3,
	[3] = &r8a7779_ch_cpu3,
@@ -66,7 +66,7 @@ void __init r8a7779_register_twd(void)


static int r8a7779_platform_cpu_kill(unsigned int cpu)
static int r8a7779_platform_cpu_kill(unsigned int cpu)
{
{
	struct rcar_sysc_ch *ch = NULL;
	const struct rcar_sysc_ch *ch = NULL;
	int ret = -EIO;
	int ret = -EIO;


	cpu = cpu_logical_map(cpu);
	cpu = cpu_logical_map(cpu);
@@ -82,7 +82,7 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu)


static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
{
	struct rcar_sysc_ch *ch = NULL;
	const struct rcar_sysc_ch *ch = NULL;
	unsigned int lcpu = cpu_logical_map(cpu);
	unsigned int lcpu = cpu_logical_map(cpu);
	int ret;
	int ret;