Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
prm33xx.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "prm33xx.h"
#include "prm-regbits-33xx.h"

Go to the source code of this file.

Functions

u32 am33xx_prm_read_reg (s16 inst, u16 idx)
 
void am33xx_prm_write_reg (u32 val, s16 inst, u16 idx)
 
u32 am33xx_prm_rmw_reg_bits (u32 mask, u32 bits, s16 inst, s16 idx)
 
int am33xx_prm_is_hardreset_asserted (u8 shift, s16 inst, u16 rstctrl_offs)
 
int am33xx_prm_assert_hardreset (u8 shift, s16 inst, u16 rstctrl_offs)
 
int am33xx_prm_deassert_hardreset (u8 shift, s16 inst, u16 rstctrl_offs, u16 rstst_offs)
 

Function Documentation

int am33xx_prm_assert_hardreset ( u8  shift,
s16  inst,
u16  rstctrl_offs 
)

am33xx_prm_assert_hardreset - assert the HW reset line of a submodule : register bit shift corresponding to the reset line to assert : CM instance register offset (*_INST macro) : RM_RSTCTRL register address for this module

Some IPs like dsp, ipu or iva contain processors that require an HW reset line to be asserted / deasserted in order to fully enable the IP. These modules may have multiple hard-reset lines that reset different 'submodules' inside the IP block. This function will place the submodule into reset. Returns 0 upon success or -EINVAL upon an argument error.

Definition at line 88 of file prm33xx.c.

int am33xx_prm_deassert_hardreset ( u8  shift,
s16  inst,
u16  rstctrl_offs,
u16  rstst_offs 
)

am33xx_prm_deassert_hardreset - deassert a submodule hardreset line and wait : register bit shift corresponding to the reset line to deassert : CM instance register offset (*_INST macro) : RM_RSTCTRL register address for this module : RM_RSTST register address for this module

Some IPs like dsp, ipu or iva contain processors that require an HW reset line to be asserted / deasserted in order to fully enable the IP. These modules may have multiple hard-reset lines that reset different 'submodules' inside the IP block. This function will take the submodule out of reset and wait until the PRCM indicates that the reset has completed before returning. Returns 0 upon success or -EINVAL upon an argument error, -EEXIST if the submodule was already out of reset, or -EBUSY if the submodule did not exit reset promptly.

Definition at line 114 of file prm33xx.c.

int am33xx_prm_is_hardreset_asserted ( u8  shift,
s16  inst,
u16  rstctrl_offs 
)

am33xx_prm_is_hardreset_asserted - read the HW reset line state of submodules contained in the hwmod module : register bit shift corresponding to the reset line to check : CM instance register offset (*_INST macro) : RM_RSTCTRL register address offset for this module

Returns 1 if the (sub)module hardreset line is currently asserted, 0 if the (sub)module hardreset line is not currently asserted, or -EINVAL upon parameter error.

Definition at line 64 of file prm33xx.c.

u32 am33xx_prm_read_reg ( s16  inst,
u16  idx 
)

Definition at line 29 of file prm33xx.c.

u32 am33xx_prm_rmw_reg_bits ( u32  mask,
u32  bits,
s16  inst,
s16  idx 
)

Definition at line 41 of file prm33xx.c.

void am33xx_prm_write_reg ( u32  val,
s16  inst,
u16  idx 
)

Definition at line 35 of file prm33xx.c.