OMAP: hwmod: separate list locking and hwmod hardware locking
Currently omap_hwmod_mutex is being used to protect both the list access/modification and concurrent access to hwmod functions. This patch separates these two types of locking. First, omap_hwmod_mutex is used only to protect access and modification of omap_hwmod_list. Also cleaned up some comments referring to this mutex that are no longer needed. Then, for protecting concurrent access to hwmod functions, use a per-hwmod mutex. This protects concurrent access to a single hwmod, but would allow concurrent access to different hwmods. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> [paul@pwsan.com: added structure documentation; changed mutex variable name] Signed-off-by: Paul Walmsley <paul@pwsan.com>
This commit is contained in:
parent
ff4d3e186b
commit
12b1fdb45c
2 changed files with 33 additions and 32 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <plat/cpu.h>
|
||||
|
||||
struct omap_device;
|
||||
|
@ -433,6 +434,7 @@ struct omap_hwmod_class {
|
|||
* @_state: internal-use hwmod state
|
||||
* @flags: hwmod flags (documented below)
|
||||
* @omap_chip: OMAP chips this hwmod is present on
|
||||
* @_mutex: mutex serializing operations on this hwmod
|
||||
* @node: list node for hwmod list (internal use)
|
||||
*
|
||||
* @main_clk refers to this module's "main clock," which for our
|
||||
|
@ -461,6 +463,7 @@ struct omap_hwmod {
|
|||
void *dev_attr;
|
||||
u32 _sysc_cache;
|
||||
void __iomem *_mpu_rt_va;
|
||||
struct mutex _mutex;
|
||||
struct list_head node;
|
||||
u16 flags;
|
||||
u8 _mpu_port_index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue