blob: 17af34ed89c801553b248f12f0d3c39336553854 [file] [log] [blame]
Magnus Dammf411fad2011-12-14 01:36:12 +09001#ifndef __ASM_R8A7779_H__
2#define __ASM_R8A7779_H__
3
Magnus Damma662c082012-01-10 15:50:01 +09004#include <linux/sh_clk.h>
5#include <linux/pm_domain.h>
Sergei Shtylyovdace48d2013-04-04 18:53:50 +00006#include <linux/sh_eth.h>
Vladimir Barinov4714a022013-08-22 17:23:13 -03007#include <linux/platform_data/camera-rcar.h>
Magnus Damma662c082012-01-10 15:50:01 +09008
Max Filippov441f7502013-08-25 21:46:23 +04009/* HPB-DMA slave IDs */
10enum {
11 HPBDMA_SLAVE_DUMMY,
12 HPBDMA_SLAVE_SDHI0_TX,
13 HPBDMA_SLAVE_SDHI0_RX,
14};
15
Magnus Damma662c082012-01-10 15:50:01 +090016struct platform_device;
17
18struct r8a7779_pm_ch {
19 unsigned long chan_offs;
20 unsigned int chan_bit;
21 unsigned int isr_bit;
22};
23
24struct r8a7779_pm_domain {
25 struct generic_pm_domain genpd;
26 struct r8a7779_pm_ch ch;
27};
28
29static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
30{
31 return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
32}
33
Kuninori Morimoto60e3a5662013-03-28 01:49:27 -070034extern void r8a7779_init_delay(void);
Kuninori Morimoto60e3a5662013-03-28 01:49:27 -070035extern void r8a7779_init_irq_extpin(int irlm);
Kuninori Morimoto31e4e292013-10-02 01:38:23 -070036extern void r8a7779_init_irq_extpin_dt(int irlm);
Kuninori Morimoto60e3a5662013-03-28 01:49:27 -070037extern void r8a7779_init_irq_dt(void);
38extern void r8a7779_map_io(void);
39extern void r8a7779_earlytimer_init(void);
40extern void r8a7779_add_early_devices(void);
41extern void r8a7779_add_standard_devices(void);
42extern void r8a7779_add_standard_devices_dt(void);
Sergei Shtylyovdace48d2013-04-04 18:53:50 +000043extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
Vladimir Barinov4714a022013-08-22 17:23:13 -030044extern void r8a7779_add_vin_device(int idx,
45 struct rcar_vin_platform_data *pdata);
Sergei Shtylyov2c8788b2013-06-02 01:30:15 +040046extern void r8a7779_init_late(void);
Kuninori Morimoto60e3a5662013-03-28 01:49:27 -070047extern void r8a7779_clock_init(void);
48extern void r8a7779_pinmux_init(void);
49extern void r8a7779_pm_init(void);
50extern void r8a7779_register_twd(void);
Magnus Dammf40aaf62012-01-10 17:44:39 +090051extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch);
52extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch);
53
Magnus Damma662c082012-01-10 15:50:01 +090054#ifdef CONFIG_PM
Rafael J. Wysocki45e5ca52012-08-07 01:14:14 +020055extern void __init r8a7779_init_pm_domains(void);
Magnus Damma662c082012-01-10 15:50:01 +090056#else
Rafael J. Wysocki45e5ca52012-08-07 01:14:14 +020057static inline void r8a7779_init_pm_domains(void) {}
Magnus Damma662c082012-01-10 15:50:01 +090058#endif /* CONFIG_PM */
59
Marc Zyngiera62580e2011-09-08 13:15:22 +010060extern struct smp_operations r8a7779_smp_ops;
61
Magnus Dammf411fad2011-12-14 01:36:12 +090062#endif /* __ASM_R8A7779_H__ */