Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 2 | /* |
| 3 | * OMAP4 Power/Reset Management (PRM) function prototypes |
| 4 | * |
| 5 | * Copyright (C) 2010 Nokia Corporation |
Benoit Cousson | eaac329 | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 6 | * Copyright (C) 2011 Texas Instruments, Inc. |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 7 | * Paul Walmsley |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 8 | */ |
| 9 | #ifndef __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H |
| 10 | #define __ARCH_ASM_MACH_OMAP2_PRMINST44XX_H |
| 11 | |
Nishanth Menon | e3002d1 | 2014-05-22 14:53:54 -0500 | [diff] [blame] | 12 | #define PRM_INSTANCE_UNKNOWN -1 |
| 13 | extern s32 omap4_prmst_get_prm_dev_inst(void); |
Tero Kristo | 48e0c11 | 2014-09-08 11:29:43 +0300 | [diff] [blame] | 14 | void omap4_prminst_set_prm_dev_inst(s32 dev_inst); |
Nishanth Menon | e3002d1 | 2014-05-22 14:53:54 -0500 | [diff] [blame] | 15 | |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 16 | /* |
| 17 | * In an ideal world, we would not export these low-level functions, |
| 18 | * but this will probably take some time to fix properly |
| 19 | */ |
| 20 | extern u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx); |
| 21 | extern void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx); |
| 22 | extern u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, |
Benoit Cousson | eaac329 | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 23 | s16 inst, u16 idx); |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 24 | |
Benoit Cousson | e54433f | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 25 | extern void omap4_prminst_global_warm_sw_reset(void); |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 26 | |
Benoit Cousson | eaac329 | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 27 | extern int omap4_prminst_is_hardreset_asserted(u8 shift, u8 part, s16 inst, |
Benoit Cousson | e54433f | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 28 | u16 rstctrl_offs); |
Benoit Cousson | eaac329 | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 29 | extern int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst, |
Benoit Cousson | e54433f | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 30 | u16 rstctrl_offs); |
Tero Kristo | 37fb59d | 2014-10-27 08:39:25 -0700 | [diff] [blame] | 31 | int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, |
| 32 | s16 inst, u16 rstctrl_offs, |
| 33 | u16 rstst_offs); |
Benoit Cousson | eaac329 | 2011-07-10 05:56:31 -0600 | [diff] [blame] | 34 | |
Paul Walmsley | d9a16f9 | 2012-10-29 20:57:39 -0600 | [diff] [blame] | 35 | extern void omap_prm_base_init(void); |
| 36 | |
Paul Walmsley | 2ace831 | 2010-12-21 21:05:14 -0700 | [diff] [blame] | 37 | #endif |