blob: eb89293fff4d36068a7fc3baf305bd7010209799 [file] [log] [blame]
Magnus Dammc793c1b2010-02-05 11:14:49 +00001#ifndef __ARCH_MACH_COMMON_H
2#define __ARCH_MACH_COMMON_H
3
Magnus Damm08ad42f2012-03-06 17:36:14 +09004extern void shmobile_earlytimer_init(void);
Magnus Dammc793c1b2010-02-05 11:14:49 +00005extern struct sys_timer shmobile_timer;
Magnus Damm0f2c9f22012-03-28 19:22:30 +09006extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
7 unsigned int mult, unsigned int div);
Marc Zyngier4200b162012-01-10 19:44:19 +00008struct twd_local_timer;
Magnus Damm4ae04ac2010-02-08 11:02:54 +00009extern void shmobile_setup_console(void);
Magnus Damm1c51ed42010-12-14 16:56:55 +090010extern void shmobile_secondary_vector(void);
Magnus Damm8b306792011-12-28 16:47:16 +090011extern int shmobile_platform_cpu_kill(unsigned int cpu);
Magnus Damm83ca5c82010-05-20 14:45:03 +000012struct clk;
Magnus Damm6b6a4c02012-02-29 21:41:30 +090013extern int shmobile_clk_init(void);
Magnus Damm863b1712010-12-28 08:27:01 +000014extern void shmobile_handle_irq_intc(struct pt_regs *);
Magnus Dammc3dada12011-04-29 02:23:28 +090015extern struct platform_suspend_ops shmobile_suspend_ops;
Magnus Dammb73b5c42011-11-11 14:01:30 +090016struct cpuidle_driver;
Rafael J. Wysocki5b411472012-08-15 20:58:19 +020017struct cpuidle_device;
18extern int shmobile_enter_wfi(struct cpuidle_device *dev,
19 struct cpuidle_driver *drv, int index);
20extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
Magnus Damme47bb512010-05-12 14:21:24 +000021
Magnus Dammc793c1b2010-02-05 11:14:49 +000022extern void sh7367_init_irq(void);
Magnus Damm237caf92012-02-29 21:37:04 +090023extern void sh7367_map_io(void);
Magnus Dammc793c1b2010-02-05 11:14:49 +000024extern void sh7367_add_early_devices(void);
25extern void sh7367_add_standard_devices(void);
26extern void sh7367_clock_init(void);
Magnus Damm7fdda672010-02-10 20:10:55 +090027extern void sh7367_pinmux_init(void);
Magnus Damm4f0836b2010-05-20 14:49:28 +000028extern struct clk sh7367_extalb1_clk;
29extern struct clk sh7367_extal2_clk;
Magnus Dammc793c1b2010-02-05 11:14:49 +000030
Magnus Dammf2aaf662010-02-05 11:15:07 +000031extern void sh7377_init_irq(void);
Magnus Dammbfc46f32012-02-29 21:37:12 +090032extern void sh7377_map_io(void);
Magnus Dammf2aaf662010-02-05 11:15:07 +000033extern void sh7377_add_early_devices(void);
34extern void sh7377_add_standard_devices(void);
Magnus Damm0163acf2010-05-21 05:19:34 +000035extern void sh7377_clock_init(void);
NISHIMOTO Hiroki276b4f62010-02-12 08:10:06 +000036extern void sh7377_pinmux_init(void);
Magnus Damm0163acf2010-05-21 05:19:34 +000037extern struct clk sh7377_extalc1_clk;
38extern struct clk sh7377_extal2_clk;
Magnus Dammf2aaf662010-02-05 11:15:07 +000039
Magnus Damm2b7eda62010-02-05 11:14:58 +000040extern void sh7372_init_irq(void);
Magnus Damm5d7220ec2012-02-29 21:37:19 +090041extern void sh7372_map_io(void);
Magnus Damm2b7eda62010-02-05 11:14:58 +000042extern void sh7372_add_early_devices(void);
43extern void sh7372_add_standard_devices(void);
Magnus Damm495b3ce2010-05-12 14:21:34 +000044extern void sh7372_clock_init(void);
Kuninori Morimotob789b3f2010-02-17 09:39:10 +000045extern void sh7372_pinmux_init(void);
Magnus Damm97991652011-04-29 02:28:08 +090046extern void sh7372_pm_init(void);
Magnus Dammf7dadb32011-12-23 01:23:07 +010047extern void sh7372_resume_core_standby_sysc(void);
48extern int sh7372_do_idle_sysc(unsigned long sleep_mode);
Magnus Damm83ca5c82010-05-20 14:45:03 +000049extern struct clk sh7372_extal1_clk;
50extern struct clk sh7372_extal2_clk;
Magnus Damm2b7eda62010-02-05 11:14:58 +000051
Magnus Damm5f53a562010-12-21 08:37:32 +000052extern void sh73a0_init_irq(void);
Magnus Damm50e15c32012-02-29 21:37:27 +090053extern void sh73a0_map_io(void);
Magnus Damm6d9598e2010-11-17 10:59:31 +000054extern void sh73a0_add_early_devices(void);
55extern void sh73a0_add_standard_devices(void);
56extern void sh73a0_clock_init(void);
Takashi YOSHII1cdf3702010-11-19 16:47:16 +090057extern void sh73a0_pinmux_init(void);
Magnus Dammf6d84f42010-12-03 07:22:31 +000058extern struct clk sh73a0_extal1_clk;
59extern struct clk sh73a0_extal2_clk;
Kuninori Morimotod4775352011-12-05 22:29:15 -080060extern struct clk sh73a0_extcki_clk;
61extern struct clk sh73a0_extalr_clk;
Magnus Damm6d9598e2010-11-17 10:59:31 +000062
Magnus Damm72f4d572010-12-14 16:57:11 +090063extern unsigned int sh73a0_get_core_count(void);
64extern void sh73a0_secondary_init(unsigned int cpu);
65extern int sh73a0_boot_secondary(unsigned int cpu);
66extern void sh73a0_smp_prepare_cpus(void);
67
Kuninori Morimoto6c01ba42011-11-10 18:45:52 -080068extern void r8a7740_init_irq(void);
Magnus Dammd3ab7222012-02-29 21:37:35 +090069extern void r8a7740_map_io(void);
Kuninori Morimoto6c01ba42011-11-10 18:45:52 -080070extern void r8a7740_add_early_devices(void);
71extern void r8a7740_add_standard_devices(void);
72extern void r8a7740_clock_init(u8 md_ck);
73extern void r8a7740_pinmux_init(void);
74
Magnus Dammf411fad2011-12-14 01:36:12 +090075extern void r8a7779_init_irq(void);
Magnus Damm3e353b872012-02-29 21:37:43 +090076extern void r8a7779_map_io(void);
Magnus Dammf411fad2011-12-14 01:36:12 +090077extern void r8a7779_add_early_devices(void);
78extern void r8a7779_add_standard_devices(void);
79extern void r8a7779_clock_init(void);
Magnus Damm19c43fc2011-12-14 01:36:22 +090080extern void r8a7779_pinmux_init(void);
Magnus Damma662c082012-01-10 15:50:01 +090081extern void r8a7779_pm_init(void);
Kuninori Morimotod49679e2012-06-12 02:36:21 -070082extern void r8a7740_meram_workaround(void);
Magnus Dammf411fad2011-12-14 01:36:12 +090083
Magnus Dammf40aaf62012-01-10 17:44:39 +090084extern unsigned int r8a7779_get_core_count(void);
85extern int r8a7779_platform_cpu_kill(unsigned int cpu);
86extern void r8a7779_secondary_init(unsigned int cpu);
87extern int r8a7779_boot_secondary(unsigned int cpu);
88extern void r8a7779_smp_prepare_cpus(void);
Magnus Dammb759bd12012-05-10 14:57:22 +090089extern void r8a7779_register_twd(void);
Magnus Dammf40aaf62012-01-10 17:44:39 +090090
Shawn Guo21cc1b72012-04-26 21:58:41 +080091#ifdef CONFIG_SUSPEND
92int shmobile_suspend_init(void);
93#else
94static inline int shmobile_suspend_init(void) { return 0; }
95#endif
96
97#ifdef CONFIG_CPU_IDLE
98int shmobile_cpuidle_init(void);
99#else
100static inline int shmobile_cpuidle_init(void) { return 0; }
101#endif
102
Rafael J. Wysocki35f2b0b2012-08-15 20:57:27 +0200103static inline void shmobile_init_late(void)
104{
105 shmobile_suspend_init();
106 shmobile_cpuidle_init();
107}
108
Magnus Dammc793c1b2010-02-05 11:14:49 +0000109#endif /* __ARCH_MACH_COMMON_H */