r8a7779.h 1.3 KB
Newer Older
1 2 3
#ifndef __ASM_R8A7779_H__
#define __ASM_R8A7779_H__

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include <linux/sh_clk.h>
#include <linux/pm_domain.h>

struct platform_device;

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;
};

static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
{
	return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
}

25 26 27 28 29 30 31 32 33 34 35 36 37
extern void r8a7779_init_delay(void);
extern void r8a7779_init_irq(void);
extern void r8a7779_init_irq_extpin(int irlm);
extern void r8a7779_init_irq_dt(void);
extern void r8a7779_map_io(void);
extern void r8a7779_earlytimer_init(void);
extern void r8a7779_add_early_devices(void);
extern void r8a7779_add_standard_devices(void);
extern void r8a7779_add_standard_devices_dt(void);
extern void r8a7779_clock_init(void);
extern void r8a7779_pinmux_init(void);
extern void r8a7779_pm_init(void);
extern void r8a7779_register_twd(void);
38 39 40
extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch);
extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch);

41
#ifdef CONFIG_PM
42
extern void __init r8a7779_init_pm_domains(void);
43
#else
44
static inline void r8a7779_init_pm_domains(void) {}
45 46
#endif /* CONFIG_PM */

47 48
extern struct smp_operations r8a7779_smp_ops;

49
#endif /* __ASM_R8A7779_H__ */