blob: f80f9c549393e14e1c5c35673ab0707d7c641eed [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,
Marc Zyngiera62580e2011-09-08 13:15:22 +01007 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 Damm83ca5c82010-05-20 14:45:03 +000011struct clk;
Magnus Damm6b6a4c02012-02-29 21:41:30 +090012extern int shmobile_clk_init(void);
Magnus Damm863b1712010-12-28 08:27:01 +000013extern void shmobile_handle_irq_intc(struct pt_regs *);
Magnus Dammc3dada12011-04-29 02:23:28 +090014extern struct platform_suspend_ops shmobile_suspend_ops;
Magnus Dammb73b5c42011-11-11 14:01:30 +090015struct cpuidle_driver;
Magnus Damm0af48172011-04-29 02:36:07 +090016extern void (*shmobile_cpuidle_modes[])(void);
Magnus Dammb73b5c42011-11-11 14:01:30 +090017extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
Magnus Damme47bb512010-05-12 14:21:24 +000018
Magnus Dammc793c1b2010-02-05 11:14:49 +000019extern void sh7367_init_irq(void);
Magnus Damm237caf92012-02-29 21:37:04 +090020extern void sh7367_map_io(void);
Magnus Dammc793c1b2010-02-05 11:14:49 +000021extern void sh7367_add_early_devices(void);
22extern void sh7367_add_standard_devices(void);
23extern void sh7367_clock_init(void);
Magnus Damm7fdda672010-02-10 20:10:55 +090024extern void sh7367_pinmux_init(void);
Magnus Damm4f0836b2010-05-20 14:49:28 +000025extern struct clk sh7367_extalb1_clk;
26extern struct clk sh7367_extal2_clk;
Magnus Dammc793c1b2010-02-05 11:14:49 +000027
Magnus Dammf2aaf662010-02-05 11:15:07 +000028extern void sh7377_init_irq(void);
Magnus Dammbfc46f32012-02-29 21:37:12 +090029extern void sh7377_map_io(void);
Magnus Dammf2aaf662010-02-05 11:15:07 +000030extern void sh7377_add_early_devices(void);
31extern void sh7377_add_standard_devices(void);
Magnus Damm0163acf2010-05-21 05:19:34 +000032extern void sh7377_clock_init(void);
NISHIMOTO Hiroki276b4f62010-02-12 08:10:06 +000033extern void sh7377_pinmux_init(void);
Magnus Damm0163acf2010-05-21 05:19:34 +000034extern struct clk sh7377_extalc1_clk;
35extern struct clk sh7377_extal2_clk;
Magnus Dammf2aaf662010-02-05 11:15:07 +000036
Magnus Damm2b7eda62010-02-05 11:14:58 +000037extern void sh7372_init_irq(void);
Magnus Damm5d7220ec2012-02-29 21:37:19 +090038extern void sh7372_map_io(void);
Magnus Damm2b7eda62010-02-05 11:14:58 +000039extern void sh7372_add_early_devices(void);
40extern void sh7372_add_standard_devices(void);
Magnus Damm495b3ce2010-05-12 14:21:34 +000041extern void sh7372_clock_init(void);
Kuninori Morimotob789b3f2010-02-17 09:39:10 +000042extern void sh7372_pinmux_init(void);
Magnus Damm97991652011-04-29 02:28:08 +090043extern void sh7372_pm_init(void);
Magnus Dammf7dadb32011-12-23 01:23:07 +010044extern void sh7372_resume_core_standby_sysc(void);
45extern int sh7372_do_idle_sysc(unsigned long sleep_mode);
Magnus Damm83ca5c82010-05-20 14:45:03 +000046extern struct clk sh7372_extal1_clk;
47extern struct clk sh7372_extal2_clk;
Magnus Damm2b7eda62010-02-05 11:14:58 +000048
Magnus Damm5f53a562010-12-21 08:37:32 +000049extern void sh73a0_init_irq(void);
Magnus Damm50e15c32012-02-29 21:37:27 +090050extern void sh73a0_map_io(void);
Magnus Damm6d9598e2010-11-17 10:59:31 +000051extern void sh73a0_add_early_devices(void);
52extern void sh73a0_add_standard_devices(void);
53extern void sh73a0_clock_init(void);
Takashi YOSHII1cdf3702010-11-19 16:47:16 +090054extern void sh73a0_pinmux_init(void);
Magnus Dammf6d84f42010-12-03 07:22:31 +000055extern struct clk sh73a0_extal1_clk;
56extern struct clk sh73a0_extal2_clk;
Kuninori Morimotod4775352011-12-05 22:29:15 -080057extern struct clk sh73a0_extcki_clk;
58extern struct clk sh73a0_extalr_clk;
Magnus Damm6d9598e2010-11-17 10:59:31 +000059
Kuninori Morimoto6c01ba42011-11-10 18:45:52 -080060extern void r8a7740_init_irq(void);
Magnus Dammd3ab7222012-02-29 21:37:35 +090061extern void r8a7740_map_io(void);
Kuninori Morimoto6c01ba42011-11-10 18:45:52 -080062extern void r8a7740_add_early_devices(void);
63extern void r8a7740_add_standard_devices(void);
64extern void r8a7740_clock_init(u8 md_ck);
65extern void r8a7740_pinmux_init(void);
66
Magnus Dammf411fad2011-12-14 01:36:12 +090067extern void r8a7779_init_irq(void);
Magnus Damm3e353b872012-02-29 21:37:43 +090068extern void r8a7779_map_io(void);
Magnus Dammf411fad2011-12-14 01:36:12 +090069extern void r8a7779_add_early_devices(void);
70extern void r8a7779_add_standard_devices(void);
71extern void r8a7779_clock_init(void);
Magnus Damm19c43fc2011-12-14 01:36:22 +090072extern void r8a7779_pinmux_init(void);
Magnus Damma662c082012-01-10 15:50:01 +090073extern void r8a7779_pm_init(void);
Kuninori Morimotod49679e2012-06-12 02:36:21 -070074extern void r8a7740_meram_workaround(void);
Magnus Dammf411fad2011-12-14 01:36:12 +090075
Magnus Dammb759bd12012-05-10 14:57:22 +090076extern void r8a7779_register_twd(void);
Magnus Dammf40aaf62012-01-10 17:44:39 +090077
Shawn Guo21cc1b72012-04-26 21:58:41 +080078extern void shmobile_init_late(void);
79
80#ifdef CONFIG_SUSPEND
81int shmobile_suspend_init(void);
82#else
83static inline int shmobile_suspend_init(void) { return 0; }
84#endif
85
86#ifdef CONFIG_CPU_IDLE
87int shmobile_cpuidle_init(void);
88#else
89static inline int shmobile_cpuidle_init(void) { return 0; }
90#endif
91
Marc Zyngiera62580e2011-09-08 13:15:22 +010092extern void shmobile_cpu_die(unsigned int cpu);
93extern int shmobile_cpu_disable(unsigned int cpu);
94
95#ifdef CONFIG_HOTPLUG_CPU
96extern int shmobile_cpu_is_dead(unsigned int cpu);
97#else
98static inline int shmobile_cpu_is_dead(unsigned int cpu) { return 1; }
99#endif
100
101extern void shmobile_smp_init_cpus(unsigned int ncores);
102
Magnus Dammc793c1b2010-02-05 11:14:49 +0000103#endif /* __ARCH_MACH_COMMON_H */