blob: 81135cd88e542e9c91187a866f5bf7d5a9f15415 [file] [log] [blame]
Binghua Duan02c981c2011-07-08 17:40:12 +08001/*
2 * This file contains common function prototypes to avoid externs in the c files.
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_PRIMA2_COMMON_H__
10#define __MACH_PRIMA2_COMMON_H__
11
12#include <linux/init.h>
13#include <asm/mach/time.h>
Barry Songf2a94192012-12-20 19:11:18 +080014#include <asm/exception.h>
Binghua Duan02c981c2011-07-08 17:40:12 +080015
Arnd Bergmanncf82e0e2013-03-19 17:45:37 +010016#define SIRFSOC_VA_BASE _AC(0xFEC00000, UL)
17#define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000))
18
Barry Song4898de32012-12-20 19:37:32 +080019extern struct smp_operations sirfsoc_smp_ops;
20extern void sirfsoc_secondary_startup(void);
21extern void sirfsoc_cpu_die(unsigned int cpu);
Binghua Duan02c981c2011-07-08 17:40:12 +080022
23extern void __init sirfsoc_of_irq_init(void);
24extern void __init sirfsoc_of_clk_init(void);
Russell King125c4032011-11-05 10:23:27 +000025extern void sirfsoc_restart(char, const char *);
Barry Songf2a94192012-12-20 19:11:18 +080026extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
Binghua Duan02c981c2011-07-08 17:40:12 +080027
Barry Song31adb062011-07-08 02:40:13 -070028#ifndef CONFIG_DEBUG_LL
29static inline void sirfsoc_map_lluart(void) {}
30#else
31extern void __init sirfsoc_map_lluart(void);
32#endif
33
Barry Song4898de32012-12-20 19:37:32 +080034#ifndef CONFIG_SMP
35static inline void sirfsoc_map_scu(void) {}
36#else
37extern void sirfsoc_map_scu(void);
38#endif
39
Shawn Guoa4b46742012-04-26 20:51:36 +080040#ifdef CONFIG_SUSPEND
41extern int sirfsoc_pm_init(void);
42#else
43static inline int sirfsoc_pm_init(void) { return 0; }
44#endif
45
Binghua Duan02c981c2011-07-08 17:40:12 +080046#endif