login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
October
»
19
Re: [PATCH 3/3] omap: add hwspinlock device
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Grant Likely
Subject:
Re: [PATCH 3/3] omap: add hwspinlock device
Date: Tuesday, October 19, 2010 - 10:05 am
On Tue, Oct 19, 2010 at 11:03 AM, Kevin Hilman <khilman@deeprootsystems.com> wrote:
quoted text
> Ohad Ben-Cohen <ohad@wizery.com> writes: > >> From: Simon Que <sque@ti.com> >> >> Build and register an hwspinlock platform device. >> >> Although only OMAP4 supports the hardware spinlock module (for now), >> it is still safe to run this initcall on all omaps, because hwmod lookup >> will simply fail on hwspinlock-less platforms. >> >> Signed-off-by: Simon Que <sque@ti.com> >> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> >> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> >> Cc: Benoit Cousson <b-cousson@ti.com> >> --- >> arch/arm/mach-omap2/Makefile | 1 + >> arch/arm/mach-omap2/hwspinlock.c | 67 ++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 68 insertions(+), 0 deletions(-) >> create mode 100644 arch/arm/mach-omap2/hwspinlock.c >> >> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile >> index 7352412..e55d1c5 100644 >> --- a/arch/arm/mach-omap2/Makefile >> +++ b/arch/arm/mach-omap2/Makefile >> @@ -190,3 +190,4 @@ obj-y += $(smc91x-m) $(smc91x-y) >> >> smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o >> obj-y += $(smsc911x-m) $(smsc911x-y) >> +obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o >> diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c >> new file mode 100644 >> index 0000000..641a6d4 >> --- /dev/null >> +++ b/arch/arm/mach-omap2/hwspinlock.c >> @@ -0,0 +1,67 @@ >> +/* >> + * OMAP hardware spinlock device initialization >> + * >> + * Copyright (C) 2010 Texas Instruments. All rights reserved. >> + * >> + * Contact: Simon Que <sque@ti.com> >> + * Hari Kanigeri <h-kanigeri2@ti.com> >> + * >> + * This program is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License >> + * version 2 as published by the Free Software Foundation. >> + * >> + * This program is distributed in the hope that it will be useful, but >> + * WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> + * General Public License for more details. >> + * >> + * You should have received a copy of the GNU General Public License >> + * along with this program; if not, write to the Free Software >> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA >> + * 02110-1301 USA >> + */ >> + >> +#include <linux/kernel.h> >> +#include <linux/init.h> >> +#include <linux/err.h> >> + >> +#include <plat/omap_hwmod.h> >> +#include <plat/omap_device.h> >> + >> +struct omap_device_pm_latency omap_spinlock_latency[] = { >> + { >> + .deactivate_func = omap_device_idle_hwmods, >> + .activate_func = omap_device_enable_hwmods, >> + .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, >> + } >> +}; >> + >> +int __init hwspinlocks_init(void) >> +{ >> + int retval = 0; >> + struct omap_hwmod *oh; >> + struct omap_device *od; >> + const char *oh_name = "spinlock"; >> + const char *dev_name = "omap_hwspinlock"; >> + >> + /* >> + * Hwmod lookup will fail in case our platform doesn't support the >> + * hardware spinlock module, so it is safe to run this initcall >> + * on all omaps >> + */ >> + oh = omap_hwmod_lookup(oh_name); >> + if (oh == NULL) >> + return -EINVAL; >> + >> + od = omap_device_build(dev_name, 0, oh, NULL, 0, >> + omap_spinlock_latency, >> + ARRAY_SIZE(omap_spinlock_latency), false); >> + if (IS_ERR(od)) { >> + pr_err("Can't build omap_device for %s:%s\n", dev_name, >> + oh_name); >> + retval = PTR_ERR(od); >> + } >> + >> + return retval; >> +} >> +postcore_initcall(hwspinlocks_init); > > Any reason this needs to be a postcore_initcall? Are there users of > hwspinlocks this early in boot? Probaly subsys or even device_initcall > is more appropriate here. > > I would've suspected that any users of hwspinlocks will be dependent on > drivers for the other cores (e.g. syslink) which would likely be > initialized much later.
On that note, is there any reason why this file cannot be selected as a module? g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Mon Oct 18, 12:44 am)
[PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Mon Oct 18, 12:44 am)
[PATCH 2/3] OMAP4: hwmod data: Add hwspinlock
, Ohad Ben-Cohen
, (Mon Oct 18, 12:44 am)
[PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Mon Oct 18, 12:44 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 5:46 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Russell King - ARM Linux
, (Mon Oct 18, 6:35 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 6:43 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Mon Oct 18, 7:28 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 7:33 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Mon Oct 18, 7:39 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Catalin Marinas
, (Mon Oct 18, 8:27 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 8:32 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Mon Oct 18, 8:35 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 8:48 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Catalin Marinas
, (Mon Oct 18, 8:51 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Peter Zijlstra
, (Mon Oct 18, 8:58 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Greg KH
, (Tue Oct 19, 8:46 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Kevin Hilman
, (Tue Oct 19, 9:58 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Grant Likely
, (Tue Oct 19, 10:01 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Kevin Hilman
, (Tue Oct 19, 10:03 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Grant Likely
, (Tue Oct 19, 10:05 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Kevin Hilman
, (Tue Oct 19, 10:16 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Arnd Bergmann
, (Tue Oct 19, 10:21 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Tue Oct 19, 1:18 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Tue Oct 19, 1:21 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Tue Oct 19, 1:43 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Tue Oct 19, 1:51 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Arnd Bergmann
, (Tue Oct 19, 1:58 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Tue Oct 19, 2:02 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Arnd Bergmann
, (Tue Oct 19, 2:08 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Tue Oct 19, 2:57 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Grant Likely
, (Tue Oct 19, 4:12 pm)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Daniel Walker
, (Tue Oct 19, 4:31 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Kevin Hilman
, (Tue Oct 19, 4:53 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ryan Mallon
, (Tue Oct 19, 6:20 pm)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Tue Oct 19, 11:13 pm)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Russell King - ARM Linux
, (Wed Oct 20, 2:53 am)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Ohad Ben-Cohen
, (Wed Oct 20, 3:00 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Wed Oct 20, 6:00 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Wed Oct 20, 7:09 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Wed Oct 20, 7:38 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Grant Likely
, (Wed Oct 20, 8:51 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Grant Likely
, (Wed Oct 20, 8:55 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Kevin Hilman
, (Wed Oct 20, 11:18 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Kevin Hilman
, (Wed Oct 20, 11:37 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Wed Oct 20, 12:21 pm)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Daniel Walker
, (Wed Oct 20, 3:15 pm)
Re: [PATCH 0/3] Add OMAP hardware spinlock misc driver
, Bryan Huntsman
, (Wed Oct 20, 3:29 pm)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Wed Oct 20, 3:43 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Kevin Hilman
, (Wed Oct 20, 4:58 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Wed Oct 20, 11:11 pm)
RE: [PATCH 3/3] omap: add hwspinlock device
, Kamoolkar, Mugdha
, (Thu Oct 21, 1:36 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Arnd Bergmann
, (Thu Oct 21, 2:04 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Thu Oct 21, 2:06 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Ohad Ben-Cohen
, (Thu Oct 21, 3:13 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Arnd Bergmann
, (Thu Oct 21, 5:02 am)
RE: [PATCH 3/3] omap: add hwspinlock device
, Kanigeri, Hari
, (Thu Oct 21, 5:26 am)
RE: [PATCH 3/3] omap: add hwspinlock device
, Kamoolkar, Mugdha
, (Fri Oct 22, 2:59 am)
RE: [PATCH 3/3] omap: add hwspinlock device
, Kamoolkar, Mugdha
, (Fri Oct 22, 3:14 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Fri Oct 22, 4:16 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Tony Lindgren
, (Fri Oct 22, 9:56 am)
Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
, Tony Lindgren
, (Fri Oct 22, 10:00 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Grant Likely
, (Fri Oct 22, 10:03 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Tony Lindgren
, (Fri Oct 22, 10:28 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Sun Oct 24, 10:54 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Tony Lindgren
, (Mon Oct 25, 12:02 pm)
Re: [PATCH 3/3] omap: add hwspinlock device
, Ohad Ben-Cohen
, (Tue Oct 26, 4:54 am)
Re: [PATCH 3/3] omap: add hwspinlock device
, Tony Lindgren
, (Tue Oct 26, 12:06 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate