* [PATCH v3 2/2] input: samsung-keypad: Add device tree support
From: Thomas Abraham @ 2011-09-27 8:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110922174054.GO17168@ponder.secretlab.ca>
Hi Grant,
On 22 September 2011 23:10, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Mon, Sep 19, 2011 at 03:49:13PM +0530, Thomas Abraham wrote:
>> Add device tree based discovery support for Samsung's keypad controller.
>>
>> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
>> Cc: Donghwa Lee <dh09.lee@samsung.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>
> A few things to fix below, but you can add my acked-by when you've
> addressed them.
Ok. Thanks for your review. I will fix as per your comments.
[...]
>
>> diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
>> index f689f49..2a477bc 100644
>> --- a/drivers/input/keyboard/samsung-keypad.c
>> +++ b/drivers/input/keyboard/samsung-keypad.c
[...]
>> +
>> + ? ? of_property_read_u32(np, "samsung,keypad-num-rows", &num_rows);
>> + ? ? of_property_read_u32(np, "samsung,keypad-num-columns", &num_cols);
>
> property_read doesn't touch the values of num_rows or num_cols on
> failure. ?The values need to be initialized if you're going to test
> the result value.
Ok. num_rows and num_cols variables will be set to zero before the
property read call.
>
>> + ? ? if (!num_rows || !num_cols) {
>> + ? ? ? ? ? ? dev_err(dev, "number of keypad rows/columns not specified\n");
>> + ? ? ? ? ? ? return NULL;
>> + ? ? }
[...]
>>
>> + ? ? if (pdev->dev.of_node) {
>> + ? ? ? ? ? ? samsung_keypad_parse_dt_gpio(&pdev->dev, keypad);
>> +#ifdef CONFIG_OF
>> + ? ? ? ? ? ? keypad->type = of_device_is_compatible(pdev->dev.of_node,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "samsung,s5pv210-keypad");
>> +#endif
>
> This still looks odd. ?If you move the #ifdef up one line, then you
> can remove the empty version of samsung_keypad_parse_dt_gpio(), and
> this block won't look so weird.
>
That would be a better approach. Thanks for the suggestion.
Regards,
Thomas.
[...]
^ permalink raw reply
* [PATCH] iommu/core: let drivers know if an iommu fault
From: Ohad Ben-Cohen @ 2011-09-27 8:14 UTC (permalink / raw)
To: linux-arm-kernel
handler isn't installed
Let report_iommu_fault() return -ENOSYS whenever an iommu fault
handler isn't installed, so IOMMU drivers can then do their own
platform-specific default behavior if they want.
Clarify that -ENOSYS is reserved for this purpose, and that fault
handlers are prohibited from using it.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
drivers/iommu/iommu.c | 7 +++++++
include/linux/iommu.h | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 3a07259..c41a6a1 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -43,6 +43,13 @@ EXPORT_SYMBOL_GPL(iommu_found);
* iommu_set_fault_handler() - set a fault handler for an iommu domain
* @domain: iommu domain
* @handler: fault handler
+ *
+ * This function should be used by IOMMU users which want to be notified
+ * whenever an IOMMU fault happens.
+ *
+ * The fault handler itself should return 0 on success, and an appropriate
+ * error code otherwise. It should never return -ENOSYS though, as this is
+ * reserved for the IOMMU core to return when no handler is installed.
*/
void iommu_set_fault_handler(struct iommu_domain *domain,
iommu_fault_handler_t handler)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index d084e87..2987199 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -98,11 +98,12 @@ extern void iommu_set_fault_handler(struct
iommu_domain *domain,
* Returns 0 on success and an appropriate error code otherwise (if dynamic
* PTE/TLB loading will one day be supported, implementations will be able
* to tell whether it succeeded or not according to this return value).
+ * If a fault handler isn't installed, -ENOSYS is returned.
*/
static inline int report_iommu_fault(struct iommu_domain *domain,
struct device *dev, unsigned long iova, int flags)
{
- int ret = 0;
+ int ret = -ENOSYS;
/*
* if upper layers showed interest and installed a fault handler,
--
1.7.4.1
^ permalink raw reply related
* [GIT PULL] ux500-timers
From: Linus Walleij @ 2011-09-27 8:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
could you please pull the ux500-timers branch into the arm-soc
tree? These patches have circulated for a long time and my repost
from last week has not generated any new comments.
(On popular request I try to keep pull requests per-topic...)
The following changes since commit d93dc5c4478c1fd5de85a3e8aece9aad7bbae044:
Linux 3.1-rc7 (2011-09-21 16:58:15 -0700)
are available in the git repository at:
git://git.linaro.org/people/triad/linux-stericsson.git ux500-nomadik-timers
Jonas Aaberg (4):
ARM: ux500: Move timer code to separate file
ARM: plat-nomadik: timer: Add support for periodic timers
ARM: plat-nomadik: timer: Export reset functions
ARM: ux500: Reprogram timers upon resume
Mattias Wallin (3):
ARM: plat-nomadik: MTU sched_clock as an option
clocksource: add DBX500 PRCMU Timer support
ARM: ux500: add support for clocksource DBX500 PRCMU
arch/arm/mach-ux500/Makefile | 2 +-
arch/arm/mach-ux500/cpu.c | 29 +-----
arch/arm/mach-ux500/include/mach/db5500-regs.h | 2 +
arch/arm/mach-ux500/include/mach/db8500-regs.h | 3 +
arch/arm/mach-ux500/timer.c | 65 +++++++++++
arch/arm/plat-nomadik/Kconfig | 8 ++-
arch/arm/plat-nomadik/include/plat/mtu.h | 47 +--------
arch/arm/plat-nomadik/timer.c | 138 ++++++++++++++++++------
drivers/clocksource/Kconfig | 15 +++
drivers/clocksource/Makefile | 1 +
drivers/clocksource/clksrc-dbx500-prcmu.c | 104 ++++++++++++++++++
include/linux/clksrc-dbx500-prcmu.h | 22 ++++
12 files changed, 330 insertions(+), 106 deletions(-)
create mode 100644 arch/arm/mach-ux500/timer.c
create mode 100644 drivers/clocksource/clksrc-dbx500-prcmu.c
create mode 100644 include/linux/clksrc-dbx500-prcmu.h
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH] clk: provide prepare/unprepare functions
From: Russell King - ARM Linux @ 2011-09-27 8:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E7B72C2.3060402@codeaurora.org>
On Thu, Sep 22, 2011 at 10:39:14AM -0700, Saravana Kannan wrote:
>> /**
>> + * clk_prepare - prepare a clock source
>> + * @clk: clock source
>> + *
>> + * This prepares the clock source for use.
>
> Do you want to add a "May NOT be called from atomic context"? Yeah, the
> stub makes it obvious, but I think it would be consistent to add the
> comment in. No strong opinion though.
The might_sleep() is sufficient to enforce that, but adding the comment
for when the helper goes away would be a good idea.
> Not sure if you care, but LGTM/Ack.
Thanks.
^ permalink raw reply
* [PATCH 1/9] clk: provide prepare/unprepare functions
From: Russell King - ARM Linux @ 2011-09-27 8:26 UTC (permalink / raw)
To: linux-arm-kernel
As discussed previously, there's the need on some platforms to run some
parts of clk_enable() in contexts which can schedule. The solution
which was agreed upon was to provide clk_prepare() and clk_unprepare()
to contain this parts, while clk_enable() and clk_disable() perform
the atomic part.
This patch provides a common definition for clk_prepare() and
clk_unprepare() in linux/clk.h, and provides an upgrade path for
existing implementation and drivers: drivers can start using
clk_prepare() and clk_unprepare() once this patch is merged without
having to wait for platform support. Platforms can then start to
provide these additional functions.
Eventually, HAVE_CLK_PREPARE will be removed from the kernel, and
everyone will have to provide these new APIs.
Acked-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
include/linux/clk.h | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 1d37f42..7213b52 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -11,6 +11,8 @@
#ifndef __LINUX_CLK_H
#define __LINUX_CLK_H
+#include <linux/kernel.h>
+
struct device;
/*
@@ -41,11 +43,31 @@ struct clk;
struct clk *clk_get(struct device *dev, const char *id);
/**
+ * clk_prepare - prepare a clock source
+ * @clk: clock source
+ *
+ * This prepares the clock source for use.
+ *
+ * Must not be called from within atomic context.
+ */
+#ifdef CONFIG_HAVE_CLK_PREPARE
+int clk_prepare(struct clk *clk);
+#else
+static inline int clk_prepare(struct clk *clk)
+{
+ might_sleep();
+ return 0;
+}
+#endif
+
+/**
* clk_enable - inform the system when the clock source should be running.
* @clk: clock source
*
* If the clock can not be enabled/disabled, this should return success.
*
+ * May be called from atomic contexts.
+ *
* Returns success (0) or negative errno.
*/
int clk_enable(struct clk *clk);
@@ -57,6 +79,8 @@ int clk_enable(struct clk *clk);
* Inform the system that a clock source is no longer required by
* a driver and may be shut down.
*
+ * May be called from atomic contexts.
+ *
* Implementation detail: if the clock source is shared between
* multiple drivers, clk_enable() calls must be balanced by the
* same number of clk_disable() calls for the clock source to be
@@ -64,6 +88,25 @@ int clk_enable(struct clk *clk);
*/
void clk_disable(struct clk *clk);
+
+/**
+ * clk_unprepare - undo preparation of a clock source
+ * @clk: clock source
+ *
+ * This undoes a previously prepared clock. The caller must balance
+ * the number of prepare and unprepare calls.
+ *
+ * Must not be called from within atomic context.
+ */
+#ifdef CONFIG_HAVE_CLK_PREPARE
+void clk_unprepare(struct clk *clk);
+#else
+static inline void clk_unprepare(struct clk *clk)
+{
+ might_sleep();
+}
+#endif
+
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
* This is only valid once the clock source has been enabled.
--
1.7.4.4
^ permalink raw reply related
* [PATCH 2/9] clk: amba bus: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:27 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/amba/bus.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 84bdaac..bd230e8 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -460,9 +460,17 @@ static int amba_get_enable_pclk(struct amba_device *pcdev)
if (IS_ERR(pclk))
return PTR_ERR(pclk);
+ ret = clk_prepare(pclk);
+ if (ret) {
+ clk_put(pclk);
+ return ret;
+ }
+
ret = clk_enable(pclk);
- if (ret)
+ if (ret) {
+ clk_unprepare(pclk);
clk_put(pclk);
+ }
return ret;
}
@@ -472,6 +480,7 @@ static void amba_put_disable_pclk(struct amba_device *pcdev)
struct clk *pclk = pcdev->pclk;
clk_disable(pclk);
+ clk_unprepare(pclk);
clk_put(pclk);
}
--
1.7.4.4
^ permalink raw reply related
* [PATCH 3/9] clk: amba-clcd: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:27 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/video/amba-clcd.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index cf03ad0..2cda6ba 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -447,6 +447,10 @@ static int clcdfb_register(struct clcd_fb *fb)
goto out;
}
+ ret = clk_prepare(fb->clk);
+ if (ret)
+ goto free_clk;
+
fb->fb.device = &fb->dev->dev;
fb->fb.fix.mmio_start = fb->dev->res.start;
@@ -456,7 +460,7 @@ static int clcdfb_register(struct clcd_fb *fb)
if (!fb->regs) {
printk(KERN_ERR "CLCD: unable to remap registers\n");
ret = -ENOMEM;
- goto free_clk;
+ goto clk_unprep;
}
fb->fb.fbops = &clcdfb_ops;
@@ -530,6 +534,8 @@ static int clcdfb_register(struct clcd_fb *fb)
fb_dealloc_cmap(&fb->fb.cmap);
unmap:
iounmap(fb->regs);
+ clk_unprep:
+ clk_unprepare(fb->clk);
free_clk:
clk_put(fb->clk);
out:
@@ -595,6 +601,7 @@ static int clcdfb_remove(struct amba_device *dev)
if (fb->fb.cmap.len)
fb_dealloc_cmap(&fb->fb.cmap);
iounmap(fb->regs);
+ clk_unprepare(fb->clk);
clk_put(fb->clk);
fb->board->remove(fb);
--
1.7.4.4
^ permalink raw reply related
* [PATCH 4/9] clk: amba-pl010: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:27 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/tty/serial/amba-pl010.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index c0d10c4..efdf92c 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -312,12 +312,16 @@ static int pl010_startup(struct uart_port *port)
struct uart_amba_port *uap = (struct uart_amba_port *)port;
int retval;
+ retval = clk_prepare(uap->clk);
+ if (retval)
+ goto out;
+
/*
* Try to enable the clock producer.
*/
retval = clk_enable(uap->clk);
if (retval)
- goto out;
+ goto clk_unprep;
uap->port.uartclk = clk_get_rate(uap->clk);
@@ -343,6 +347,8 @@ static int pl010_startup(struct uart_port *port)
clk_dis:
clk_disable(uap->clk);
+ clk_unprep:
+ clk_unprepare(uap->clk);
out:
return retval;
}
@@ -370,6 +376,7 @@ static void pl010_shutdown(struct uart_port *port)
* Shut down the clock producer
*/
clk_disable(uap->clk);
+ clk_unprepare(uap->clk);
}
static void
@@ -626,6 +633,7 @@ static int __init pl010_console_setup(struct console *co, char *options)
int bits = 8;
int parity = 'n';
int flow = 'n';
+ int ret;
/*
* Check whether an invalid uart number has been specified, and
@@ -638,6 +646,10 @@ static int __init pl010_console_setup(struct console *co, char *options)
if (!uap)
return -ENODEV;
+ ret = clk_prepare(uap->clk);
+ if (ret)
+ return ret;
+
uap->port.uartclk = clk_get_rate(uap->clk);
if (options)
--
1.7.4.4
^ permalink raw reply related
* [PATCH 5/9] clk: amba-pl011: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:28 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/tty/serial/amba-pl011.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index f5f6831..00233af 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1367,12 +1367,16 @@ static int pl011_startup(struct uart_port *port)
unsigned int cr;
int retval;
+ retval = clk_prepare(uap->clk);
+ if (retval)
+ goto out;
+
/*
* Try to enable the clock producer.
*/
retval = clk_enable(uap->clk);
if (retval)
- goto out;
+ goto clk_unprep;
uap->port.uartclk = clk_get_rate(uap->clk);
@@ -1446,6 +1450,8 @@ static int pl011_startup(struct uart_port *port)
clk_dis:
clk_disable(uap->clk);
+ clk_unprep:
+ clk_unprepare(uap->clk);
out:
return retval;
}
@@ -1497,6 +1503,7 @@ static void pl011_shutdown(struct uart_port *port)
* Shut down the clock producer
*/
clk_disable(uap->clk);
+ clk_unprepare(uap->clk);
if (uap->port.dev->platform_data) {
struct amba_pl011_data *plat;
@@ -1800,6 +1807,7 @@ static int __init pl011_console_setup(struct console *co, char *options)
int bits = 8;
int parity = 'n';
int flow = 'n';
+ int ret;
/*
* Check whether an invalid uart number has been specified, and
@@ -1812,6 +1820,10 @@ static int __init pl011_console_setup(struct console *co, char *options)
if (!uap)
return -ENODEV;
+ ret = clk_prepare(uap->clk);
+ if (ret)
+ return ret;
+
if (uap->port.dev->platform_data) {
struct amba_pl011_data *plat;
--
1.7.4.4
^ permalink raw reply related
* [PATCH v3 1/2] input: samsung-keypad: Add HAVE_SAMSUNG_KEYPAD config option
From: Thomas Abraham @ 2011-09-27 8:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110922173507.GN17168@ponder.secretlab.ca>
Hi Grant,
On 22 September 2011 23:05, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Mon, Sep 19, 2011 at 03:49:12PM +0530, Thomas Abraham wrote:
>> For platforms using device tree, the static keypad device instances
>> are not required and SAMSUNG_DEV_KEYPAD is not selected. Since,
>> samsung keypad driver has dependency on SAMSUNG_DEV_KEYPAD config
>> option, the driver is left out of the compilation for dt enabled
>> platforms.
>>
>> An additional config option 'HAVE_SAMSUNG_KEYPAD' is added
>> which the device tree based platforms can select. This config
>> option is added as an alternative dependency for keypad driver.
>>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> ---
>> ?drivers/input/keyboard/Kconfig | ? ?9 ++++++++-
>> ?1 files changed, 8 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
>> index b4dee9d..7c322a3 100644
>> --- a/drivers/input/keyboard/Kconfig
>> +++ b/drivers/input/keyboard/Kconfig
>> @@ -423,9 +423,16 @@ config KEYBOARD_PMIC8XXX
>> ? ? ? ? To compile this driver as a module, choose M here: the module will
>> ? ? ? ? be called pmic8xxx-keypad.
>>
>> +config HAVE_SAMSUNG_KEYPAD
>> + ? ? bool
>> + ? ? help
>> + ? ? ? This will include Samsung Keypad controller driver support. If you
>> + ? ? ? want to include Samsung Keypad support for any machine, kindly
>> + ? ? ? select this in the respective mach-xxxx/Kconfig file.
>> +
>> ?config KEYBOARD_SAMSUNG
>> ? ? ? tristate "Samsung keypad support"
>> - ? ? depends on SAMSUNG_DEV_KEYPAD
>> + ? ? depends on SAMSUNG_DEV_KEYPAD || HAVE_SAMSUNG_KEYPAD
>
> It would be better to modify SAMSUNG_DEV_KEYPAD to select
> HAVE_SAMSUNG_KEYPAD and then make KEYBOARD_SAMSUNG only depend on
> HAVE_SAMSUNG_KEYPAD instead of both.
The SAMSUNG_DEV_KEYPAD is not selected for device tree enabled
machine. For instance, the Kconfig section for Exynos4 dt-enabled
machine file is as below.
config MACH_EXYNOS4_DT
bool "Samsung Exynos4 Machine using device tree"
select CPU_EXYNOS4210
select USE_OF
select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
help
Machine support for Samsung Exynos4 machine with device tree enabled.
SAMSUNG_DEV_KEYPAD (that selects the static platform device for
keypad) should not be selected for MACH_EXYNOS4_DT config option. So
selecting HAVE_SAMSUNG_KEYPAD in SAMSUNG_DEV_KEYPAD config option
would not help in this case. So for now, this is kept unchanged.
Please let me know if you think this needs to be changed.
Thanks for your review. I am sorry for delayed reply to your email.
Regards,
Thomas.
>
> g.
>
>
^ permalink raw reply
* [PATCH 6/9] clk: mmci: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:28 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/mmc/host/mmci.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 5e142b7..7be8db0 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1160,10 +1160,14 @@ static int __devinit mmci_probe(struct amba_device *dev,
goto host_free;
}
- ret = clk_enable(host->clk);
+ ret = clk_prepare(host->clk);
if (ret)
goto clk_free;
+ ret = clk_enable(host->clk);
+ if (ret)
+ goto clk_unprep;
+
host->plat = plat;
host->variant = variant;
host->mclk = clk_get_rate(host->clk);
@@ -1351,6 +1355,8 @@ static int __devinit mmci_probe(struct amba_device *dev,
iounmap(host->base);
clk_disable:
clk_disable(host->clk);
+ clk_unprep:
+ clk_unprepare(host->clk);
clk_free:
clk_put(host->clk);
host_free:
@@ -1398,6 +1404,7 @@ static int __devexit mmci_remove(struct amba_device *dev)
iounmap(host->base);
clk_disable(host->clk);
+ clk_unprepare(host->clk);
clk_put(host->clk);
if (host->vcc)
--
1.7.4.4
^ permalink raw reply related
* [PATCH 7/9] clk: sa1111: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:28 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/common/sa1111.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 0569de6..61691cd 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -718,6 +718,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
goto err_free;
}
+ ret = clk_prepare(sachip->clk);
+ if (ret)
+ goto err_clkput;
+
spin_lock_init(&sachip->lock);
sachip->dev = me;
@@ -733,7 +737,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
sachip->base = ioremap(mem->start, PAGE_SIZE * 2);
if (!sachip->base) {
ret = -ENOMEM;
- goto err_clkput;
+ goto err_clk_unprep;
}
/*
@@ -809,6 +813,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
err_unmap:
iounmap(sachip->base);
+ err_clk_unprep:
+ clk_unprepare(sachip->clk);
err_clkput:
clk_put(sachip->clk);
err_free:
@@ -835,6 +841,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
sa1111_writel(0, irqbase + SA1111_WAKEEN1);
clk_disable(sachip->clk);
+ clk_unprepare(sachip->clk);
if (sachip->irq != NO_IRQ) {
irq_set_chained_handler(sachip->irq, NULL);
--
1.7.4.4
^ permalink raw reply related
* [PATCH 8/9] clk: timer-sp: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:29 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/common/timer-sp.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 41df478..2393b5b 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -41,9 +41,17 @@ static long __init sp804_get_clock_rate(const char *name)
return PTR_ERR(clk);
}
+ err = clk_prepare(clk);
+ if (err) {
+ pr_err("sp804: %s clock failed to prepare: %d\n", name, err);
+ clk_put(clk);
+ return err;
+ }
+
err = clk_enable(clk);
if (err) {
pr_err("sp804: %s clock failed to enable: %d\n", name, err);
+ clk_unprepare(clk);
clk_put(clk);
return err;
}
@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name)
if (rate < 0) {
pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate);
clk_disable(clk);
+ clk_unprepare(clk);
clk_put(clk);
}
--
1.7.4.4
^ permalink raw reply related
* [PATCH 9/9] clk: spi-pl022: convert to clk_prepare()/clk_unprepare()
From: Russell King - ARM Linux @ 2011-09-27 8:29 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/spi/spi-pl022.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 3520cf9..1ab2fa0 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2187,6 +2187,13 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
dev_err(&adev->dev, "could not retrieve SSP/SPI bus clock\n");
goto err_no_clk;
}
+
+ status = clk_prepare(pl022->clk);
+ if (status) {
+ dev_err(&adev->dev, "could not prepare SSP/SPI bus clock\n");
+ goto err_clk_prep;
+ }
+
/* Disable SSP */
writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
SSP_CR1(pl022->virtbase));
@@ -2238,6 +2245,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
pl022_dma_remove(pl022);
free_irq(adev->irq[0], pl022);
err_no_irq:
+ clk_unprepare(pl022->clk);
+ err_clk_prep:
clk_put(pl022->clk);
err_no_clk:
iounmap(pl022->virtbase);
@@ -2271,6 +2280,7 @@ pl022_remove(struct amba_device *adev)
pl022_dma_remove(pl022);
free_irq(adev->irq[0], pl022);
clk_disable(pl022->clk);
+ clk_unprepare(pl022->clk);
clk_put(pl022->clk);
iounmap(pl022->virtbase);
amba_release_regions(adev);
--
1.7.4.4
^ permalink raw reply related
* [PATCH v2 16/16] ARM: GIC: Make MULTI_IRQ_HANDLER mandatory
From: Marc Zyngier @ 2011-09-27 8:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110927034350.GA17997@S2100-06.ap.freescale.net>
Hi Shawn,
On 27/09/11 04:43, Shawn Guo wrote:
> On Mon, Sep 26, 2011 at 12:02:35PM +0100, Marc Zyngier wrote:
>> Now that MULTI_IRQ_HANDLER is selected by all the in-tree
>> GIC users, make it mandatory and remove the unused macros.
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>> arch/arm/Kconfig | 3 -
>> arch/arm/common/Kconfig | 1 +
>> arch/arm/common/gic.c | 2 +-
>> arch/arm/include/asm/hardware/entry-macro-gic.S | 60 -----------------------
>> arch/arm/include/asm/hardware/gic.h | 1 -
>> arch/arm/mach-msm/Kconfig | 2 -
>> arch/arm/mach-omap2/Kconfig | 1 +
>> arch/arm/mach-tegra/Kconfig | 1 -
>> arch/arm/mach-ux500/Kconfig | 1 -
>> arch/arm/plat-omap/Kconfig | 1 -
>> 10 files changed, 3 insertions(+), 70 deletions(-)
>> delete mode 100644 arch/arm/include/asm/hardware/entry-macro-gic.S
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index 0514264..d3e246c 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -334,7 +334,6 @@ config ARCH_CNS3XXX
>> select ARM_GIC
>> select MIGHT_HAVE_PCI
>> select PCI_DOMAINS if PCI
>> - select MULTI_IRQ_HANDLER
>> help
>> Support for Cavium Networks CNS3XXX platform.
>>
>> @@ -788,7 +787,6 @@ config ARCH_EXYNOS4
>> select HAVE_S3C_RTC if RTC_CLASS
>> select HAVE_S3C2410_I2C if I2C
>> select HAVE_S3C2410_WATCHDOG if WATCHDOG
>> - select MULTI_IRQ_HANDLER
>> help
>> Samsung EXYNOS4 series based systems
>>
>> @@ -911,7 +909,6 @@ config ARCH_ZYNQ
>> select ARM_AMBA
>> select ICST
>> select USE_OF
>> - select MULTI_IRQ_HANDLER
>> help
>> Support for Xilinx Zynq ARM Cortex A9 Platform
>> endchoice
>
> Hi Marc,
>
> I'm unsure about your base. But I have the following platforms in
> arch/arm/Kconfig selecting MULTI_IRQ_HANDLER at the end of your series,
> which should also be removed from?
>
> ARCH_REALVIEW
> ARCH_VEXPRESS
These two can be indeed removed, as they are GIC users and GIC now
selects MULTI_IRQ_HANDLER directly. I'll fix the patch.
> ARCH_PXA
PXA doesn't use the GIC, so it has to select MULTI_IRQ_HANDLER directly
as it used to before my patch.
> ARCH_SHMOBILE
This one is caught in the middle. Only SMP shmobile platforms use the
GIC, but they all need MULTI_IRQ_HANDLER anyway, so keeping the option
selected doesn't hurt.
Cheers,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply
* [PATCH 3/4] iommu/exynos: Add iommu driver for Exynos4 Platforms
From: Ohad Ben-Cohen @ 2011-09-27 8:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAHQjnOPdsf-QB3st94WRSH325j8WPOLLe4rqv0WN1qK1KYWtmA@mail.gmail.com>
On Tue, Sep 27, 2011 at 3:56 AM, KyongHo Cho <pullip.cho@samsung.com> wrote:
> I wanted the IOMMU driver to provide default fault handler to its users
> that does not provide fault handler for debugging purpose.
> If a user want to handle MMU fault, IOMMU driver welcomes to overwrite
> the existing 'default' fault handler.
Ok, this one patch below should allow you to do that.
report_iommu_fault() will now reliably tell you if a fault handler
failed or not, or if one isn't even installed.
This way your IOMMU driver doesn't need to define a fault handler of
its own, and instead, can do everything directly in
exynos_sysmmu_irq() where all the required information is now
available.
Thanks,
Ohad.
^ permalink raw reply
* [PATCH] leds-class: change back LEDS_CLASS to tristate instead of bool
From: Bryan Wu @ 2011-09-27 8:50 UTC (permalink / raw)
To: linux-arm-kernel
LEDS_CLASS is required by leds and trigger drivers, but we can build it as
module. So change this option back as tristate and treak the help message
as well.
LEDS_TRIGGERS depends on LEDS_CLASSS, which should be tristate. So set it
as tristate too and update header files as well.
Change those ifdefs to take care of module configuration.
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
---
arch/arm/mach-omap1/board-ams-delta.c | 4 ++--
drivers/leds/Kconfig | 9 ++++++---
drivers/leds/led-class.c | 8 ++++----
drivers/leds/leds.h | 2 +-
drivers/mmc/host/au1xmmc.c | 6 +++---
drivers/power/power_supply.h | 2 +-
include/linux/leds.h | 7 ++++---
include/linux/mmc/host.h | 2 +-
include/linux/power_supply.h | 2 +-
9 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index b2572f7..fd28696 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -241,7 +241,7 @@ static struct i2c_board_info ams_delta_camera_board_info[] = {
},
};
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
static int ams_delta_camera_power(struct device *dev, int power)
@@ -320,7 +320,7 @@ static void __init ams_delta_init(void)
omap1_usb_init(&ams_delta_usb_config);
omap1_set_camera_info(&ams_delta_camera_platform_data);
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
led_trigger_register_simple("ams_delta_camera",
&ams_delta_camera_led_trigger);
#endif
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index ff203a4..c30233e 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -17,10 +17,13 @@ menuconfig NEW_LEDS
if NEW_LEDS
config LEDS_CLASS
- bool "LED Class Support"
+ tristate "LED Class Support"
help
This option enables the led sysfs class in /sys/class/leds. You'll
- need this to do anything useful with LEDs. If unsure, say N.
+ need this to do anything useful with LEDs. If unsure, say M.
+
+ Note: don't disable it as N, because plenty of led and trigger drivers
+ are using this option.
comment "LED drivers"
@@ -388,7 +391,7 @@ config LEDS_RENESAS_TPU
Brightness control is supported but hardware blinking is not.
config LEDS_TRIGGERS
- bool "LED Trigger support"
+ tristate "LED Trigger support"
depends on LEDS_CLASS
help
This option enables trigger support for the leds class.
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index dc3d3d8..1f54cb0 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -75,7 +75,7 @@ static ssize_t led_max_brightness_show(struct device *dev,
static struct device_attribute led_class_attrs[] = {
__ATTR(brightness, 0644, led_brightness_show, led_brightness_store),
__ATTR(max_brightness, 0444, led_max_brightness_show, NULL),
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
__ATTR(trigger, 0644, led_trigger_show, led_trigger_store),
#endif
__ATTR_NULL,
@@ -209,7 +209,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
if (IS_ERR(led_cdev->dev))
return PTR_ERR(led_cdev->dev);
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
init_rwsem(&led_cdev->trigger_lock);
#endif
/* add to the list of leds */
@@ -226,7 +226,7 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
led_cdev->blink_timer.function = led_timer_function;
led_cdev->blink_timer.data = (unsigned long)led_cdev;
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
led_trigger_set_default(led_cdev);
#endif
@@ -245,7 +245,7 @@ EXPORT_SYMBOL_GPL(led_classdev_register);
*/
void led_classdev_unregister(struct led_classdev *led_cdev)
{
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
down_write(&led_cdev->trigger_lock);
if (led_cdev->trigger)
led_trigger_set(led_cdev, NULL);
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index e77c7f8..53b59b7 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -35,7 +35,7 @@ static inline int led_get_brightness(struct led_classdev *led_cdev)
extern struct rw_semaphore leds_list_lock;
extern struct list_head leds_list;
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
void led_trigger_set_default(struct led_classdev *led_cdev);
void led_trigger_set(struct led_classdev *led_cdev,
struct led_trigger *trigger);
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 56e7834..83f4913 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1043,7 +1043,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
"using PIO\n");
}
-#ifdef CONFIG_LEDS_CLASS
+#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
if (host->platdata && host->platdata->led) {
struct led_classdev *led = host->platdata->led;
led->name = mmc_hostname(mmc);
@@ -1072,7 +1072,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
return 0; /* all ok */
out6:
-#ifdef CONFIG_LEDS_CLASS
+#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
if (host->platdata && host->platdata->led)
led_classdev_unregister(host->platdata->led);
out5:
@@ -1111,7 +1111,7 @@ static int __devexit au1xmmc_remove(struct platform_device *pdev)
if (host) {
mmc_remove_host(host->mmc);
-#ifdef CONFIG_LEDS_CLASS
+#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
if (host->platdata && host->platdata->led)
led_classdev_unregister(host->platdata->led);
#endif
diff --git a/drivers/power/power_supply.h b/drivers/power/power_supply.h
index 018de2b..efa9544 100644
--- a/drivers/power/power_supply.h
+++ b/drivers/power/power_supply.h
@@ -22,7 +22,7 @@ static inline void power_supply_init_attrs(struct device_type *dev_type) {}
#endif /* CONFIG_SYSFS */
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
extern void power_supply_update_leds(struct power_supply *psy);
extern int power_supply_create_triggers(struct power_supply *psy);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 5884def..051bc7e 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -66,7 +66,7 @@ struct led_classdev {
struct timer_list blink_timer;
int blink_brightness;
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
/* Protects the trigger data below */
struct rw_semaphore trigger_lock;
@@ -115,7 +115,7 @@ extern void led_brightness_set(struct led_classdev *led_cdev,
/*
* LED Triggers
*/
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
#define TRIG_NAME_MAX 50
@@ -161,7 +161,8 @@ extern void led_trigger_blink(struct led_trigger *trigger,
#endif
/* Trigger specific functions */
-#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
+#if defined(CONFIG_LEDS_TRIGGER_IDE_DISK) || \
+ defined(CONFIG_LEDS_TRIGGER_IDE_DISK_MODULE)
extern void ledtrig_ide_activity(void);
#else
#define ledtrig_ide_activity() do {} while(0)
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index aed5bc7..adac344 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -300,7 +300,7 @@ struct mmc_host {
mmc_pm_flag_t pm_flags; /* requested pm features */
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
struct led_trigger *led; /* activity led */
#endif
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 204c18d..cb09fa0 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -164,7 +164,7 @@ struct power_supply {
struct device *dev;
struct work_struct changed_work;
-#ifdef CONFIG_LEDS_TRIGGERS
+#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
struct led_trigger *charging_full_trig;
char *charging_full_trig_name;
struct led_trigger *charging_trig;
--
1.7.5
^ permalink raw reply related
* [PATCH v3 0/6] iommu: split mapping to page sizes as supported by the hardware
From: Ohad Ben-Cohen @ 2011-09-27 8:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1316195506-9777-1-git-send-email-ohad@wizery.com>
ping
On Fri, Sep 16, 2011 at 8:51 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> v2->v3:
>
> - s/KB/KiB/ (David W)
>
> v1->v2:
>
> - split to patches (by keeping the old code around until all drivers are converted) (Joerg)
>
>
> Ohad Ben-Cohen (6):
> ?iommu/core: split mapping to page sizes as supported by the hardware
> ?iommu/omap: announce supported page sizes
> ?iommu/msm: announce supported page sizes
> ?iommu/amd: announce supported page sizes
> ?iommu/intel: announce supported page sizes
> ?iommu/core: remove the temporary register_iommu_pgsize API
>
> ?drivers/iommu/amd_iommu.c ? | ? 20 ++++++-
> ?drivers/iommu/intel-iommu.c | ? 20 ++++++-
> ?drivers/iommu/iommu.c ? ? ? | ?130 +++++++++++++++++++++++++++++++++++++++----
> ?drivers/iommu/msm_iommu.c ? | ? ?8 ++-
> ?drivers/iommu/omap-iommu.c ?| ? ?6 ++-
> ?drivers/iommu/omap-iovmm.c ?| ? 12 +---
> ?include/linux/iommu.h ? ? ? | ? ?7 +-
> ?virt/kvm/iommu.c ? ? ? ? ? ?| ? ?4 +-
> ?8 files changed, 177 insertions(+), 30 deletions(-)
>
> --
> 1.7.4.1
>
>
^ permalink raw reply
* Porting linux to Stellaris Cortex-M3
From: Maxin John @ 2011-09-27 8:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAH8SYHDRT7OpLr0sx75rMyy4OV59JZGoRv_cr2+-+2yy3tfU9g@mail.gmail.com>
Hi Fernando,
On Mon, Sep 26, 2011 at 11:19 PM, Fernando Endo
<fernando.endo@phiinnovations.com> wrote:
> Hello everybody,
>
> I'm currently porting linux to a Stellaris board from TI.
> But I'm having some problems with the execution of the Busybox init program.
>
> Some info:
> - the toolchain is CodeSourcery lite edition
> - I've followed the steps described by Catalin Marinas at
> http://www.linux-arm.org/LinuxKernel/LinuxM3
> - I'm using my own bootloader, based on the script at the site above
> and on informations found on linux/Documents
> - I've based the mach-stellaris implementation from realview and mps ones
> - the timer, irqs and uart seems to work fine
> - the system crashes after calling /init, which is linked with Busybox init
> - BUG: scheduling while atomic: init/1/0xffff000a
This is the code which corresponds to "scheduling while atomic" bug
(from "kernel/sched.c") :
-----
/*
* Print scheduling while atomic bug:
*/
static noinline void __schedule_bug(struct task_struct *prev)
{
struct pt_regs *regs = get_irq_regs();
printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n",
prev->comm, prev->pid, preempt_count());
debug_show_held_locks(prev);
print_modules();
if (irqs_disabled())
print_irqtrace_events(prev);
if (regs)
show_regs(regs);
else
dump_stack();
}
----
We hit this bug if we are scheduling when we should not be. ie : if we
call schedule() or sleep() from a driver while in an interrupt handler
or holding a spin-lock, that will trigger this bug. This is because of
a bug present in any of the kernel drivers. Please share the detailed
logs.
Warm Regards,
Maxin B. John
^ permalink raw reply
* [PATCH v2 00/16] Switch GIC users (and omap2plus) to CONFIG_MULTI_IRQ_HANDLER
From: Marc Zyngier @ 2011-09-27 8:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20110927001514.GB16174@huya.qualcomm.com>
On 27/09/11 01:15, David Brown wrote:
> On Mon, Sep 26, 2011 at 01:20:07PM -0700, David Brown wrote:
>> On Mon, Sep 26, 2011 at 12:02:19PM +0100, Marc Zyngier wrote:
>>
>>> This series has been tested on VE (A9, A5, A15), PB11MP, Panda, IGEPv2
>>> and Harmony. Patches against next-20110926 plus my PPI series.
>>
>> Tested on an msm8660.
>>
>> Tested-by: David Brown <davidb@codeaurora.org>
>> Acked-by: David Brown <davidb@codeaurora.org>
>
> Tested as well on msm8250.
Awesome. Thanks a lot for testing all of this David.
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply
* [PATCH 3/4] iommu/exynos: Add iommu driver for Exynos4 Platforms
From: KyongHo Cho @ 2011-09-27 9:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAK=Wgbbf2XbDrp6q5G3_7og+0wsmFmqpCsx_nDYTyRTa0-YBmg@mail.gmail.com>
On Tue, Sep 27, 2011 at 5:48 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index d084e87..2987199 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -98,11 +98,12 @@ extern void iommu_set_fault_handler(struct
> iommu_domain *domain,
> ?* Returns 0 on success and an appropriate error code otherwise (if dynamic
> ?* PTE/TLB loading will one day be supported, implementations will be able
> ?* to tell whether it succeeded or not according to this return value).
> + * If a fault handler isn't installed, -ENOSYS is returned.
> ?*/
> ?static inline int report_iommu_fault(struct iommu_domain *domain,
> ? ? ? ? ? ? ? ?struct device *dev, unsigned long iova, int flags)
> ?{
> - ? ? ? int ret = 0;
> + ? ? ? int ret = -ENOSYS;
>
> ? ? ? ?/*
> ? ? ? ? * if upper layers showed interest and installed a fault handler,
It looks good for me.
I will prepare new patches with the changed API.
Thank you.
Cho KyongHo.
^ permalink raw reply
* [PATCH v3 4/4] ARM: mx53_ard: Add flexcan support
From: Marc Kleine-Budde @ 2011-09-27 9:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1316712635-25126-4-git-send-email-rogerio.pimentel@freescale.com>
On 09/22/2011 07:30 PM, Rogerio Pimentel wrote:
> Adding flexcan support on i.MX53 ARD
You probably don't want to hardwire the gpios to the can transceiver as
enabled. I suggest to attach the transceiver_switch callback.
Have a look at arch/arm/mach-mxs/mach-mx28evk.c
cheers, Marc
>
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
> Changes since v2:
> Rebased to imx-cleanup, using gpio_request_array
> instead gpio_request_one
> arch/arm/mach-mx5/Kconfig | 1 +
> arch/arm/mach-mx5/board-mx53_ard.c | 39 ++++++++++++++++++++++++++++++-----
> 2 files changed, 34 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
> index b4f5ab6..c71731e 100644
> --- a/arch/arm/mach-mx5/Kconfig
> +++ b/arch/arm/mach-mx5/Kconfig
> @@ -218,6 +218,7 @@ config MACH_MX53_LOCO
> config MACH_MX53_ARD
> bool "Support MX53 ARD platforms"
> select SOC_IMX53
> + select IMX_HAVE_PLATFORM_FLEXCAN
> select IMX_HAVE_PLATFORM_IMX2_WDT
> select IMX_HAVE_PLATFORM_IMX_I2C
> select IMX_HAVE_PLATFORM_IMX_UART
> diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
> index ddc3015..e29bb23 100644
> --- a/arch/arm/mach-mx5/board-mx53_ard.c
> +++ b/arch/arm/mach-mx5/board-mx53_ard.c
> @@ -44,6 +44,8 @@
> #define ARD_BACK IMX_GPIO_NR(5, 11)
> #define ARD_PROG IMX_GPIO_NR(5, 12)
> #define ARD_VOLUMEUP IMX_GPIO_NR(5, 13)
> +#define ARD_CAN_EN IMX_GPIO_NR(7, 6)
> +#define ARD_CAN_STBY IMX_GPIO_NR(4, 15)
>
> static iomux_v3_cfg_t mx53_ard_pads[] = {
> /* UART1 */
> @@ -102,6 +104,13 @@ static iomux_v3_cfg_t mx53_ard_pads[] = {
> MX53_PAD_DISP0_DAT18__GPIO5_12, /* prog */
> MX53_PAD_DISP0_DAT19__GPIO5_13, /* vol up */
> MX53_PAD_GPIO_10__GPIO4_0, /* vol down */
> + /* CAN */
> + MX53_PAD_KEY_COL2__CAN1_TXCAN | PAD_CTL_PUS_100K_UP,
> + MX53_PAD_KEY_ROW2__CAN1_RXCAN,
> + MX53_PAD_PATA_RESET_B__CAN2_TXCAN | PAD_CTL_PUS_100K_UP,
> + MX53_PAD_PATA_IORDY__CAN2_RXCAN,
> + MX53_PAD_PATA_DA_0__GPIO7_6,
> + MX53_PAD_KEY_ROW4__GPIO4_15,
> };
>
> #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \
> @@ -169,16 +178,27 @@ static struct imxi2c_platform_data mx53_ard_i2c3_data = {
> .bitrate = 400000,
> };
>
> -static void __init mx53_ard_io_init(void)
> +static struct gpio mx53_ard_gpios[] = {
> + { ARD_ETHERNET_INT_B, GPIOF_IN, "eth-int-b" },
> + { ARD_I2CPORTEXP_B, GPIOF_OUT_INIT_HIGH, "i2cptexp-rst" },
> + { ARD_CAN_EN, GPIOF_OUT_INIT_HIGH, "can-en" },
> + { ARD_CAN_STBY, GPIOF_OUT_INIT_HIGH, "can-stby" },
> +};
> +
> +static int __init mx53_ard_io_init(void)
> {
> + int ret;
> +
> mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
> ARRAY_SIZE(mx53_ard_pads));
>
> - gpio_request(ARD_ETHERNET_INT_B, "eth-int-b");
> - gpio_direction_input(ARD_ETHERNET_INT_B);
> + ret = gpio_request_array(mx53_ard_gpios,
> + ARRAY_SIZE(mx53_ard_gpios));
> +
> + if (ret)
> + return ret;
>
> - gpio_request(ARD_I2CPORTEXP_B, "i2cptexp-rst");
> - gpio_direction_output(ARD_I2CPORTEXP_B, 1);
> + return 0;
> }
>
> /* Config CS1 settings for ethernet controller */
> @@ -222,10 +242,15 @@ static struct platform_device *devices[] __initdata = {
>
> static void __init mx53_ard_board_init(void)
> {
> + int ret;
> +
> imx53_soc_init();
> imx53_add_imx_uart(0, NULL);
>
> - mx53_ard_io_init();
> + ret = mx53_ard_io_init();
> + if (ret)
> + pr_err("failed to request gpio pins: %d\n", ret);
> +
> weim_cs_config();
> platform_add_devices(devices, ARRAY_SIZE(devices));
>
> @@ -234,6 +259,8 @@ static void __init mx53_ard_board_init(void)
> imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
> imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
> imx_add_gpio_keys(&ard_button_data);
> + imx53_add_flexcan0(NULL);
> + imx53_add_flexcan1(NULL);
> }
>
> static void __init mx53_ard_timer_init(void)
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110927/fae961d3/attachment.sig>
^ permalink raw reply
* Porting linux to Stellaris Cortex-M3
From: Catalin Marinas @ 2011-09-27 9:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAH8SYHDRT7OpLr0sx75rMyy4OV59JZGoRv_cr2+-+2yy3tfU9g@mail.gmail.com>
On Mon, Sep 26, 2011 at 09:19:39PM +0100, Fernando Endo wrote:
> I'm currently porting linux to a Stellaris board from TI.
> But I'm having some problems with the execution of the Busybox init program.
>
> Some info:
> - the toolchain is CodeSourcery lite edition
> - I've followed the steps described by Catalin Marinas at
> http://www.linux-arm.org/LinuxKernel/LinuxM3
> - I'm using my own bootloader, based on the script at the site above
> and on informations found on linux/Documents
> - I've based the mach-stellaris implementation from realview and mps ones
> - the timer, irqs and uart seems to work fine
> - the system crashes after calling /init, which is linked with Busybox init
> - BUG: scheduling while atomic: init/1/0xffff000a
Did you get any backtrace?
--
Catalin
^ permalink raw reply
* [PATCH 3/4] iommu/exynos: Add iommu driver for Exynos4 Platforms
From: Ohad Ben-Cohen @ 2011-09-27 9:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAHQjnOOGvwo6P1SJXVwzUJDFiUN-QxCxHOWoOMd1+QjubJ2u-A@mail.gmail.com>
On Tue, Sep 27, 2011 at 12:01 PM, KyongHo Cho <pullip.cho@samsung.com> wrote:
> It looks good for me.
>
> I will prepare new patches with the changed API.
Ok, thanks.
(I've just submitted it to the iommu ML too)
Ohad.
^ permalink raw reply
* Porting linux to Stellaris Cortex-M3
From: Russell King - ARM Linux @ 2011-09-27 9:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAH8SYHDRT7OpLr0sx75rMyy4OV59JZGoRv_cr2+-+2yy3tfU9g@mail.gmail.com>
On Mon, Sep 26, 2011 at 05:19:39PM -0300, Fernando Endo wrote:
> - BUG: scheduling while atomic: init/1/0xffff000a
The last figure is the preempt count. This is made up from:
* - bits 0-7 are the preemption count (max preemption depth: 256)
* - bits 8-15 are the softirq count (max # of softirqs: 256)
* - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024)
* - bit 26 is the NMI_MASK
* - bit 28 is the PREEMPT_ACTIVE flag
That seems to be saying that preemption has been disabled 10 times.
The upper 16-bits being all-ones seems to be rather insane - maybe
there's an additional __irq_exit() or irq_exit() call somewhere in
one of your code paths.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox