linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] omap:hwspinlock support-omap4
@ 2010-07-19 16:50 Hari Kanigeri
  2010-07-19 16:50 ` [PATCH 1/5] omap:hwmod-hwspinlock-enable Hari Kanigeri
                   ` (5 more replies)
  0 siblings, 6 replies; 33+ messages in thread
From: Hari Kanigeri @ 2010-07-19 16:50 UTC (permalink / raw)
  To: Linux Omap, Tony Lindgren
  Cc: Santosh Shilimkar, Cousson Benoit, Simon Que, Hari Kanigeri

Resending the hwspinlock patch Simon Que sent few days ago by splitting
the patch into logical pieces. The first 4 patches are based on Simon's
patch.
https://patchwork.kernel.org/patch/110672/

The 5th patch is a new patch to address race condition issue with
I2C driver usage.


Created driver for OMAP hardware spinlock.  This driver supports:
- Reserved spinlocks for internal use
- Dynamic allocation of unreserved locks
- Lock, unlock, and trylock functions, with or without disabling irqs/preempt
- Registered as a platform device driver

The device initialization uses hwmod to configure the devices.
One device will be created for each IP.
It will pass spinlock register offset info to the driver.
The device initialization file is:
                arch/arm/mach-omap2/hwspinlocks.c

The driver takes in register offset info passed in device initialization.
It uses hwmod to obtain the base address of the hardware spinlock module.
Then it reads info from the registers.
The function hwspinlock_probe() initializes the array of spinlock structures,
each containing a spinlock register address calculated from the base address
and lock offsets.  The device driver file is:
                arch/arm/plat-omap/hwspinlock.c

Here's an API summary:
int hwspinlock_lock(struct hwspinlock *);
        Attempt to lock a hardware spinlock.  If it is busy, the function will
        keep trying until it succeeds.  This is a blocking function.
int hwspinlock_trylock(struct hwspinlock *);
        Attempt to lock a hardware spinlock.  If it is busy, the function will
        return BUSY.  If it succeeds in locking, the function will return
        ACQUIRED.  This is a non-blocking function.
int hwspinlock_unlock(struct hwspinlock *);
        Unlock a hardware spinlock.

struct hwspinlock *hwspinlock_request(void);
        Provides for "dynamic allocation" of a hardware spinlock.  It returns
        the handle to the next available (unallocated) spinlock.  If no more
        locks are available, it returns NULL.
struct hwspinlock *hwspinlock_request_specific(unsigned int);
        Provides for "static allocation" of a specific hardware spinlock. This
        allows the system to use a specific spinlock, identified by an ID. If
        the ID is invalid or if the desired lock is already allocated, this
        will return NULL.  Otherwise it returns a spinlock handle.
int hwspinlock_free(struct hwspinlock *);
        Frees an allocated hardware spinlock (either reserved or unreserved).

Hari Kanigeri (1):
  omap:hwspinlocks-ensure the order of registration

Simon Que (4):
  omap:hwmod-hwspinlock-enable
  omap:hwspinlock-define HWSPINLOCK base address
  omap:hwspinlock-added hwspinlock driver
  omap:hwspinlock-add build support

 arch/arm/mach-omap2/Makefile                 |    2 +
 arch/arm/mach-omap2/hwspinlocks.c            |   70 ++++++
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c   |    2 +-
 arch/arm/plat-omap/Makefile                  |    2 +
 arch/arm/plat-omap/hwspinlock.c              |  334 ++++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/hwspinlock.h |   29 +++
 arch/arm/plat-omap/include/plat/omap44xx.h   |    5 +
 7 files changed, 443 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/hwspinlocks.c
 create mode 100644 arch/arm/plat-omap/hwspinlock.c
 create mode 100644 arch/arm/plat-omap/include/plat/hwspinlock.h


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2010-08-12  2:02 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 16:50 [PATCH 0/5] omap:hwspinlock support-omap4 Hari Kanigeri
2010-07-19 16:50 ` [PATCH 1/5] omap:hwmod-hwspinlock-enable Hari Kanigeri
2010-07-27 15:57   ` Premi, Sanjeev
2010-07-27 16:05     ` Cousson, Benoit
2010-07-19 16:50 ` [PATCH 2/5] omap:hwspinlock-define HWSPINLOCK base address Hari Kanigeri
2010-07-27 15:59   ` Premi, Sanjeev
2010-07-27 16:50     ` Kanigeri, Hari
2010-07-28 14:11       ` Premi, Sanjeev
2010-07-28 14:22         ` Kanigeri, Hari
2010-07-28 14:33           ` Premi, Sanjeev
2010-07-28 14:55             ` Kanigeri, Hari
2010-07-19 16:50 ` [PATCH 3/5] omap:hwspinlock-added hwspinlock driver Hari Kanigeri
2010-07-24 16:43   ` Cousson, Benoit
2010-07-26 20:39     ` Kanigeri, Hari
2010-07-28 16:58   ` Premi, Sanjeev
2010-07-29  4:56     ` Marathe, Yogesh
2010-07-29 13:14       ` Kanigeri, Hari
2010-07-29 13:23         ` Cousson, Benoit
2010-07-30  6:53         ` Marathe, Yogesh
2010-08-02  1:55           ` Kanigeri, Hari
2010-07-29 13:29     ` Kanigeri, Hari
2010-07-29 14:05   ` Nishanth Menon
2010-08-11 22:03     ` Que, Simon
2010-08-12  2:02       ` linux hardware spinlock framework for heterogeneous processor SOCs? Nishanth Menon
2010-07-19 16:50 ` [PATCH 4/5] omap:hwspinlock-add build support Hari Kanigeri
2010-07-19 16:50 ` [PATCH 5/5] omap:hwspinlocks-ensure the order of registration Hari Kanigeri
2010-07-28 17:00   ` Premi, Sanjeev
2010-07-28 17:05     ` Kanigeri, Hari
2010-07-20  5:37 ` [PATCH 0/5] omap:hwspinlock support-omap4 Shilimkar, Santosh
2010-07-20 14:12   ` Kanigeri, Hari
2010-07-24 15:04     ` Cousson, Benoit
2010-07-24 15:35       ` Shilimkar, Santosh
2010-07-24 15:47         ` Cousson, Benoit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).