Commit | Line | Data |
---|---|---|
9920eca8 SS |
1 | /* |
2 | * OMAP44xx and 54xx PRM common functions | |
3 | * | |
4 | * Copyright (C) 2009-2013 Texas Instruments, Inc. | |
5 | * Copyright (C) 2009-2010 Nokia Corporation | |
6 | * | |
7 | * Paul Walmsley (paul@pwsan.com) | |
8 | * Rajendra Nayak (rnayak@ti.com) | |
9 | * Benoit Cousson (b-cousson@ti.com) | |
10 | * | |
11 | * This file is automatically generated from the OMAP hardware databases. | |
12 | * We respectfully ask that any modifications to this file be coordinated | |
13 | * with the public linux-omap@vger.kernel.org mailing list and the | |
14 | * authors above to ensure that the autogeneration scripts are kept | |
15 | * up-to-date with the file contents. | |
16 | * | |
17 | * This program is free software; you can redistribute it and/or modify | |
18 | * it under the terms of the GNU General Public License version 2 as | |
19 | * published by the Free Software Foundation. | |
20 | * | |
21 | */ | |
22 | ||
23 | #ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H | |
24 | #define __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H | |
25 | ||
26 | /* Function prototypes */ | |
27 | #ifndef __ASSEMBLER__ | |
28 | ||
29 | extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx); | |
30 | extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx); | |
31 | extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx); | |
32 | ||
33 | /* OMAP4/OMAP5-specific VP functions */ | |
34 | u32 omap4_prm_vp_check_txdone(u8 vp_id); | |
35 | void omap4_prm_vp_clear_txdone(u8 vp_id); | |
36 | ||
37 | /* | |
38 | * OMAP4/OMAP5 access functions for voltage controller (VC) and | |
39 | * voltage proccessor (VP) in the PRM. | |
40 | */ | |
41 | extern u32 omap4_prm_vcvp_read(u8 offset); | |
42 | extern void omap4_prm_vcvp_write(u32 val, u8 offset); | |
43 | extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); | |
44 | ||
26273e02 | 45 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ |
cae26f31 | 46 | defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX) |
30a69ef7 TL |
47 | void omap44xx_prm_reconfigure_io_chain(void); |
48 | #else | |
49 | static inline void omap44xx_prm_reconfigure_io_chain(void) | |
50 | { | |
51 | } | |
52 | #endif | |
9920eca8 SS |
53 | |
54 | /* PRM interrupt-related functions */ | |
55 | extern void omap44xx_prm_read_pending_irqs(unsigned long *events); | |
56 | extern void omap44xx_prm_ocp_barrier(void); | |
57 | extern void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask); | |
58 | extern void omap44xx_prm_restore_irqen(u32 *saved_mask); | |
59 | ||
60 | extern int __init omap44xx_prm_init(void); | |
61 | extern u32 omap44xx_prm_get_reset_sources(void); | |
62 | ||
63 | #endif | |
64 | ||
65 | #endif |