Simon Glass | 1 Mar 2011 01:27

[RFC PATCH] ARM: Use generic BUG() handler

I am looking for comments please on this patch.

ARM uses its own BUG() handler which makes its output slightly different
from other archtectures.

One of the problems is that the ARM implementation doesn't report the function
with the BUG() in it, but always reports the PC being in __bug(). The generic
implementation doesn't have this problem.

Currently we get something like:

kernel BUG at fs/proc/breakme.c:35!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
...
PC is at __bug+0x20/0x2c

With this patch it displays:

kernel BUG at fs/proc/breakme.c:35!
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
...
PC is at write_breakme+0xd0/0x1b4

This implementation uses an undefined instruction to implement BUG, and sets up
a bug table containing the relevant information.

Also backtraces were reported slightly differently - so I have added a newline
after the backtrace message, a space before the address, and ensured that the
message appears even when CONFIG_ARM_UNWIND is defined. These are aimed at
consistency between architectures, and may or may not be acceptable for ARM.
(Continue reading)

Viresh Kumar | 1 Mar 2011 05:33

[RFC] device.h: add device_set_platdata routine

device.h supports device_get_platdata but doesn't support device_set_platdata.
This routine is required by platforms in which device structure is declared
in a machine specific file and platform data comes from board specific file.

This will be used by SPEAr patches sent in separate patch series.

Signed-off-by: Viresh Kumar <viresh.kumar <at> st.com>
---
 include/linux/device.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 1bf5cf0..6ce0f20 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
 <at>  <at>  -576,6 +576,11  <at>  <at>  static inline void *dev_get_platdata(const struct device *dev)
 	return dev->platform_data;
 }

+static inline void dev_set_platdata(struct device *dev, void *platdata)
+{
+	dev->platform_data = platdata;
+}
+
 /*
  * Manual binding of a device to driver. See drivers/base/bus.c
  * for information on use.
--

-- 
1.7.2.2
(Continue reading)

Jason Chen | 1 Mar 2011 07:30
Favicon

[PATCH 2/2] ARM MX53_LOCO: add pwm backlight device

Signed-off-by: Jason Chen <b02280 <at> freescale.com>
---
 arch/arm/mach-mx5/board-mx53_loco.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
index 160899e..6c42185 100644
--- a/arch/arm/mach-mx5/board-mx53_loco.c
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
 <at>  <at>  -23,6 +23,7  <at>  <at> 
 #include <linux/fec.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/pwm_backlight.h>

 #include <mach/common.h>
 #include <mach/hardware.h>
 <at>  <at>  -35,6 +36,7  <at>  <at> 

 #include "crm_regs.h"
 #include "devices-imx53.h"
+#include "devices.h"

 #define LOCO_FEC_PHY_RST		IMX_GPIO_NR(7, 6)

 <at>  <at>  -203,6 +205,13  <at>  <at>  static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = {
 	.bitrate = 100000,
 };

+static struct platform_pwm_backlight_data loco_pwm_backlight_data = {
(Continue reading)

Jason Chen | 1 Mar 2011 07:30
Favicon

[PATCH 1/2] ARM imx53: add pwm devices support

Signed-off-by: Jason Chen <b02280 <at> freescale.com>
---
 arch/arm/mach-mx5/clock-mx51-mx53.c          |    2 ++
 arch/arm/mach-mx5/devices-imx53.h            |    4 ++++
 arch/arm/mach-mx5/devices.c                  |   10 ++++++++++
 arch/arm/mach-mx5/devices.h                  |    2 ++
 arch/arm/plat-mxc/devices/Kconfig            |    1 +
 arch/arm/plat-mxc/devices/platform-mxc_pwm.c |    9 +++++++++
 arch/arm/plat-mxc/pwm.c                      |    3 ++-
 7 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index 8164b1d..e18807b 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
 <at>  <at>  -1338,6 +1338,8  <at>  <at>  static struct clk_lookup mx53_lookups[] = {
 	_REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
 	_REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
 	_REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
+	_REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk)
+	_REGISTER_CLOCK("mxc_pwm.1", "pwm", pwm2_clk)
 };

 static void clk_tree_init(void)
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
index 9251008..5a1d6c9 100644
--- a/arch/arm/mach-mx5/devices-imx53.h
+++ b/arch/arm/mach-mx5/devices-imx53.h
 <at>  <at>  -33,3 +33,7  <at>  <at>  extern const struct imx_spi_imx_data imx53_ecspi_data[] __initconst;
 extern const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst;
(Continue reading)

Nicolas Pitre | 1 Mar 2011 07:39
Favicon

Re: [PATCH 1/4] ARM:boot:device tree: Allow the device tree binary to be appended to zImage

On Mon, 28 Feb 2011, John Bonesio wrote:

> This patch provides the ability to boot using a device tree that is appended
> to the raw binary zImage (e.g. cat zImage <filename>.dtb > zImage_w_dtb).
> 
> Signed-off-by: John Bonesio <bones <at> secretlab.ca>

Comments below.

> ---
> 
>  arch/arm/Kconfig                |    7 +++
>  arch/arm/boot/compressed/head.S |   93 ++++++++++++++++++++++++++++++++++++---
>  2 files changed, 94 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d8a330f..68fc640 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
>  <at>  <at>  -1593,6 +1593,13  <at>  <at>  config USE_OF
>  	help
>  	  Include support for flattened device tree machine descriptions.
>  
> +config ARM_APPENDED_DTB
> +       bool "Use appended device tree blob" if OF
> +       default n

The default is n by default, so you don't need to mention it.

Also this should depend on OF (CONFIG_OF).
(Continue reading)

Tony Prisk | 1 Mar 2011 07:38
Picon

[PATCH 1/1] GPIO support for WM8505

This patch is to correct the GPIO support for WM8505.
Current version was written for VT8500, but the WM8505 registers are located in different locations.

Signed-off-by: Tony Prisk (linux <at> prisktech.co.nz)
diff --git a/arch/arm/mach-vt8500/Makefile b/arch/arm/mach-vt8500/Makefile
index c0ae083..7422e8a 100644
--- a/arch/arm/mach-vt8500/Makefile
+++ b/arch/arm/mach-vt8500/Makefile
 <at>  <at>  -1,7 +1,7  <at>  <at> 
-obj-y += clock.o devices.o gpio.o irq.o timer.o
+obj-y += clock.o devices.o irq.o timer.o

-obj-$(CONFIG_VTWM_VERSION_VT8500) += devices-vt8500.o clocks-vt8500.o
-obj-$(CONFIG_VTWM_VERSION_WM8505) += devices-wm8505.o clocks-wm8505.o
+obj-$(CONFIG_VTWM_VERSION_VT8500) += devices-vt8500.o clocks-vt8500.o gpio.o
+obj-$(CONFIG_VTWM_VERSION_WM8505) += devices-wm8505.o clocks-wm8505.o gpio-wm8505.o

 obj-$(CONFIG_MACH_BV07) += bv07.o
 obj-$(CONFIG_MACH_WM8505_7IN_NETBOOK) += wm8505_7in.o
diff --git a/arch/arm/mach-vt8500/gpio-wm8505.c b/arch/arm/mach-vt8500/gpio-wm8505.c
new file mode 100644
index 0000000..cd2eee9
--- /dev/null
+++ b/arch/arm/mach-vt8500/gpio-wm8505.c
 <at>  <at>  -0,0 +1,246  <at>  <at> 
+/* linux/arch/arm/mach-wm8505/gpio-wm8505.c
+ *
+ * Copyright (C) 2010 Alexey Charkov <alchark <at> gmail.com>
+ * Copyright (C) 2011 Tony Prisk <linux <at> prisktech.co.nz>
+ *
(Continue reading)

Eric Miao | 1 Mar 2011 08:35
Favicon

Re: [PATCH 1/2] ARM imx53: add pwm devices support

On Tue, Mar 1, 2011 at 2:30 PM, Jason Chen <b02280 <at> freescale.com> wrote:
> Signed-off-by: Jason Chen <b02280 <at> freescale.com>

Looks perfect to me. Sascha?

> ---
>  arch/arm/mach-mx5/clock-mx51-mx53.c          |    2 ++
>  arch/arm/mach-mx5/devices-imx53.h            |    4 ++++
>  arch/arm/mach-mx5/devices.c                  |   10 ++++++++++
>  arch/arm/mach-mx5/devices.h                  |    2 ++
>  arch/arm/plat-mxc/devices/Kconfig            |    1 +
>  arch/arm/plat-mxc/devices/platform-mxc_pwm.c |    9 +++++++++
>  arch/arm/plat-mxc/pwm.c                      |    3 ++-
>  7 files changed, 30 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
> index 8164b1d..e18807b 100644
> --- a/arch/arm/mach-mx5/clock-mx51-mx53.c
> +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
>  <at>  <at>  -1338,6 +1338,8  <at>  <at>  static struct clk_lookup mx53_lookups[] = {
>        _REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
>        _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
>        _REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
> +       _REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk)
> +       _REGISTER_CLOCK("mxc_pwm.1", "pwm", pwm2_clk)
>  };
>
>  static void clk_tree_init(void)
> diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
> index 9251008..5a1d6c9 100644
(Continue reading)

Alexander Stein | 1 Mar 2011 08:38

Re: [PATCH] plat-mxc: Provide irq_chip name for GPIO IRQs

Hello,

On Monday 31 January 2011, 17:00:24 Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein <at> systec-electronic.com>
> ---
>  arch/arm/plat-mxc/gpio.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
> index d17b3c9..e396df8 100644
> --- a/arch/arm/plat-mxc/gpio.c
> +++ b/arch/arm/plat-mxc/gpio.c
>  <at>  <at>  -233,6 +233,7  <at>  <at>  static int gpio_set_wake_irq(struct irq_data *d, u32
> enable) }
> 
>  static struct irq_chip gpio_irq_chip = {
> +	.name = "GPIO",
>  	.irq_ack = gpio_ack_irq,
>  	.irq_mask = gpio_mask_irq,
>  	.irq_unmask = gpio_unmask_irq,

Did this get overlooked?

Regards,
Alexander
Uwe Kleine-König | 1 Mar 2011 09:10
Picon
Favicon
Gravatar

Re: [PATCH 1/2] ARM imx53: add pwm devices support

On Tue, Mar 01, 2011 at 02:30:17PM +0800, Jason Chen wrote:
> Signed-off-by: Jason Chen <b02280 <at> freescale.com>
> ---
>  arch/arm/mach-mx5/clock-mx51-mx53.c          |    2 ++
>  arch/arm/mach-mx5/devices-imx53.h            |    4 ++++
>  arch/arm/mach-mx5/devices.c                  |   10 ++++++++++
>  arch/arm/mach-mx5/devices.h                  |    2 ++
>  arch/arm/plat-mxc/devices/Kconfig            |    1 +
>  arch/arm/plat-mxc/devices/platform-mxc_pwm.c |    9 +++++++++
>  arch/arm/plat-mxc/pwm.c                      |    3 ++-
>  7 files changed, 30 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
> index 8164b1d..e18807b 100644
> --- a/arch/arm/mach-mx5/clock-mx51-mx53.c
> +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
>  <at>  <at>  -1338,6 +1338,8  <at>  <at>  static struct clk_lookup mx53_lookups[] = {
>  	_REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
>  	_REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
>  	_REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
> +	_REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk)
> +	_REGISTER_CLOCK("mxc_pwm.1", "pwm", pwm2_clk)
Do you really need "pwm"?  I think NULL should do the job.

>  };
>  
>  static void clk_tree_init(void)
> diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
> index 9251008..5a1d6c9 100644
> --- a/arch/arm/mach-mx5/devices-imx53.h
(Continue reading)

Eric Miao | 1 Mar 2011 09:21
Favicon

Re: [PATCH 1/2] ARM imx53: add pwm devices support

>>  config IMX_HAVE_PLATFORM_MXC_PWM
>>       bool
>> +     default y if ARCH_MX21 || ARCH_MX25 || SOC_IMX27 || SOC_IMX51 || SOC_IMX53
> If you do this, can you please use SOC_IMX21 and SOC_IMX25?  Or maybe
> even def_bool y?
>

Or the other way, in config SOC_IMX53, select IMX_HAVE_PLATFORM_MXC_PWM?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel <at> lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Gmane