Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 1 | #ifndef __ARCH_MACH_COMMON_H |
| 2 | #define __ARCH_MACH_COMMON_H |
| 3 | |
Magnus Damm | 08ad42f | 2012-03-06 17:36:14 +0900 | [diff] [blame] | 4 | extern void shmobile_earlytimer_init(void); |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 5 | extern struct sys_timer shmobile_timer; |
Magnus Damm | 0f2c9f2 | 2012-03-28 19:22:30 +0900 | [diff] [blame] | 6 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, |
| 7 | unsigned int mult, unsigned int div); |
Marc Zyngier | 4200b16 | 2012-01-10 19:44:19 +0000 | [diff] [blame] | 8 | struct twd_local_timer; |
Magnus Damm | 4ae04ac | 2010-02-08 11:02:54 +0000 | [diff] [blame] | 9 | extern void shmobile_setup_console(void); |
Magnus Damm | 1c51ed4 | 2010-12-14 16:56:55 +0900 | [diff] [blame] | 10 | extern void shmobile_secondary_vector(void); |
Magnus Damm | 8b30679 | 2011-12-28 16:47:16 +0900 | [diff] [blame] | 11 | extern int shmobile_platform_cpu_kill(unsigned int cpu); |
Magnus Damm | 83ca5c8 | 2010-05-20 14:45:03 +0000 | [diff] [blame] | 12 | struct clk; |
Magnus Damm | 6b6a4c0 | 2012-02-29 21:41:30 +0900 | [diff] [blame] | 13 | extern int shmobile_clk_init(void); |
Magnus Damm | 863b171 | 2010-12-28 08:27:01 +0000 | [diff] [blame] | 14 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
Magnus Damm | c3dada1 | 2011-04-29 02:23:28 +0900 | [diff] [blame] | 15 | extern struct platform_suspend_ops shmobile_suspend_ops; |
Magnus Damm | b73b5c4 | 2011-11-11 14:01:30 +0900 | [diff] [blame] | 16 | struct cpuidle_driver; |
Rafael J. Wysocki | 5b41147 | 2012-08-15 20:58:19 +0200 | [diff] [blame^] | 17 | struct cpuidle_device; |
| 18 | extern int shmobile_enter_wfi(struct cpuidle_device *dev, |
| 19 | struct cpuidle_driver *drv, int index); |
| 20 | extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); |
Magnus Damm | e47bb51 | 2010-05-12 14:21:24 +0000 | [diff] [blame] | 21 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 22 | extern void sh7367_init_irq(void); |
Magnus Damm | 237caf9 | 2012-02-29 21:37:04 +0900 | [diff] [blame] | 23 | extern void sh7367_map_io(void); |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 24 | extern void sh7367_add_early_devices(void); |
| 25 | extern void sh7367_add_standard_devices(void); |
| 26 | extern void sh7367_clock_init(void); |
Magnus Damm | 7fdda67 | 2010-02-10 20:10:55 +0900 | [diff] [blame] | 27 | extern void sh7367_pinmux_init(void); |
Magnus Damm | 4f0836b | 2010-05-20 14:49:28 +0000 | [diff] [blame] | 28 | extern struct clk sh7367_extalb1_clk; |
| 29 | extern struct clk sh7367_extal2_clk; |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 30 | |
Magnus Damm | f2aaf66 | 2010-02-05 11:15:07 +0000 | [diff] [blame] | 31 | extern void sh7377_init_irq(void); |
Magnus Damm | bfc46f3 | 2012-02-29 21:37:12 +0900 | [diff] [blame] | 32 | extern void sh7377_map_io(void); |
Magnus Damm | f2aaf66 | 2010-02-05 11:15:07 +0000 | [diff] [blame] | 33 | extern void sh7377_add_early_devices(void); |
| 34 | extern void sh7377_add_standard_devices(void); |
Magnus Damm | 0163acf | 2010-05-21 05:19:34 +0000 | [diff] [blame] | 35 | extern void sh7377_clock_init(void); |
NISHIMOTO Hiroki | 276b4f6 | 2010-02-12 08:10:06 +0000 | [diff] [blame] | 36 | extern void sh7377_pinmux_init(void); |
Magnus Damm | 0163acf | 2010-05-21 05:19:34 +0000 | [diff] [blame] | 37 | extern struct clk sh7377_extalc1_clk; |
| 38 | extern struct clk sh7377_extal2_clk; |
Magnus Damm | f2aaf66 | 2010-02-05 11:15:07 +0000 | [diff] [blame] | 39 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 40 | extern void sh7372_init_irq(void); |
Magnus Damm | 5d7220ec | 2012-02-29 21:37:19 +0900 | [diff] [blame] | 41 | extern void sh7372_map_io(void); |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 42 | extern void sh7372_add_early_devices(void); |
| 43 | extern void sh7372_add_standard_devices(void); |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame] | 44 | extern void sh7372_clock_init(void); |
Kuninori Morimoto | b789b3f | 2010-02-17 09:39:10 +0000 | [diff] [blame] | 45 | extern void sh7372_pinmux_init(void); |
Magnus Damm | 9799165 | 2011-04-29 02:28:08 +0900 | [diff] [blame] | 46 | extern void sh7372_pm_init(void); |
Magnus Damm | f7dadb3 | 2011-12-23 01:23:07 +0100 | [diff] [blame] | 47 | extern void sh7372_resume_core_standby_sysc(void); |
| 48 | extern int sh7372_do_idle_sysc(unsigned long sleep_mode); |
Magnus Damm | 83ca5c8 | 2010-05-20 14:45:03 +0000 | [diff] [blame] | 49 | extern struct clk sh7372_extal1_clk; |
| 50 | extern struct clk sh7372_extal2_clk; |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 51 | |
Magnus Damm | 5f53a56 | 2010-12-21 08:37:32 +0000 | [diff] [blame] | 52 | extern void sh73a0_init_irq(void); |
Magnus Damm | 50e15c3 | 2012-02-29 21:37:27 +0900 | [diff] [blame] | 53 | extern void sh73a0_map_io(void); |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 54 | extern void sh73a0_add_early_devices(void); |
| 55 | extern void sh73a0_add_standard_devices(void); |
| 56 | extern void sh73a0_clock_init(void); |
Takashi YOSHII | 1cdf370 | 2010-11-19 16:47:16 +0900 | [diff] [blame] | 57 | extern void sh73a0_pinmux_init(void); |
Magnus Damm | f6d84f4 | 2010-12-03 07:22:31 +0000 | [diff] [blame] | 58 | extern struct clk sh73a0_extal1_clk; |
| 59 | extern struct clk sh73a0_extal2_clk; |
Kuninori Morimoto | d477535 | 2011-12-05 22:29:15 -0800 | [diff] [blame] | 60 | extern struct clk sh73a0_extcki_clk; |
| 61 | extern struct clk sh73a0_extalr_clk; |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 62 | |
Magnus Damm | 72f4d57 | 2010-12-14 16:57:11 +0900 | [diff] [blame] | 63 | extern unsigned int sh73a0_get_core_count(void); |
| 64 | extern void sh73a0_secondary_init(unsigned int cpu); |
| 65 | extern int sh73a0_boot_secondary(unsigned int cpu); |
| 66 | extern void sh73a0_smp_prepare_cpus(void); |
| 67 | |
Kuninori Morimoto | 6c01ba4 | 2011-11-10 18:45:52 -0800 | [diff] [blame] | 68 | extern void r8a7740_init_irq(void); |
Magnus Damm | d3ab722 | 2012-02-29 21:37:35 +0900 | [diff] [blame] | 69 | extern void r8a7740_map_io(void); |
Kuninori Morimoto | 6c01ba4 | 2011-11-10 18:45:52 -0800 | [diff] [blame] | 70 | extern void r8a7740_add_early_devices(void); |
| 71 | extern void r8a7740_add_standard_devices(void); |
| 72 | extern void r8a7740_clock_init(u8 md_ck); |
| 73 | extern void r8a7740_pinmux_init(void); |
| 74 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 75 | extern void r8a7779_init_irq(void); |
Magnus Damm | 3e353b87 | 2012-02-29 21:37:43 +0900 | [diff] [blame] | 76 | extern void r8a7779_map_io(void); |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 77 | extern void r8a7779_add_early_devices(void); |
| 78 | extern void r8a7779_add_standard_devices(void); |
| 79 | extern void r8a7779_clock_init(void); |
Magnus Damm | 19c43fc | 2011-12-14 01:36:22 +0900 | [diff] [blame] | 80 | extern void r8a7779_pinmux_init(void); |
Magnus Damm | a662c08 | 2012-01-10 15:50:01 +0900 | [diff] [blame] | 81 | extern void r8a7779_pm_init(void); |
Kuninori Morimoto | d49679e | 2012-06-12 02:36:21 -0700 | [diff] [blame] | 82 | extern void r8a7740_meram_workaround(void); |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 83 | |
Magnus Damm | f40aaf6 | 2012-01-10 17:44:39 +0900 | [diff] [blame] | 84 | extern unsigned int r8a7779_get_core_count(void); |
| 85 | extern int r8a7779_platform_cpu_kill(unsigned int cpu); |
| 86 | extern void r8a7779_secondary_init(unsigned int cpu); |
| 87 | extern int r8a7779_boot_secondary(unsigned int cpu); |
| 88 | extern void r8a7779_smp_prepare_cpus(void); |
Magnus Damm | b759bd1 | 2012-05-10 14:57:22 +0900 | [diff] [blame] | 89 | extern void r8a7779_register_twd(void); |
Magnus Damm | f40aaf6 | 2012-01-10 17:44:39 +0900 | [diff] [blame] | 90 | |
Shawn Guo | 21cc1b7 | 2012-04-26 21:58:41 +0800 | [diff] [blame] | 91 | #ifdef CONFIG_SUSPEND |
| 92 | int shmobile_suspend_init(void); |
| 93 | #else |
| 94 | static inline int shmobile_suspend_init(void) { return 0; } |
| 95 | #endif |
| 96 | |
| 97 | #ifdef CONFIG_CPU_IDLE |
| 98 | int shmobile_cpuidle_init(void); |
| 99 | #else |
| 100 | static inline int shmobile_cpuidle_init(void) { return 0; } |
| 101 | #endif |
| 102 | |
Rafael J. Wysocki | 35f2b0b | 2012-08-15 20:57:27 +0200 | [diff] [blame] | 103 | static inline void shmobile_init_late(void) |
| 104 | { |
| 105 | shmobile_suspend_init(); |
| 106 | shmobile_cpuidle_init(); |
| 107 | } |
| 108 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 109 | #endif /* __ARCH_MACH_COMMON_H */ |