Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 1 | #ifndef __ASM_R8A7779_H__ |
| 2 | #define __ASM_R8A7779_H__ |
| 3 | |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 4 | #include <linux/sh_clk.h> |
| 5 | #include <linux/pm_domain.h> |
Sergei Shtylyov | dace48d | 2013-04-04 18:53:50 +0000 | [diff] [blame] | 6 | #include <linux/sh_eth.h> |
Vladimir Barinov | 4714a02 | 2013-08-22 17:23:13 -0300 | [diff] [blame] | 7 | #include <linux/platform_data/camera-rcar.h> |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 8 | |
Max Filippov | 441f750 | 2013-08-25 21:46:23 +0400 | [diff] [blame] | 9 | /* HPB-DMA slave IDs */ |
| 10 | enum { |
| 11 | HPBDMA_SLAVE_DUMMY, |
| 12 | HPBDMA_SLAVE_SDHI0_TX, |
| 13 | HPBDMA_SLAVE_SDHI0_RX, |
| 14 | }; |
| 15 | |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 16 | struct platform_device; |
| 17 | |
| 18 | struct r8a7779_pm_ch { |
| 19 | unsigned long chan_offs; |
| 20 | unsigned int chan_bit; |
| 21 | unsigned int isr_bit; |
| 22 | }; |
| 23 | |
| 24 | struct r8a7779_pm_domain { |
| 25 | struct generic_pm_domain genpd; |
| 26 | struct r8a7779_pm_ch ch; |
| 27 | }; |
| 28 | |
| 29 | static 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 Morimoto | 60e3a566 | 2013-03-28 01:49:27 -0700 | [diff] [blame] | 34 | extern void r8a7779_init_delay(void); |
Kuninori Morimoto | 60e3a566 | 2013-03-28 01:49:27 -0700 | [diff] [blame] | 35 | extern void r8a7779_init_irq_extpin(int irlm); |
Kuninori Morimoto | 31e4e29 | 2013-10-02 01:38:23 -0700 | [diff] [blame^] | 36 | extern void r8a7779_init_irq_extpin_dt(int irlm); |
Kuninori Morimoto | 60e3a566 | 2013-03-28 01:49:27 -0700 | [diff] [blame] | 37 | extern void r8a7779_init_irq_dt(void); |
| 38 | extern void r8a7779_map_io(void); |
| 39 | extern void r8a7779_earlytimer_init(void); |
| 40 | extern void r8a7779_add_early_devices(void); |
| 41 | extern void r8a7779_add_standard_devices(void); |
| 42 | extern void r8a7779_add_standard_devices_dt(void); |
Sergei Shtylyov | dace48d | 2013-04-04 18:53:50 +0000 | [diff] [blame] | 43 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); |
Vladimir Barinov | 4714a02 | 2013-08-22 17:23:13 -0300 | [diff] [blame] | 44 | extern void r8a7779_add_vin_device(int idx, |
| 45 | struct rcar_vin_platform_data *pdata); |
Sergei Shtylyov | 2c8788b | 2013-06-02 01:30:15 +0400 | [diff] [blame] | 46 | extern void r8a7779_init_late(void); |
Kuninori Morimoto | 60e3a566 | 2013-03-28 01:49:27 -0700 | [diff] [blame] | 47 | extern void r8a7779_clock_init(void); |
| 48 | extern void r8a7779_pinmux_init(void); |
| 49 | extern void r8a7779_pm_init(void); |
| 50 | extern void r8a7779_register_twd(void); |
Magnus Damm | f40aaf6 | 2012-01-10 17:44:39 +0900 | [diff] [blame] | 51 | extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch); |
| 52 | extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch); |
| 53 | |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 54 | #ifdef CONFIG_PM |
Rafael J. Wysocki | 45e5ca5 | 2012-08-07 01:14:14 +0200 | [diff] [blame] | 55 | extern void __init r8a7779_init_pm_domains(void); |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 56 | #else |
Rafael J. Wysocki | 45e5ca5 | 2012-08-07 01:14:14 +0200 | [diff] [blame] | 57 | static inline void r8a7779_init_pm_domains(void) {} |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 58 | #endif /* CONFIG_PM */ |
| 59 | |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 60 | extern struct smp_operations r8a7779_smp_ops; |
| 61 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 62 | #endif /* __ASM_R8A7779_H__ */ |