blob: e7c85a9a472e4d66dbbec60b0f9b51f44399e463 [file] [log] [blame]
Santosh Shilimkarfbc9be12010-05-14 12:05:26 -07001/*
2 * omap4-common.h: OMAP4 specific common header file
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 *
6 * Author:
7 * Santosh Shilimkar <santosh.shilimkar@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef OMAP_ARCH_OMAP4_COMMON_H
14#define OMAP_ARCH_OMAP4_COMMON_H
15
Santosh Shilimkar7d35b8d2010-08-02 13:18:19 +030016/*
17 * wfi used in low power code. Directly opcode is used instead
18 * of instruction to avoid mulit-omap build break
19 */
Dave Martin85243a72011-03-04 15:33:53 +000020#ifdef CONFIG_THUMB2_KERNEL
21#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
22#else
Santosh Shilimkar7d35b8d2010-08-02 13:18:19 +030023#define do_wfi() \
24 __asm__ __volatile__ (".word 0xe320f003" : : : "memory")
Dave Martin85243a72011-03-04 15:33:53 +000025#endif
Santosh Shilimkar7d35b8d2010-08-02 13:18:19 +030026
Santosh Shilimkarfbc9be12010-05-14 12:05:26 -070027#ifdef CONFIG_CACHE_L2X0
28extern void __iomem *l2cache_base;
29#endif
30
Santosh Shilimkarfbc9be12010-05-14 12:05:26 -070031extern void __init gic_init_irq(void);
32extern void omap_smc1(u32 fn, u32 arg);
33
Santosh Shilimkar43b3e182011-04-04 09:32:46 +010034#ifdef CONFIG_SMP
35/* Needed for secondary core boot */
36extern void omap_secondary_startup(void);
37extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
38extern void omap_auxcoreboot_addr(u32 cpu_addr);
39extern u32 omap_read_auxcoreboot0(void);
40#endif
Santosh Shilimkarfbc9be12010-05-14 12:05:26 -070041#endif