All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Que, Simon" <sque@ti.com>
Cc: "Cousson, Benoit" <b-cousson@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Kanigeri, Hari" <h-kanigeri2@ti.com>,
	Ohad Ben-Cohen <ohad@wizery.com>
Subject: Re: [RFC] omap: hwspinlock: Added hwspinlock driver
Date: Fri, 25 Jun 2010 11:38:00 -0700	[thread overview]
Message-ID: <87ocezklfb.fsf@deeprootsystems.com> (raw)
In-Reply-To: <F39349C6FA641B4A831B7BF4EBF4D4E14728E3B0@dlee03.ent.ti.com> (Simon Que's message of "Fri, 25 Jun 2010 13:13:35 -0500")

"Que, Simon" <sque@ti.com> writes:

[...]

>> Why using a Kconfig option in that case? You can reserve the locks at
>> run time based on other driver request. The goal of the hwspinlock is to
>> protect data shared between various processors inside OMAP4 like ipu,
>> iva, dsp and mpu. So in anycase the syslink driver can request the
>> needed locks at init time on behalf of the dsp or the ipu.
>> 
>> Since you don't even know the number of locks because it is determined
>> at init time, you cannot know at build time that information.
>> 
>> You should add an API to reserve some locks at run time instead of doing
>> that.
>
> The reserved locks are not meant for syslink use only.  It will also
> be used by i2c, which does not go through syslink.  If we were to
> follow your suggestion, who should call the function to establish
> number of reserved locks?  

Board code.

> We can instead think of the config option as requesting a particular
> number of reserved locks for system use, independent of how many locks
> actually exist in the system.  How many reserved locks there are, and
> which driver is using which reserved locks -- that is a system
> integration issue that should be sorted out at a higher level.

Still, Benoit is right.  It should be a run-time decision, not a
compile-time decision, and it could be done by a board file as needed.

Also, you wouldn't even need a new API for this.  Just have the board
code request the specific spinlocks it would like to reserve.

>> 
>> Since it is a new driver for a new IP, why don't you use directly the
>> omap_device / omap_hwmod abstraction?
>
> hwmod for spinlock is not currently ready.  

Then please help get it ready.  We need to work together to get hwmods
ready and validated for all IP blocks.

> We want to integrate with the platform/driver/device system for now,
> as a first step.  hwmod can be implemented later.

As we are now switching to to hwmods, new drivers will not be merged
without hwmod support.

As a starint point, you can base your changes on the pm-wip/hwmods-omap4
branch of my linux-omap-pm git tree[1]

Many other folks are currently working hwmod conversions for several
other drivers using this as a base.  Please help us with that effort.

Thanks,

Kevin

[1] git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git

  reply	other threads:[~2010-06-25 18:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  0:40 [RFC] omap: hwspinlock: Added hwspinlock driver Que, Simon
2010-06-25  8:11 ` Cousson, Benoit
2010-06-25 18:13   ` Que, Simon
2010-06-25 18:38     ` Kevin Hilman [this message]
2010-06-25 21:02     ` Cousson, Benoit
2010-06-25 18:26 ` Pandita, Vikram
2010-06-25 18:33 ` Shilimkar, Santosh
2010-06-25 20:31   ` Que, Simon
2010-06-27  6:58     ` Shilimkar, Santosh
2010-06-29 19:27       ` [RFC v.2] " Que, Simon
2010-06-29 20:54         ` Cousson, Benoit
2010-06-29 21:18         ` Cousson, Benoit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocezklfb.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=b-cousson@ti.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=sque@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.