Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [PATCH] pwm: Call pwm_enable() before pwm_config()
From: Mark Brown @ 2012-09-20 19:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50366464.4070801@metafoo.de>

On Thu, Aug 23, 2012 at 07:12:04PM +0200, Lars-Peter Clausen wrote:
> On 08/23/2012 06:57 PM, Beno??t Th??baudeau wrote:

> > exists with several other PWM drivers.

> Since this seems to be a common pattern in a number of PWM drivers it might
> make sense to simply add support for enabling/disabling a clk to the pwm core.
> Or maybe just use the runtime pm API for this. This probably makes even more
> sense and grab a reference to the pm context when the enable() is called,
> release it when disable() is called and also grab it before calling the
> device's config callback and release it afterward.

It's a problem with IPs in general, a good proportion of modern SoCs
need a clock supplying in order to interact with the registers on most
of their IPs.  runtime PM is the normal way forwards, Tegra recently
started using regmap's cache code to handle this transparently in the
driver.

^ permalink raw reply

* Re: [PATCH 07/29] ARM: OMAP1: Move lcd_mipid.h from plat to mach
From: Tony Lindgren @ 2012-09-20 18:17 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20120919210552.28074.21443.stgit@muffinssi>

* Tony Lindgren <tony@atomide.com> [120919 14:07]:
> This is only used by omap1.

This too is handled by Arnd's series already, dropping this one.

Regards,

Tony

^ permalink raw reply

* Re: [PATCH 04/29] ARM: OMAP1: Move board-ams-delta.h from plat to mach
From: Tony Lindgren @ 2012-09-20 17:12 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, linux-fbdev, Janusz Krzysztofik,
	Artem Bityutskiy, Dmitry Torokhov, alsa-devel, Peter Ujfalusi,
	Tomi Valkeinen, linux-mtd, linux-input, linux-omap, Liam Girdwood
In-Reply-To: <20120920011630.GB17666@opensource.wolfsonmicro.com>

* Mark Brown <broonie@opensource.wolfsonmicro.com> [120919 19:05]:
> On Wed, Sep 19, 2012 at 02:05:43PM -0700, Tony Lindgren wrote:
> > This is only used by omap1.
> > 
> > And to fix things properly, this should not be included
> > from the drivers at all.
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> 
> or I can apply it if that's easier.

Thanks I'll do a series for Arnd on top of the multiplatform
changes to avoid more merge conflicts.

Regards,

Tony

^ permalink raw reply

* Re: [PATCH 04/29] ARM: OMAP1: Move board-ams-delta.h from plat to mach
From: Tony Lindgren @ 2012-09-20 17:10 UTC (permalink / raw)
  To: Janusz Krzysztofik
  Cc: linux-arm-kernel, linux-fbdev, Mark Brown, Artem Bityutskiy,
	Dmitry Torokhov, alsa-devel, Peter Ujfalusi, Tomi Valkeinen,
	linux-mtd, linux-input, linux-omap, Liam Girdwood
In-Reply-To: <6194989.y5R5mbkCAc@acer>

* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [120920 06:48]:
> On Wed, 19 Sep 2012 14:05:43 Tony Lindgren wrote:
> > This is only used by omap1.
> > 
> > And to fix things properly, this should not be included
> > from the drivers at all.
> 
> Akced-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> 
> I'll take care of updating the drivers when I have some spare time.

Thanks those can be fixed by passing them in the platform data.

Regards,

Tony

^ permalink raw reply

* [PATCH 2/2] ARM: dts: mxs: add oled support for the cfa-10036
From: Maxime Ripard @ 2012-09-20 16:33 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348158800-23039-1-git-send-email-maxime.ripard@free-electrons.com>

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
---
 arch/arm/boot/dts/imx28-cfa10036.dts |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts
index c03a577..e5ee46e 100644
--- a/arch/arm/boot/dts/imx28-cfa10036.dts
+++ b/arch/arm/boot/dts/imx28-cfa10036.dts
@@ -33,11 +33,31 @@
 		};
 
 		apbx@80040000 {
+			pwm: pwm@80064000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pwm4_pins_a>;
+				status = "okay";
+			};
+
 			duart: serial@80074000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&duart_pins_b>;
 				status = "okay";
 			};
+
+			i2c0: i2c@80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_b>;
+				status = "okay";
+
+				ssd1307: oled@3c {
+					compatible = "solomon,ssd1307fb-i2c";
+					reg = <0x3c>;
+					pwms = <&pwm 4 3000>;
+					reset-gpios = <&gpio2 7 1>;
+					reset-active-low;
+				};
+			};
 		};
 	};
 
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH 1/2] video: Add support for the Solomon SSD1307 OLED Controller
From: Maxime Ripard @ 2012-09-20 16:33 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348158800-23039-1-git-send-email-maxime.ripard@free-electrons.com>

This patch adds support for the Solomon SSD1307 OLED
controller found on the Crystalfontz CFA10036 board.

This controller can drive a display with a resolution up
to 128x39 and can operate over I2C or SPI.

The current driver has only been tested on the CFA-10036,
that is using this controller over I2C to driver a 96x16
OLED screen.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
---
 .../devicetree/bindings/video/ssd1307fb.txt        |   24 ++
 drivers/video/Kconfig                              |   13 +
 drivers/video/Makefile                             |    1 +
 drivers/video/ssd1307fb.c                          |  407 ++++++++++++++++++++
 4 files changed, 445 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt
 create mode 100644 drivers/video/ssd1307fb.c

diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt
new file mode 100644
index 0000000..3d0060c
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt
@@ -0,0 +1,24 @@
+* Solomon SSD1307 Framebuffer Driver
+
+Required properties:
+  - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for
+    now is i2c.
+  - reg: Should contain address of the controller on the I2C bus. Most likely
+         0x3c or 0x3d
+  - pwm: Should contain the pwm to use according to the OF device tree PWM
+         specification [0]
+  - reset-gpios: Should contain the GPIO used to reset the OLED display
+
+Optional properties:
+  - reset-active-low: Is the reset gpio is active on physical low?
+
+[0]: Documentation/devicetree/bindings/pwm/pwm.txt
+
+Examples:
+ssd1307: oled@3c {
+        compatible = "solomon,ssd1307fb-i2c";
+        reg = <0x3c>;
+        pwms = <&pwm 4 3000>;
+        reset-gpios = <&gpio2 7>;
+        reset-active-low;
+};
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 0217f74..2776829 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2469,4 +2469,17 @@ config FB_SH_MOBILE_MERAM
 	  Up to 4 memory channels can be configured, allowing 4 RGB or
 	  2 YCbCr framebuffers to be configured.
 
+config FB_SSD1307
+	tristate "Solomon SSD1307 framebuffer support"
+	depends on FB && I2C
+	select FB_SYS_FOPS
+	select FB_SYS_FILLRECT
+	select FB_SYS_COPYAREA
+	select FB_SYS_IMAGEBLIT
+	select FB_DEFERRED_IO
+	select PWM
+	help
+	  This driver implements support for the Solomon SSD1307
+	  OLED controller over I2C.
+
 endmenu
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index ee8dafb..6bbb72c 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -164,6 +164,7 @@ obj-$(CONFIG_FB_BFIN_7393)        += bfin_adv7393fb.o
 obj-$(CONFIG_FB_MX3)		  += mx3fb.o
 obj-$(CONFIG_FB_DA8XX)		  += da8xx-fb.o
 obj-$(CONFIG_FB_MXS)		  += mxsfb.o
+obj-$(CONFIG_FB_SSD1307)	  += ssd1307fb.o
 
 # the test framebuffer is last
 obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
new file mode 100644
index 0000000..49e42ed
--- /dev/null
+++ b/drivers/video/ssd1307fb.c
@@ -0,0 +1,407 @@
+/*
+ * Driver for the Solomon SSD1307 OLED controler
+ *
+ * Copyright 2012 Free Electrons
+ *
+ * Licensed under the GPLv2 or later.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/i2c.h>
+#include <linux/fb.h>
+#include <linux/uaccess.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
+#include <linux/pwm.h>
+#include <linux/delay.h>
+
+#define SSD1307FB_WIDTH			96
+#define SSD1307FB_HEIGHT		16
+
+#define SSD1307FB_DATA			0x40
+#define SSD1307FB_COMMAND		0x80
+
+#define SSD1307FB_CONTRAST		0x81
+#define SSD1307FB_SEG_REMAP_ON		0xa1
+#define SSD1307FB_DISPLAY_OFF		0xae
+#define SSD1307FB_DISPLAY_ON		0xaf
+#define SSD1307FB_START_PAGE_ADDRESS	0xb0
+
+struct ssd1307fb_par {
+	struct i2c_client *client;
+	struct fb_info *info;
+	struct pwm_device *pwm;
+	u32 pwm_period;
+	int reset;
+};
+
+static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = {
+	.id		= "Solomon SSD1307",
+	.type		= FB_TYPE_PACKED_PIXELS,
+	.visual		= FB_VISUAL_MONO10,
+	.xpanstep	= 0,
+	.ypanstep	= 0,
+	.ywrapstep	= 0,
+	.line_length	= SSD1307FB_WIDTH / 8,
+	.accel		= FB_ACCEL_NONE,
+};
+
+static struct fb_var_screeninfo ssd1307fb_var __devinitdata = {
+	.xres		= SSD1307FB_WIDTH,
+	.yres		= SSD1307FB_HEIGHT,
+	.xres_virtual	= SSD1307FB_WIDTH,
+	.yres_virtual	= SSD1307FB_HEIGHT,
+	.bits_per_pixel	= 1,
+};
+
+static int ssd1307fb_write_array(struct i2c_client *client, u8 type, u8* cmd, u32 len)
+{
+	u8 *buf;
+	int ret = 0;
+
+	buf = kzalloc(len + 1, GFP_KERNEL);
+	if (!buf) {
+		dev_err(&client->dev, "Couldn't allocate sending buffer.\n");
+		return -ENOMEM;
+	}
+
+	buf[0] = type;
+	memcpy(buf + 1, cmd, len);
+
+	ret = i2c_master_send(client, buf, len + 1);
+	if (ret != len + 1) {
+		dev_err(&client->dev, "Couldn't send I2C command.\n");
+		goto error;
+	}
+
+error:
+	kfree(buf);
+	return ret;
+}
+
+static inline int ssd1307fb_write_cmd_array(struct i2c_client *client, u8* cmd, u32 len)
+{
+	return ssd1307fb_write_array(client, SSD1307FB_COMMAND, cmd, len);
+}
+
+static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
+{
+	return ssd1307fb_write_cmd_array(client, &cmd, 1);
+}
+
+static inline int ssd1307fb_write_data_array(struct i2c_client *client, u8* cmd, u32 len)
+{
+	return ssd1307fb_write_array(client, SSD1307FB_DATA, cmd, len);
+}
+
+static inline int ssd1307fb_write_data(struct i2c_client *client, u8 data)
+{
+	return ssd1307fb_write_data_array(client, &data, 1);
+}
+
+static void ssd1307fb_update_display(struct ssd1307fb_par *par)
+{
+	u8 *vmem = par->info->screen_base;
+	int i, j, k;
+
+	/*
+	 * The screen is divided in pages, each having a height of 8
+	 * pixels, and the width of the screen. When sending a byte of
+	 * data to the controller, it gives the 8 bits for the current
+	 * column. I.e, the first byte are the 8 bits of the first
+	 * column, then the 8 bits for the second column, etc.
+	 *
+	 *
+	 * Representation of the screen, assuming it is 5 bits
+	 * wide. Each letter-number combination is a bit that controls
+	 * one pixel.
+	 *
+	 * A0 A1 A2 A3 A4
+	 * B0 B1 B2 B3 B4
+	 * C0 C1 C2 C3 C4
+	 * D0 D1 D2 D3 D4
+	 * E0 E1 E2 E3 E4
+	 * F0 F1 F2 F3 F4
+	 * G0 G1 G2 G3 G4
+	 * H0 H1 H2 H3 H4
+	 *
+	 * If you want to update this screen, you need to send 5 bytes:
+	 *  (1) A0 B0 C0 D0 E0 F0 G0 H0
+	 *  (2) A1 B1 C1 D1 E1 F1 G1 H1
+	 *  (3) A2 B2 C2 D2 E2 F2 G2 H2
+	 *  (4) A3 B3 C3 D3 E3 F3 G3 H3
+	 *  (5) A4 B4 C4 D4 E4 F4 G4 H4
+	 */
+
+	for (i = 0; i < (SSD1307FB_HEIGHT / 8); i++) {
+		ssd1307fb_write_cmd(par->client, SSD1307FB_START_PAGE_ADDRESS + (i + 1));
+		ssd1307fb_write_cmd(par->client, 0x00);
+		ssd1307fb_write_cmd(par->client, 0x10);
+
+		for (j = 0; j < SSD1307FB_WIDTH; j++) {
+			u8 buf = 0;
+			for (k = 0; k < 8; k++) {
+				u32 page_length = SSD1307FB_WIDTH * i;
+				u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8;
+				u8 byte = *(vmem + index);
+				u8 bit = byte & (1 << (7 - (j % 8)));
+				bit = bit >> (7 - (j % 8));
+				buf |= bit << k;
+			}
+			ssd1307fb_write_data(par->client, buf);
+		}
+	}
+}
+
+
+static ssize_t ssd1307fb_write(struct fb_info *info, const char __user *buf,
+		size_t count, loff_t *ppos)
+{
+	struct ssd1307fb_par *par = info->par;
+	unsigned long total_size;
+	unsigned long p = *ppos;
+	u8 __iomem *dst;
+	int err = 0;
+
+	total_size = info->screen_size;
+
+	if (total_size = 0)
+		total_size = info->fix.smem_len;
+
+	if (p > total_size)
+		return -EFBIG;
+
+	if (count > total_size) {
+		err = -EFBIG;
+		count = total_size;
+	}
+
+	if (count + p > total_size) {
+		if (!err)
+			err = -ENOSPC;
+
+		count = total_size - p;
+	}
+
+	dst = (void __force *) (info->screen_base + p);
+
+	if (copy_from_user(dst, buf, count))
+		err = -EFAULT;
+
+	if  (!err)
+		*ppos += count;
+
+	ssd1307fb_update_display(par);
+
+	return (err) ? err : count;
+}
+
+static void ssd1307fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
+{
+	struct ssd1307fb_par *par = info->par;
+	sys_fillrect(info, rect);
+	ssd1307fb_update_display(par);
+}
+
+static void ssd1307fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) 
+{
+	struct ssd1307fb_par *par = info->par;
+	sys_copyarea(info, area);
+	ssd1307fb_update_display(par);
+}
+
+static void ssd1307fb_imageblit(struct fb_info *info, const struct fb_image *image) 
+{
+	struct ssd1307fb_par *par = info->par;
+	sys_imageblit(info, image);
+	ssd1307fb_update_display(par);
+}
+
+static struct fb_ops ssd1307fb_ops = {
+	.owner		= THIS_MODULE,
+	.fb_read	= fb_sys_read,
+	.fb_write	= ssd1307fb_write,
+	.fb_fillrect	= ssd1307fb_fillrect,
+	.fb_copyarea	= ssd1307fb_copyarea,
+	.fb_imageblit	= ssd1307fb_imageblit,
+};
+
+static void ssd1307fb_deferred_io(struct fb_info *info,
+				struct list_head *pagelist)
+{
+	ssd1307fb_update_display(info->par);
+}
+
+static struct fb_deferred_io ssd1307fb_defio = {
+	.delay		= HZ,
+	.deferred_io	= ssd1307fb_deferred_io,
+};
+
+static int __devinit ssd1307fb_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+	struct fb_info *info;
+	u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8;
+	struct ssd1307fb_par *par;
+	u8 *vmem;
+	int ret;
+
+	if (!client->dev.of_node) {
+		dev_err(&client->dev, "No device tree data found!\n");
+		return -EINVAL;
+	}
+
+	info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev);
+	if (!info) {
+		dev_err(&client->dev, "Couldn't allocate framebuffer.\n");
+		return -ENOMEM;
+	}
+
+	vmem = devm_kzalloc(&client->dev, vmem_size, GFP_KERNEL);
+	if (!vmem) {
+		dev_err(&client->dev, "Couldn't allocate graphical memory.\n");
+		ret = -ENOMEM;
+		goto fb_alloc_error;
+	}
+
+	info->fbops = &ssd1307fb_ops;
+	info->fix = ssd1307fb_fix;
+	info->fbdefio = &ssd1307fb_defio;
+
+	info->var = ssd1307fb_var;
+	info->var.red.length = 1;
+	info->var.red.offset = 0;
+	info->var.green.length = 1;
+	info->var.green.offset = 0;
+	info->var.blue.length = 1;
+	info->var.blue.offset = 0;
+
+	info->screen_base = (u8 __force __iomem *)vmem;
+	info->fix.smem_start = (unsigned long)vmem;
+	info->fix.smem_len = vmem_size;
+
+	fb_deferred_io_init(info);
+
+	par = info->par;
+	par->info = info;
+	par->client = client;
+
+	par->reset = of_get_named_gpio(client->dev.of_node,
+					 "reset-gpios", 0);
+	if (gpio_is_valid(par->reset)) {
+		int flags = GPIOF_OUT_INIT_HIGH;
+		if (of_get_property(client->dev.of_node,
+				    "reset-active-low", NULL))
+			flags = GPIOF_OUT_INIT_LOW;
+		ret = devm_gpio_request_one(&client->dev, par->reset,
+					    flags, "oled-reset");
+		if (ret) {
+			dev_err(&client->dev,
+				"failed to request gpio %d: %d\n",
+				par->reset, ret);
+			goto reset_oled_error;
+		}
+	}
+
+	par->pwm = pwm_get(&client->dev, NULL);
+	if (IS_ERR(par->pwm)) {
+		dev_err(&client->dev, "Could not get PWM from device tree!\n");
+		ret = PTR_ERR(par->pwm);
+		goto pwm_error;
+	}
+
+	par->pwm_period = pwm_get_period(par->pwm);
+
+	dev_dbg(&client->dev, "Using PWM%d with a %dns period.\n", par->pwm->pwm, par->pwm_period);
+
+	ret = register_framebuffer(info);
+	if (ret) {
+		dev_err(&client->dev, "Couldn't register the framebuffer\n");
+		goto fbreg_error;
+	}
+
+	i2c_set_clientdata(client, info);
+
+	/* Reset the screen */
+	gpio_set_value(par->reset, 1);
+	udelay(4);
+	gpio_set_value(par->reset, 0);
+	udelay(4);
+
+	/* Enable the PWM */
+	pwm_config(par->pwm, par->pwm_period / 2, par->pwm_period);
+	pwm_enable(par->pwm);
+
+	/* Map column 127 of the OLED to segment 0 */
+	ret = ssd1307fb_write_cmd(client, SSD1307FB_SEG_REMAP_ON);
+	if (ret < 0) {
+		dev_err(&client->dev, "Couldn't remap the screen.\n");
+		goto remap_error;
+	}
+
+	/* Turn on the display */
+	ret = ssd1307fb_write_cmd(client, SSD1307FB_DISPLAY_ON);
+	if (ret < 0) {
+		dev_err(&client->dev, "Couldn't turn the display on.\n");
+		goto remap_error;
+	}
+
+	dev_info(&client->dev, "fb%d: %s framebuffer device registered, using %d bytes of video memory\n", info->node, info->fix.id, vmem_size);
+
+	return 0;
+
+remap_error:
+	unregister_framebuffer(info);
+	pwm_disable(par->pwm);
+fbreg_error:
+	pwm_put(par->pwm);
+pwm_error:
+reset_oled_error:
+	fb_deferred_io_cleanup(info);
+fb_alloc_error:
+	framebuffer_release(info);
+	return ret;
+}
+
+static int __devexit ssd1307fb_remove(struct i2c_client *client)
+{
+	struct fb_info *info = i2c_get_clientdata(client);
+	struct ssd1307fb_par *par = info->par;
+
+	unregister_framebuffer(info);
+	pwm_disable(par->pwm);
+	pwm_put(par->pwm);
+	fb_deferred_io_cleanup(info);
+	framebuffer_release(info);
+
+	return 0;
+}
+
+static const struct i2c_device_id ssd1307fb_i2c_id[] = {
+	{ "ssd1307fb", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id);
+
+static const struct of_device_id ssd1307fb_of_match[] = {
+	{ .compatible = "solomon,ssd1307fb-i2c" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ssd1307fb_of_match);
+
+static struct i2c_driver ssd1307fb_driver = {
+	.probe = ssd1307fb_probe,
+	.remove = __devexit_p(ssd1307fb_remove),
+	.id_table = ssd1307fb_i2c_id,
+	.driver = {
+		.name = "ssd1307fb",
+		.of_match_table = of_match_ptr(ssd1307fb_of_match),
+		.owner = THIS_MODULE,
+	},
+};
+
+module_i2c_driver(ssd1307fb_driver);
+
+MODULE_DESCRIPTION("FB driver for the Solomon SSD1307 OLED controler");
+MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
+MODULE_LICENSE("GPL");
-- 
1.7.9.5


^ permalink raw reply related

* [PATCHv5 0/2] Add support for the OLED in the CFA10036
From: Maxime Ripard @ 2012-09-20 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi everyone,

This patchset adds support for the solomon SSD1307 OLED controller present
in the CFA-10036 board.

It first adds the framebuffer driver for this controller, and then the
needed bits to enable it in the cfa10036 dts.

Considering that the driver has been around since almost two months now, and
I have not received any comments on the framebuffer part, I'd very much like it
to be included in 3.7 if possible.

Thanks,
Maxime

Changes from v4:
  * Fix kernel crash when writing more data than the internal buffer space by
    adding boundary check for the fb_write function

Changes from v3:
  * Changed the dt property name to remove the leading oled- and changed the
    reset-gpio property to reset-gpios

Changes from v2:
  * Add the pin name as comment to the pwm4 pinctrl declaration
  * Change slightly the documentation of the dt bindings for the gpios to remove
    the mxs-specific cell.

Changes from v1:
  * Did some factorisation of the ssd1307fb_write* functions.
  * Filled the smem_start field of the fb_fix_screeninfo structure
  * Fixed the broken pwm declaration
  * Change the names of oled-reset-gpios and reset-active-low properties in the
    device tree to oled-reset-gpio and oled-reset-active-low for consistency

Maxime Ripard (2):
  video: Add support for the Solomon SSD1307 OLED Controller
  ARM: dts: mxs: add oled support for the cfa-10036

 .../devicetree/bindings/video/ssd1307fb.txt        |   24 ++
 arch/arm/boot/dts/imx28-cfa10036.dts               |   20 +
 drivers/video/Kconfig                              |   13 +
 drivers/video/Makefile                             |    1 +
 drivers/video/ssd1307fb.c                          |  407 ++++++++++++++++++++
 5 files changed, 465 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt
 create mode 100644 drivers/video/ssd1307fb.c

-- 
1.7.9.5


^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Arnd Bergmann @ 2012-09-20 15:56 UTC (permalink / raw)
  To: Shawn Guo
  Cc: alsa-devel, Mark Brown, Artem Bityutskiy, linux-fbdev,
	Wim Van Sebroeck, linux-mtd, linux-i2c, Florian Tobias Schandinat,
	Paulius Zaleckas, Chris Ball, linux-media, linux-watchdog,
	rtc-linux, Sascha Hauer, Rob Herring, linux-arm-kernel,
	Vinod Koul, Greg Kroah-Hartman, linux-usb, linux-mmc,
	Wolfram Sang, Javier Martin, Andrew Morton, Guennadi
In-Reply-To: <20120920145342.GI2450@S2101-09.ap.freescale.net>

On Thursday 20 September 2012, Shawn Guo wrote:
> 
> On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:
> > The first five branches are scheduled to go through the arm-soc tree, so
> > I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> > to expect that hitting mainline. If it always gets in very early during the
> > merge window, it's probably ok to put the imx/multi-platform patches into
> > the same branch as the other ones in arm-soc and wait for the sound stuff
> > to hit mainline first, otherwise I'd suggest we start a second
> > next/multiplatform-2 branch for imx and send the first part early on
> > but then wait with the second batch before sound gets in.
> > 
> It seems that we will have to go with next/multiplatform-2.  I just
> tried to merge the series with linux-next together, and got some
> non-trivial conflicts with media and mtd tree.  I might have to rebase
> my series on top of these trees to sort out those conflicts.  That said,
> I will have several dependencies outside arm-soc tree, and have to pend
> my series until all those trees get merged into mainline.

Ok, fair enough. I think we can put it in arm-soc/for-next as a staging
branch anyway to give it some exposure to linux-next, and then we can
decide whether a rebase is necessary before sending it to Linus.

	Arnd

^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Shawn Guo @ 2012-09-20 14:53 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Sascha Hauer,
	Javier Martin, Rob Herring, Mark Brown,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Florian Tobias Schandinat,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Chris Ball,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA, Guennadi Liakhovetski,
	linux-media-u79uwXL29TY76Z2rM5mHXA, Andrew Morton,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Artem Bityutskiy,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Wolfram Sang,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Vinod Koul, Paulius
In-Reply-To: <201209200739.34899.arnd-r2nGTMty4D4@public.gmane.org>

On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:
> The first five branches are scheduled to go through the arm-soc tree, so
> I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> to expect that hitting mainline. If it always gets in very early during the
> merge window, it's probably ok to put the imx/multi-platform patches into
> the same branch as the other ones in arm-soc and wait for the sound stuff
> to hit mainline first, otherwise I'd suggest we start a second
> next/multiplatform-2 branch for imx and send the first part early on
> but then wait with the second batch before sound gets in.
> 
It seems that we will have to go with next/multiplatform-2.  I just
tried to merge the series with linux-next together, and got some
non-trivial conflicts with media and mtd tree.  I might have to rebase
my series on top of these trees to sort out those conflicts.  That said,
I will have several dependencies outside arm-soc tree, and have to pend
my series until all those trees get merged into mainline.

Shawn

^ permalink raw reply

* Re: [PATCH 04/29] ARM: OMAP1: Move board-ams-delta.h from plat to mach
From: Janusz Krzysztofik @ 2012-09-20 13:41 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, linux-fbdev, Mark Brown, Artem Bityutskiy,
	Dmitry Torokhov, alsa-devel, Peter Ujfalusi, Tomi Valkeinen,
	linux-mtd, linux-input, linux-omap, Liam Girdwood
In-Reply-To: <20120919210543.28074.10214.stgit@muffinssi>

On Wed, 19 Sep 2012 14:05:43 Tony Lindgren wrote:
> This is only used by omap1.
> 
> And to fix things properly, this should not be included
> from the drivers at all.

Akced-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>

I'll take care of updating the drivers when I have some spare time.

Thanks,
Janusz

^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Shawn Guo @ 2012-09-20 13:36 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arnd Bergmann, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Sascha Hauer, Javier Martin, Rob Herring,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Florian Tobias Schandinat,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Chris Ball,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA, Guennadi Liakhovetski,
	linux-media-u79uwXL29TY76Z2rM5mHXA, Andrew Morton,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Artem Bityutskiy,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Wolfram Sang,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Vinod Koul,
	Paulius Zaleckas <paulius.zalecka>
In-Reply-To: <20120920124709.GN17666-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On Thu, Sep 20, 2012 at 08:47:10AM -0400, Mark Brown wrote:
> On Thu, Sep 20, 2012 at 07:52:15PM +0800, Shawn Guo wrote:
> > On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:
> 
> > > It's usually pretty early but Takashi will be on holiday this time so
> > > I'm not sure if things might be different (he was going to send the pull
> > > request from holiday).  I also didn't guarantee that it'll be stable
> > > yet, can someone please tell me what the depenency is here?
> 
> > We need the patch to have all imx drivers mach/* inclusion free,
> > so that we can enable multi-platform support for imx, which is the
> > whole point of the series.
> 
> That doesn't answer the question.  What is the dependency - what is it
> about this patch that something else depends on?  Your cover letters
> just say you'd like to do this but don't mention dependencies at all and
> when I asked the question last night you said the same thing.  I've not
> seen the rest of the series...
> 
Ah, right.  You did get copied on the whole series.  So the whole point
of patch "ASoC: mx27vis: retrieve gpio numbers from platform_data" is
to get rid of inclusion mach/iomux-mx27.h.  This has to be done before
we enable multi-platform support for imx, since mach/* has to be removed
completely for multi-platform build.

> > If your for-3.7 is not stable anyway, I guess the easiest the way
> 
> It probably *is* stable but I'm not enthused about people pulling
> unsigned tags.  I might rebase, though - I'm going to finalise the tree
> in the next few days.
> 
> > to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
> > numbers from platform_data" from your tree and I have it be part of
> > the series to go via arm-soc tree as a whole.  (This is the original
> > plan that I mentioned in v1 cover letter)
> 
> You just mentioned it as a preference (you said it's something you'd
> like to do), please if you're doing this sort of cross tree thing be
> explicit about what the inter-tree relationships are.  If things need to
> go in via the same tree say so explicitly (and ideally say way this is).
> 
Ok, my bad.

> The main reason I applied it straight away was that Javier mentioned
> that it was a bug fix and it's near the merge window and these random
> ARM cleanup serieses never seem to go in quickly.

The series is planned for 3.7 merge window.  Is it still possible for
you to drop the patch from your tree to ease the process?  Or I will
hold my pull-request to arm-soc until you tell me you have your tree
finalized.

Shawn

^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Mark Brown @ 2012-09-20 12:47 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Arnd Bergmann, linux-arm-kernel, Sascha Hauer, Javier Martin,
	Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
	Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
	Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
	Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
	Greg Kroah-Hartman, linux-usb, Vinod Koul,
	Paulius Zaleckas <paulius.zalecka>
In-Reply-To: <20120920115213.GF2450@S2101-09.ap.freescale.net>

On Thu, Sep 20, 2012 at 07:52:15PM +0800, Shawn Guo wrote:
> On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:

> > It's usually pretty early but Takashi will be on holiday this time so
> > I'm not sure if things might be different (he was going to send the pull
> > request from holiday).  I also didn't guarantee that it'll be stable
> > yet, can someone please tell me what the depenency is here?

> We need the patch to have all imx drivers mach/* inclusion free,
> so that we can enable multi-platform support for imx, which is the
> whole point of the series.

That doesn't answer the question.  What is the dependency - what is it
about this patch that something else depends on?  Your cover letters
just say you'd like to do this but don't mention dependencies at all and
when I asked the question last night you said the same thing.  I've not
seen the rest of the series...

> If your for-3.7 is not stable anyway, I guess the easiest the way

It probably *is* stable but I'm not enthused about people pulling
unsigned tags.  I might rebase, though - I'm going to finalise the tree
in the next few days.

> to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
> numbers from platform_data" from your tree and I have it be part of
> the series to go via arm-soc tree as a whole.  (This is the original
> plan that I mentioned in v1 cover letter)

You just mentioned it as a preference (you said it's something you'd
like to do), please if you're doing this sort of cross tree thing be
explicit about what the inter-tree relationships are.  If things need to
go in via the same tree say so explicitly (and ideally say way this is).

The main reason I applied it straight away was that Javier mentioned
that it was a bug fix and it's near the merge window and these random
ARM cleanup serieses never seem to go in quickly.

^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Shawn Guo @ 2012-09-20 11:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arnd Bergmann, linux-arm-kernel, Sascha Hauer, Javier Martin,
	Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
	Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
	Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
	Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
	Greg Kroah-Hartman, linux-usb, Vinod Koul,
	Paulius Zaleckas <paulius.zalecka>
In-Reply-To: <20120920114148.GH17666@opensource.wolfsonmicro.com>

On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:
> It's usually pretty early but Takashi will be on holiday this time so
> I'm not sure if things might be different (he was going to send the pull
> request from holiday).  I also didn't guarantee that it'll be stable
> yet, can someone please tell me what the depenency is here?

We need the patch to have all imx drivers mach/* inclusion free,
so that we can enable multi-platform support for imx, which is the
whole point of the series.

If your for-3.7 is not stable anyway, I guess the easiest the way
to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
numbers from platform_data" from your tree and I have it be part of
the series to go via arm-soc tree as a whole.  (This is the original
plan that I mentioned in v1 cover letter)

Shawn

^ permalink raw reply

* Re: [PATCH] video: exynos_dp: Add device tree support to DP driver
From: Jingoo Han @ 2012-09-20 11:46 UTC (permalink / raw)
  To: 'Ajay Kumar'
  Cc: FlorianSchandinat, linux-samsung-soc, linux-fbdev, thomas.ab,
	'Leela Krishna Amudala', 'Jingoo Han'
In-Reply-To: <1347561592-29400-1-git-send-email-ajaykumar.rs@samsung.com>

On Friday, September 14, 2012 3:40 AM Ajay Kumar wrote
> 
> This patch enables device tree based discovery support for DP driver.
> The driver is modified to handle platform data in both the cases:
> with DT and non-DT.
> 
> DP-PHY should be regarded as a seperate device node while
> being passed from device tree list, and device node for
> DP should contain DP-PHY as child node with property name "dp-phy"
> associated with it.

Hi Ajay,

Thank you for sending the patch for Device Tree support.
I tested the patch with Exynos5250.

As Leela Krishna Amudala mentioned, please post the documentation
for the bindings.

Also, I added some comments for minor fix.

Best regards,
Jingoo Han

> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/video/exynos/exynos_dp_core.c |  156 +++++++++++++++++++++++++++++++--
>  drivers/video/exynos/exynos_dp_core.h |    2 +
>  2 files changed, 151 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> index f57c915..15887bd 100644
> --- a/drivers/video/exynos/exynos_dp_core.c
> +++ b/drivers/video/exynos/exynos_dp_core.c
> @@ -18,6 +18,7 @@
>  #include <linux/io.h>
>  #include <linux/interrupt.h>
>  #include <linux/delay.h>
> +#include <linux/of.h>
> 
>  #include <video/exynos_dp.h>
> 
> @@ -856,20 +857,117 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg)
>  	return IRQ_HANDLED;
>  }
> 
> +#ifdef CONFIG_OF
> +struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev)
> +{
> +	struct device_node *dp_node = dev->of_node;
> +	struct exynos_dp_platdata *pd;
> +	struct video_info *dp_video_config;
> +
> +	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> +	if (!pd) {
> +		dev_err(dev, "memory allocation for pdata failed\n");
> +		return ERR_PTR(-ENOMEM);
> +	}
> +	dp_video_config = devm_kzalloc(dev,
> +				sizeof(*dp_video_config), GFP_KERNEL);
> +
> +	if (!dp_video_config) {
> +		dev_err(dev, "memory allocation for video config failed\n");
> +		return ERR_PTR(-ENOMEM);
> +	}
> +	pd->video_info = dp_video_config;
> +
> +	if (of_get_property(dp_node, "samsung,h-sync-polarity", NULL))
> +		dp_video_config->h_sync_polarity = 1;
> +
> +	if (of_get_property(dp_node, "samsung,v-sync-polarity", NULL))
> +		dp_video_config->v_sync_polarity = 1;
> +
> +	if (of_get_property(dp_node, "samsung,interlaced", NULL))
> +		dp_video_config->interlaced = 1;
> +
> +	of_property_read_u32(dp_node, "samsung,color_space",
> +				&dp_video_config->color_space);
> +
> +	of_property_read_u32(dp_node, "samsung,dynamic_range",
> +				&dp_video_config->dynamic_range);
> +
> +	of_property_read_u32(dp_node, "samsung,ycbcr_coeff",
> +				&dp_video_config->ycbcr_coeff);
> +
> +	of_property_read_u32(dp_node, "samsung,color_depth",
> +				&dp_video_config->color_depth);
> +
> +	of_property_read_u32(dp_node, "samsung,link_rate",
> +				&dp_video_config->link_rate);
> +
> +	of_property_read_u32(dp_node, "samsung,lane_count",
> +				&dp_video_config->lane_count);
> +	return pd;
> +}
> +
> +void exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp)
> +{
> +	struct device_node *dp_phy_node;
> +
> +	const __be32 *parp;
> +
> +	u32 phy_base;
> +
> +	void *virt_phy_base;

Please, remove unnecessary spaces between variables.


> +
> +	parp = of_get_property(dp->dev->of_node, "dp_phy", NULL);
> +	if (!parp) {
> +		dp->dp_phy_addr = NULL;
> +		return;
> +	}
> +
> +	dp_phy_node = of_find_node_by_phandle(be32_to_cpup(parp));
> +	if (!dp_phy_node) {
> +		dp->dp_phy_addr = NULL;
> +		return;
> +	}
> +
> +	of_property_read_u32(dp_phy_node, "samsung,dptx_phy_reg", &phy_base);
> +	of_property_read_u32(dp_phy_node, "samsung,enable_bit",
> +							&dp->enable_bit);
> +	virt_phy_base = ioremap(phy_base, SZ_4);
> +	if (!virt_phy_base) {
> +		dev_err(dp->dev, "failed to ioremap dp-phy\n");
> +		dp->dp_phy_addr = NULL;
> +		return;
> +	}
> +	dp->dp_phy_addr = virt_phy_base;
> +}
> +
> +void dp_phy_init(struct exynos_dp_device *dp)

Use exynos_dp_phy_init.

> +{
> +	u32 reg;
> +
> +	reg = __raw_readl(dp->dp_phy_addr);
> +	reg |= dp->enable_bit;
> +	__raw_writel(reg, dp->dp_phy_addr);
> +}
> +
> +void dp_phy_exit(struct exynos_dp_device *dp)

Use exynos_dp_phy_exit.

> +{
> +	u32 reg;
> +
> +	reg = __raw_readl(dp->dp_phy_addr);
> +	reg &= ~(dp->enable_bit);
> +	__raw_writel(reg, dp->dp_phy_addr);
> +}
> +#endif /* CONFIG_OF */
> +
>  static int __devinit exynos_dp_probe(struct platform_device *pdev)
>  {
>  	struct resource *res;
>  	struct exynos_dp_device *dp;
> -	struct exynos_dp_platdata *pdata;
> +	struct exynos_dp_platdata *pdata = pdev->dev.platform_data;
> 
>  	int ret = 0;
> 
> -	pdata = pdev->dev.platform_data;
> -	if (!pdata) {
> -		dev_err(&pdev->dev, "no platform data\n");
> -		return -EINVAL;
> -	}
> -
>  	dp = devm_kzalloc(&pdev->dev, sizeof(struct exynos_dp_device),
>  				GFP_KERNEL);
>  	if (!dp) {
> @@ -879,6 +982,19 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> 
>  	dp->dev = &pdev->dev;
> 
> +	if (pdev->dev.of_node) {
> +		pdata = exynos_dp_dt_parse_pdata(&pdev->dev);
> +		if (IS_ERR(pdata))
> +			return PTR_ERR(pdata);
> +
> +		exynos_dp_dt_parse_phydata(dp);
> +	}

I would like to use the style as follows.

if (pdev->dev.of_node) {
	DT case
else
	Non-DT case

Could you modify it as follows?

+	if (pdev->dev.of_node) {
+		pdata = exynos_dp_dt_parse_pdata(&pdev->dev);
+		if (IS_ERR(pdata))
+			return PTR_ERR(pdata);
+
+		exynos_dp_dt_parse_phydata(dp);
+	} else {
+		pdata = pdev->dev.platform_data;
+	}


> +
> +	if (!pdata) {
> +		dev_err(&pdev->dev, "no platform data\n");
> +		return -EINVAL;
> +	}
> +
>  	dp->clock = devm_clk_get(&pdev->dev, "dp");
>  	if (IS_ERR(dp->clock)) {
>  		dev_err(&pdev->dev, "failed to get clock\n");
> @@ -909,9 +1025,13 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>  	}
> 
>  	dp->video_info = pdata->video_info;
>  	if (pdata->phy_init)
>  		pdata->phy_init();
> 
> +	if (pdev->dev.of_node)
> +		if (dp->dp_phy_addr)
> +			dp_phy_init(dp);
> +

Could you modify it as follows?
phy_init() and dp_phy_init(dp) cannot be used simultaneously.
So, it seems to be clearer.

-	if (pdata->phy_init)
-		pdata->phy_init();
+
+	if (pdev->dev.of_node) {
+		if (dp->dp_phy_addr)
+			dp_phy_init(dp);
+	} else {
+		if (pdata->phy_init)
+			pdata->phy_init();
+	}


>  	exynos_dp_init_dp(dp);
> 
>  	ret = exynos_dp_detect_hpd(dp);
> @@ -956,6 +1077,10 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
>  	if (pdata && pdata->phy_exit)
>  		pdata->phy_exit();
> 
> +	if (pdev->dev.of_node)
> +		if (dp->dp_phy_addr)
> +			dp_phy_exit(dp);
> +

Same as above.

>  	clk_disable(dp->clock);
> 
>  	return 0;
> @@ -971,6 +1096,10 @@ static int exynos_dp_suspend(struct device *dev)
>  	if (pdata && pdata->phy_exit)
>  		pdata->phy_exit();
> 
> +	if (dev->of_node)
> +		if (dp->dp_phy_addr)
> +			dp_phy_exit(dp);
> +

Same as above.

>  	clk_disable(dp->clock);
> 
>  	return 0;
> @@ -985,6 +1114,10 @@ static int exynos_dp_resume(struct device *dev)
>  	if (pdata && pdata->phy_init)
>  		pdata->phy_init();
> 
> +	if (dev->of_node)
> +		if (dp->dp_phy_addr)
> +			dp_phy_init(dp);
> +

Same as above.

>  	clk_enable(dp->clock);
> 
>  	exynos_dp_init_dp(dp);
> @@ -1013,6 +1146,14 @@ static const struct dev_pm_ops exynos_dp_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(exynos_dp_suspend, exynos_dp_resume)
>  };
> 
> +#ifdef CONFIG_OF
> +static const struct of_device_id exynos_dp_match[] = {
> +	{ .compatible = "samsung,exynos5-dp" },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, exynos_dp_match);
> +#endif
> +
>  static struct platform_driver exynos_dp_driver = {
>  	.probe		= exynos_dp_probe,
>  	.remove		= __devexit_p(exynos_dp_remove),
> @@ -1020,6 +1161,7 @@ static struct platform_driver exynos_dp_driver = {
>  		.name	= "exynos-dp",
>  		.owner	= THIS_MODULE,
>  		.pm	= &exynos_dp_pm_ops,
> +		.of_match_table = of_match_ptr(exynos_dp_match),
>  	},
>  };
> 
> diff --git a/drivers/video/exynos/exynos_dp_core.h b/drivers/video/exynos/exynos_dp_core.h
> index 57b8a65..49b30cb 100644
> --- a/drivers/video/exynos/exynos_dp_core.h
> +++ b/drivers/video/exynos/exynos_dp_core.h
> @@ -29,6 +29,8 @@ struct exynos_dp_device {
>  	struct clk		*clock;
>  	unsigned int		irq;
>  	void __iomem		*reg_base;
> +	void __iomem		*dp_phy_addr;
> +	int			enable_bit;

How about replacing 'int' with 'unsigned int'?
unsigned number would be better for the bit definition.

> 
>  	struct video_info	*video_info;
>  	struct link_train	link_train;
> --
> 1.7.0.4


^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Mark Brown @ 2012-09-20 11:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: alsa-devel, Artem Bityutskiy, linux-fbdev, Wim Van Sebroeck,
	linux-mtd, linux-i2c, Florian Tobias Schandinat, Paulius Zaleckas,
	Chris Ball, linux-media, linux-watchdog, rtc-linux, Sascha Hauer,
	Rob Herring, linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman,
	linux-usb, linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
	Shawn Guo, Guennadi Liakhovetski <g.liakhove>
In-Reply-To: <201209200739.34899.arnd@arndb.de>

On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:

> The first five branches are scheduled to go through the arm-soc tree, so
> I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> to expect that hitting mainline. If it always gets in very early during the
> merge window, it's probably ok to put the imx/multi-platform patches into
> the same branch as the other ones in arm-soc and wait for the sound stuff
> to hit mainline first, otherwise I'd suggest we start a second
> next/multiplatform-2 branch for imx and send the first part early on
> but then wait with the second batch before sound gets in.

It's usually pretty early but Takashi will be on holiday this time so
I'm not sure if things might be different (he was going to send the pull
request from holiday).  I also didn't guarantee that it'll be stable
yet, can someone please tell me what the depenency is here?

^ permalink raw reply

* Re: [RFC PATCH 3/3] ARM: vexpress: configure CLCD driver device tree support for A9 CoreTile
From: Liviu Dudau @ 2012-09-20 10:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348070666-9153-4-git-send-email-ryan.harkin@linaro.org>

On Wed, Sep 19, 2012 at 05:04:26PM +0100, Ryan Harkin wrote:
> Configuration for the amba-clcd PL111 driver is added to the A9 CoreTile's DTS
> file.
>
> Configuration of the motherboard CLCD driver is removed from the DTSI files to
> prevent duplicate CLCD drivers being registered.
>
> A generic set of CLCD panel descriptions has been split into its own DTSI file.
> Currently, only XVGA and VGA monitors are described.

Hi Ryan,

For this and [2/3] patch:

Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>


>
> Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
> ---
>  arch/arm/boot/dts/clcd-panels.dtsi      |   52 +++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/vexpress-v2m-rs1.dtsi |    8 ++---
>  arch/arm/boot/dts/vexpress-v2m.dtsi     |    8 ++---
>  arch/arm/boot/dts/vexpress-v2p-ca9.dts  |    6 ++++
>  4 files changed, 62 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/boot/dts/clcd-panels.dtsi b/arch/arm/boot/dts/clcd-panels.dtsi
> new file mode 100644
> index 0000000..0b0ff6e
> --- /dev/null
> +++ b/arch/arm/boot/dts/clcd-panels.dtsi
> @@ -0,0 +1,52 @@
> +/*
> + * ARM Ltd. Versatile Express
> + *
> + */
> +
> +/ {
> +     panels {
> +             panel@0 {
> +                     compatible      = "panel";
> +                     mode            = "VGA";
> +                     refresh         = <60>;
> +                     xres            = <640>;
> +                     yres            = <480>;
> +                     pixclock        = <39721>;
> +                     left_margin     = <40>;
> +                     right_margin    = <24>;
> +                     upper_margin    = <32>;
> +                     lower_margin    = <11>;
> +                     hsync_len       = <96>;
> +                     vsync_len       = <2>;
> +                     sync            = <0>;
> +                     vmode           = "FB_VMODE_NONINTERLACED";
> +
> +                     tim2            = "TIM2_BCD", "TIM2_IPC";
> +                     cntl            = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
> +                     caps            = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
> +                     bpp             = <16>;
> +             };
> +
> +             panel@1 {
> +                     compatible      = "panel";
> +                     mode            = "XVGA";
> +                     refresh         = <60>;
> +                     xres            = <1024>;
> +                     yres            = <768>;
> +                     pixclock        = <15748>;
> +                     left_margin     = <152>;
> +                     right_margin    = <48>;
> +                     upper_margin    = <23>;
> +                     lower_margin    = <3>;
> +                     hsync_len       = <104>;
> +                     vsync_len       = <4>;
> +                     sync            = <0>;
> +                     vmode           = "FB_VMODE_NONINTERLACED";
> +
> +                     tim2            = "TIM2_BCD", "TIM2_IPC";
> +                     cntl            = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
> +                     caps            = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
> +                     bpp             = <16>;
> +             };
> +     };
> +};
> diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> index d8a827b..301d3f6 100644
> --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> @@ -17,6 +17,8 @@
>   * CHANGES TO vexpress-v2m.dtsi!
>   */
>
> +/include/ "clcd-panels.dtsi"
> +
>  / {
>       aliases {
>               arm,v2m_timer = &v2m_timer01;
> @@ -193,12 +195,6 @@
>                                      0x1a0100 0xf00>;
>                               reg-shift = <2>;
>                       };
> -
> -                     clcd@1f0000 {
> -                             compatible = "arm,pl111", "arm,primecell";
> -                             reg = <0x1f0000 0x1000>;
> -                             interrupts = <14>;
> -                     };
>               };
>
>               v2m_fixed_3v3: fixedregulator@0 {
> diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi
> index dba53fd..43cd86f 100644
> --- a/arch/arm/boot/dts/vexpress-v2m.dtsi
> +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi
> @@ -17,6 +17,8 @@
>   * CHANGES TO vexpress-v2m-rs1.dtsi!
>   */
>
> +/include/ "clcd-panels.dtsi"
> +
>  / {
>       aliases {
>               arm,v2m_timer = &v2m_timer01;
> @@ -192,12 +194,6 @@
>                                      0x1a100 0xf00>;
>                               reg-shift = <2>;
>                       };
> -
> -                     clcd@1f000 {
> -                             compatible = "arm,pl111", "arm,primecell";
> -                             reg = <0x1f000 0x1000>;
> -                             interrupts = <14>;
> -                     };
>               };
>
>               v2m_fixed_3v3: fixedregulator@0 {
> diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts
> index 3f0c736..2ebb132 100644
> --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts
> +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts
> @@ -9,6 +9,8 @@
>
>  /dts-v1/;
>
> +/memreserve/ 0x9f000000 0x01000000;
> +
>  / {
>       model = "V2P-CA9";
>       arm,hbi = <0x191>;
> @@ -70,6 +72,10 @@
>               compatible = "arm,pl111", "arm,primecell";
>               reg = <0x10020000 0x1000>;
>               interrupts = <0 44 4>;
> +             mode = "XVGA";
> +             arm,vexpress-osc = <1>;
> +             use_dma = <1>;
> +             framebuffer = <0x9f000000 0x01000000>;
>       };
>
>       memory-controller@100e0000 {
> --
> 1.7.9.5
>
>

--
==========
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.


^ permalink raw reply

* Re: [RFC PATCH 1/3] amba-clcd: Add Device Tree support to amba-clcd driver
From: Liviu Dudau @ 2012-09-20 10:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348070666-9153-2-git-send-email-ryan.harkin@linaro.org>

On Wed, Sep 19, 2012 at 05:04:24PM +0100, Ryan Harkin wrote:
> Add support to parse the display configuration from device tree.
>
> If the board does not provide platform specific functions in the struct
> clcd_board contained with the amba device info, then defaults are provided
> by the driver.
>
> The device tree configuration can either ask for a DMA setup or provide a
> framebuffer address to be remapped into the driver.
>
> Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
> ---
>  drivers/video/amba-clcd.c |  253 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 253 insertions(+)
>
> diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
> index 0a2cce7..01dbad1 100644
> --- a/drivers/video/amba-clcd.c
> +++ b/drivers/video/amba-clcd.c
> @@ -16,7 +16,10 @@
>  #include <linux/string.h>
>  #include <linux/slab.h>
>  #include <linux/delay.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/memblock.h>
>  #include <linux/mm.h>
> +#include <linux/of.h>
>  #include <linux/fb.h>
>  #include <linux/init.h>
>  #include <linux/ioport.h>
> @@ -391,6 +394,19 @@ static int clcdfb_blank(int blank_mode, struct fb_info *info)
>       }
>       return 0;
>  }
> +int clcdfb_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vma)
> +{
> +     return dma_mmap_writecombine(&fb->dev->dev, vma,
> +                                  fb->fb.screen_base,
> +                                  fb->fb.fix.smem_start,
> +                                  fb->fb.fix.smem_len);
> +}
> +
> +void clcdfb_remove_dma(struct clcd_fb *fb)
> +{
> +     dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
> +                           fb->fb.screen_base, fb->fb.fix.smem_start);
> +}
>
>  static int clcdfb_mmap(struct fb_info *info,
>                      struct vm_area_struct *vma)
> @@ -542,12 +558,249 @@ static int clcdfb_register(struct clcd_fb *fb)
>       return ret;
>  }
>
> +struct string_lookup {
> +     const char *string;
> +     const u32       val;
> +};
> +
> +static struct string_lookup vmode_lookups[] = {
> +     { "FB_VMODE_NONINTERLACED", FB_VMODE_NONINTERLACED},
> +     { "FB_VMODE_INTERLACED",    FB_VMODE_INTERLACED},
> +     { "FB_VMODE_DOUBLE",        FB_VMODE_DOUBLE},
> +     { "FB_VMODE_ODD_FLD_FIRST", FB_VMODE_ODD_FLD_FIRST},
> +     { NULL, 0 },
> +};
> +
> +static struct string_lookup tim2_lookups[] = {
> +     { "TIM2_CLKSEL", TIM2_CLKSEL},
> +     { "TIM2_IVS",    TIM2_IVS},
> +     { "TIM2_IHS",    TIM2_IHS},
> +     { "TIM2_IPC",    TIM2_IPC},
> +     { "TIM2_IOE",    TIM2_IOE},
> +     { "TIM2_BCD",    TIM2_BCD},
> +     { NULL, 0},
> +};
> +static struct string_lookup cntl_lookups[] = {
> +     {"CNTL_LCDEN",        CNTL_LCDEN},
> +     {"CNTL_LCDBPP1",      CNTL_LCDBPP1},
> +     {"CNTL_LCDBPP2",      CNTL_LCDBPP2},
> +     {"CNTL_LCDBPP4",      CNTL_LCDBPP4},
> +     {"CNTL_LCDBPP8",      CNTL_LCDBPP8},
> +     {"CNTL_LCDBPP16",     CNTL_LCDBPP16},
> +     {"CNTL_LCDBPP16_565", CNTL_LCDBPP16_565},
> +     {"CNTL_LCDBPP16_444", CNTL_LCDBPP16_444},
> +     {"CNTL_LCDBPP24",     CNTL_LCDBPP24},
> +     {"CNTL_LCDBW",        CNTL_LCDBW},
> +     {"CNTL_LCDTFT",       CNTL_LCDTFT},
> +     {"CNTL_LCDMONO8",     CNTL_LCDMONO8},
> +     {"CNTL_LCDDUAL",      CNTL_LCDDUAL},
> +     {"CNTL_BGR",          CNTL_BGR},
> +     {"CNTL_BEBO",         CNTL_BEBO},
> +     {"CNTL_BEPO",         CNTL_BEPO},
> +     {"CNTL_LCDPWR",       CNTL_LCDPWR},
> +     {"CNTL_LCDVCOMP(1)",  CNTL_LCDVCOMP(1)},
> +     {"CNTL_LCDVCOMP(2)",  CNTL_LCDVCOMP(2)},
> +     {"CNTL_LCDVCOMP(3)",  CNTL_LCDVCOMP(3)},
> +     {"CNTL_LCDVCOMP(4)",  CNTL_LCDVCOMP(4)},
> +     {"CNTL_LCDVCOMP(5)",  CNTL_LCDVCOMP(5)},
> +     {"CNTL_LCDVCOMP(6)",  CNTL_LCDVCOMP(6)},
> +     {"CNTL_LCDVCOMP(7)",  CNTL_LCDVCOMP(7)},
> +     {"CNTL_LDMAFIFOTIME", CNTL_LDMAFIFOTIME},
> +     {"CNTL_WATERMARK",    CNTL_WATERMARK},
> +     { NULL, 0},
> +};
> +static struct string_lookup caps_lookups[] = {
> +     {"CLCD_CAP_RGB444",  CLCD_CAP_RGB444},
> +     {"CLCD_CAP_RGB5551", CLCD_CAP_RGB5551},
> +     {"CLCD_CAP_RGB565",  CLCD_CAP_RGB565},
> +     {"CLCD_CAP_RGB888",  CLCD_CAP_RGB888},
> +     {"CLCD_CAP_BGR444",  CLCD_CAP_BGR444},
> +     {"CLCD_CAP_BGR5551", CLCD_CAP_BGR5551},
> +     {"CLCD_CAP_BGR565",  CLCD_CAP_BGR565},
> +     {"CLCD_CAP_BGR888",  CLCD_CAP_BGR888},
> +     {"CLCD_CAP_444",     CLCD_CAP_444},
> +     {"CLCD_CAP_5551",    CLCD_CAP_5551},
> +     {"CLCD_CAP_565",     CLCD_CAP_565},
> +     {"CLCD_CAP_888",     CLCD_CAP_888},
> +     {"CLCD_CAP_RGB",     CLCD_CAP_RGB},
> +     {"CLCD_CAP_BGR",     CLCD_CAP_BGR},
> +     {"CLCD_CAP_ALL",     CLCD_CAP_ALL},
> +     { NULL, 0},
> +};
> +
> +u32 parse_setting(struct string_lookup *lookup, const char *name)
> +{
> +     int i = 0;
> +     while (lookup[i].string != NULL) {
> +             if (strcmp(lookup[i].string, name) = 0)
> +                     return lookup[i].val;
> +             ++i;
> +     }
> +     return -EINVAL;
> +}
> +
> +u32 get_string_lookup(struct device_node *node, const char *name,
> +                   struct string_lookup *lookup)
> +{

I have this feeling that swapping the names of the two functions above
would reflect better their actual functionality.

> +     const char *string;
> +     int count, i, ret = 0;
> +
> +     count = of_property_count_strings(node, name);
> +     if (count >= 0)
> +             for (i = 0; i < count; i++)
> +                     if (of_property_read_string_index(node, name, i,
> +                                     &string) = 0)
> +                             ret |= parse_setting(lookup, string);
> +     return ret;
> +}
> +
> +int get_val(struct device_node *node, const char *string)
> +{
> +     u32 ret = 0;
> +
> +     if (of_property_read_u32(node, string, &ret))
> +             ret = -1;
> +     return ret;
> +}
> +
> +struct clcd_panel *getPanel(struct device_node *node)
> +{
> +     static struct clcd_panel panel;
> +
> +     panel.mode.refresh      = get_val(node, "refresh");
> +     panel.mode.xres         = get_val(node, "xres");
> +     panel.mode.yres         = get_val(node, "yres");
> +     panel.mode.pixclock     = get_val(node, "pixclock");
> +     panel.mode.left_margin  = get_val(node, "left_margin");
> +     panel.mode.right_margin = get_val(node, "right_margin");
> +     panel.mode.upper_margin = get_val(node, "upper_margin");
> +     panel.mode.lower_margin = get_val(node, "lower_margin");
> +     panel.mode.hsync_len    = get_val(node, "hsync_len");
> +     panel.mode.vsync_len    = get_val(node, "vsync_len");
> +     panel.mode.sync         = get_val(node, "sync");
> +     panel.bpp               = get_val(node, "bpp");
> +     panel.width             = (signed short) get_val(node, "width");
> +     panel.height            = (signed short) get_val(node, "height");
> +
> +     panel.mode.vmode = get_string_lookup(node, "vmode", vmode_lookups);
> +     panel.tim2       = get_string_lookup(node, "tim2",  tim2_lookups);
> +     panel.cntl       = get_string_lookup(node, "cntl",  cntl_lookups);
> +     panel.caps       = get_string_lookup(node, "caps",  caps_lookups);
> +
> +     return &panel;
> +}
> +
> +struct clcd_panel *clcdfb_get_panel(const char *name)
> +{
> +     struct device_node *node = NULL;
> +     const char *mode;
> +     struct clcd_panel *panel = NULL;
> +
> +     do {
> +             node = of_find_compatible_node(node, NULL, "panel");
> +             if (node)
> +                     if (of_property_read_string(node, "mode", &mode) = 0)
> +                             if (strcmp(mode, name) = 0) {
> +                                     panel = getPanel(node);
> +                                     panel->mode.name = name;
> +                             }
> +     } while (node != NULL);
> +
> +     return panel;
> +}
> +
> +#ifdef CONFIG_OF

shouldn't this #ifdef be earlier? you are calling of_property_read_string()
and while there are empty definitions if CONFIG_OF is not defined, the code
will do nothing in that case. Is that intended? The clcdfb_get_panel()
function only gets called if CONFIG_OF *is* defined.


> +static int clcdfb_dt_init(struct clcd_fb *fb)
> +{
> +     int err = 0;
> +     struct device_node *node;
> +     const char *mode;
> +     dma_addr_t dma;
> +     u32 use_dma;
> +     const __be32 *prop;
> +     int len, na, ns;
> +     phys_addr_t fb_base, fb_size;
> +
> +     node = fb->dev->dev.of_node;
> +     if (!node)
> +             return -ENODEV;
> +
> +     na = of_n_addr_cells(node);
> +     ns = of_n_size_cells(node);
> +
> +     if (WARN_ON(of_property_read_string(node, "mode", &mode)))
> +             return -ENODEV;
> +
> +     fb->panel = clcdfb_get_panel(mode);
> +     if (!fb->panel)
> +             return -EINVAL;
> +     fb->fb.fix.smem_len = fb->panel->mode.xres * fb->panel->mode.yres * 2;
> +
> +     if (of_property_read_u32(node, "use_dma", &use_dma))

I haven't seen any documentation for this property. What's the intended use?

> +             use_dma = 0;
> +     if (use_dma) {
> +             fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev,
> +                     fb->fb.fix.smem_len, &dma, GFP_KERNEL);
> +             if (!fb->fb.screen_base) {
> +                     pr_err("CLCD: unable to map framebuffer\n");
> +                     err = -ENOMEM;
> +             } else
> +                     fb->fb.fix.smem_start   = dma;
> +     } else {
> +             prop = of_get_property(node, "framebuffer", &len);
> +             if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop)))
> +                     return -EINVAL;
> +             fb_base = of_read_number(prop, na);
> +             fb_size = of_read_number(prop + na, ns);
> +
> +             if (memblock_remove(fb_base, fb_size) != 0)
> +                     return -EINVAL;
> +
> +             fb->fb.fix.smem_start = fb_base;
> +             fb->fb.screen_base = ioremap_wc(fb->fb.fix.smem_start, fb_size);
> +     }
> +     return err;
> +}
> +#endif /* CONFIG_OF */
> +
>  static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
>  {
>       struct clcd_board *board = dev->dev.platform_data;
>       struct clcd_fb *fb;
>       int ret;
>
> +#ifdef CONFIG_OF
> +     if (dev->dev.of_node) {
> +             const __be32 *prop;
> +             int len, na, ns;
> +             phys_addr_t reg_base;
> +
> +             na = of_n_addr_cells(dev->dev.of_node);
> +             ns = of_n_size_cells(dev->dev.of_node);
> +
> +             prop = of_get_property(dev->dev.of_node, "reg", &len);
> +             if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop)))
> +                     return -EINVAL;
> +             reg_base = of_read_number(prop, na);
> +
> +             if (dev->res.start != reg_base)
> +                     return -EINVAL;
> +
> +             if (!board) {
> +                     board = kzalloc(sizeof(struct clcd_board), GFP_KERNEL);
> +                     if (!board)
> +                             return -EINVAL;
> +                     board->name    = "Device Tree CLCD PL111";
> +                     board->caps    = CLCD_CAP_5551 | CLCD_CAP_565;
> +                     board->check   = clcdfb_check;
> +                     board->decode  = clcdfb_decode;
> +                     board->setup   = clcdfb_dt_init;
> +                     board->mmap    = clcdfb_mmap_dma;
> +                     board->remove  = clcdfb_remove_dma;
> +             }
> +     }
> +#endif /* CONFIG_OF */
> +
>       if (!board)
>               return -EINVAL;
>
> --
> 1.7.9.5
>
>

--
==========
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.


^ permalink raw reply

* Re: [PATCH v2 00/34] i.MX multi-platform support
From: Arnd Bergmann @ 2012-09-20  7:39 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
	Mark Brown, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
	Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
	Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
	Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
	Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius
In-Reply-To: <1348123547-31082-1-git-send-email-shawn.guo@linaro.org>

On Thursday 20 September 2012, Shawn Guo wrote:
> 
> Here is the second post, which should have addressed the comments that
> reviewers put on v1.
> 
> It's available on branch below.
> 
>   git://git.linaro.org/people/shawnguo/linux-2.6.git imx/multi-platform-v2
> 
> And it's based on the following branches.
> 
>   calxeda/multi-plat
>   arm-soc/multiplatform/platform-data
>   arm-soc/multiplatform/smp_ops
>   arm-soc/imx/cleanup
>   arm-soc/imx/dt
>   sound/for-3.7
> 
> Subsystem maintainers,
> 
> I plan to send the whole series for 3.7 via arm-soc tree.  Please let
> me know if you have problem with that.  Thanks.

The first five branches are scheduled to go through the arm-soc tree, so
I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
to expect that hitting mainline. If it always gets in very early during the
merge window, it's probably ok to put the imx/multi-platform patches into
the same branch as the other ones in arm-soc and wait for the sound stuff
to hit mainline first, otherwise I'd suggest we start a second
next/multiplatform-2 branch for imx and send the first part early on
but then wait with the second batch before sound gets in.

	Arnd

^ permalink raw reply

* [PATCH v2 29/34] video: imxfb: remove cpu_is_xxx by using platform_device_id
From: Shawn Guo @ 2012-09-20  6:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348123547-31082-1-git-send-email-shawn.guo@linaro.org>

It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.

As the result, mach/hardware.h inclusion gets removed from the driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
---
 arch/arm/mach-imx/clk-imx1.c                |    6 ++---
 arch/arm/mach-imx/clk-imx21.c               |    6 ++---
 arch/arm/mach-imx/clk-imx25.c               |    6 ++---
 arch/arm/mach-imx/clk-imx27.c               |    6 ++---
 arch/arm/mach-imx/devices/devices-common.h  |    1 +
 arch/arm/mach-imx/devices/platform-imx-fb.c |   11 ++++----
 drivers/video/imxfb.c                       |   38 ++++++++++++++++++++++-----
 7 files changed, 51 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c
index a453e11..3413c41 100644
--- a/arch/arm/mach-imx/clk-imx1.c
+++ b/arch/arm/mach-imx/clk-imx1.c
@@ -101,9 +101,9 @@ int __init mx1_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
 	clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
 	clk_register_clkdev(clk[per2], NULL, "imx-mmc.0");
-	clk_register_clkdev(clk[per2], "per", "imx-fb.0");
-	clk_register_clkdev(clk[dummy], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[dummy], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[per2], "per", "imx1-fb.0");
+	clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0");
+	clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0");
 	clk_register_clkdev(clk[hclk], "mshc", NULL);
 	clk_register_clkdev(clk[per3], "ssi", NULL);
 	clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0");
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c
index 8aec572..fcdaa9b 100644
--- a/arch/arm/mach-imx/clk-imx21.c
+++ b/arch/arm/mach-imx/clk-imx21.c
@@ -157,9 +157,9 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
 	clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1");
 	clk_register_clkdev(clk[per2], "per", "imx21-cspi.2");
 	clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2");
-	clk_register_clkdev(clk[per3], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[per3], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
 	clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
 	clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0");
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index 71fe521..da7155d 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -219,9 +219,9 @@ int __init mx25_clocks_init(void)
 	clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0");
 	clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0");
 	clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0");
-	clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0");
 	clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1");
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 71c3f12..d73d9ed 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -221,9 +221,9 @@ int __init mx27_clocks_init(unsigned long fref)
 	clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0");
 	clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1");
 	clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2");
-	clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
-	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0");
+	clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
+	clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
 	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
 	clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
 	clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index 7fa3ef7..c32279b 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -100,6 +100,7 @@ struct platform_device *__init imx_add_imxdi_rtc(
 
 #include <linux/platform_data/video-imxfb.h>
 struct imx_imx_fb_data {
+	const char *devid;
 	resource_size_t iobase;
 	resource_size_t iosize;
 	resource_size_t irq;
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c
index 4e6f857..abea28b 100644
--- a/arch/arm/mach-imx/devices/platform-imx-fb.c
+++ b/arch/arm/mach-imx/devices/platform-imx-fb.c
@@ -10,8 +10,9 @@
 #include <mach/hardware.h>
 #include "devices-common.h"
 
-#define imx_imx_fb_data_entry_single(soc, _size)			\
+#define imx_imx_fb_data_entry_single(soc, _devid, _size)		\
 	{								\
+		.devid = _devid,					\
 		.iobase = soc ## _LCDC_BASE_ADDR,			\
 		.iosize = _size,					\
 		.irq = soc ## _INT_LCDC,				\
@@ -19,22 +20,22 @@
 
 #ifdef CONFIG_SOC_IMX1
 const struct imx_imx_fb_data imx1_imx_fb_data __initconst -	imx_imx_fb_data_entry_single(MX1, SZ_4K);
+	imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX1 */
 
 #ifdef CONFIG_SOC_IMX21
 const struct imx_imx_fb_data imx21_imx_fb_data __initconst -	imx_imx_fb_data_entry_single(MX21, SZ_4K);
+	imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX21 */
 
 #ifdef CONFIG_SOC_IMX25
 const struct imx_imx_fb_data imx25_imx_fb_data __initconst -	imx_imx_fb_data_entry_single(MX25, SZ_16K);
+	imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
 #endif /* ifdef CONFIG_SOC_IMX25 */
 
 #ifdef CONFIG_SOC_IMX27
 const struct imx_imx_fb_data imx27_imx_fb_data __initconst -	imx_imx_fb_data_entry_single(MX27, SZ_4K);
+	imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
 #endif /* ifdef CONFIG_SOC_IMX27 */
 
 struct platform_device *__init imx_add_imx_fb(
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 53ffdfc..64a39e7 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -33,7 +33,6 @@
 #include <linux/math64.h>
 
 #include <linux/platform_data/video-imxfb.h>
-#include <mach/hardware.h>
 
 /*
  * Complain if VAR is out of range.
@@ -53,8 +52,8 @@
 #define LCDC_SIZE	0x04
 #define SIZE_XMAX(x)	((((x) >> 4) & 0x3f) << 20)
 
-#define YMAX_MASK       (cpu_is_mx1() ? 0x1ff : 0x3ff)
-#define SIZE_YMAX(y)	((y) & YMAX_MASK)
+#define YMAX_MASK_IMX1	0x1ff
+#define YMAX_MASK_IMX21	0x3ff
 
 #define LCDC_VPW	0x08
 #define VPW_VPW(x)	((x) & 0x3ff)
@@ -128,12 +127,18 @@ struct imxfb_rgb {
 	struct fb_bitfield	transp;
 };
 
+enum imxfb_type {
+	IMX1_FB,
+	IMX21_FB,
+};
+
 struct imxfb_info {
 	struct platform_device  *pdev;
 	void __iomem		*regs;
 	struct clk		*clk_ipg;
 	struct clk		*clk_ahb;
 	struct clk		*clk_per;
+	enum imxfb_type		devtype;
 
 	/*
 	 * These are the addresses we mapped
@@ -168,6 +173,24 @@ struct imxfb_info {
 	void (*backlight_power)(int);
 };
 
+static struct platform_device_id imxfb_devtype[] = {
+	{
+		.name = "imx1-fb",
+		.driver_data = IMX1_FB,
+	}, {
+		.name = "imx21-fb",
+		.driver_data = IMX21_FB,
+	}, {
+		/* sentinel */
+	}
+};
+MODULE_DEVICE_TABLE(platform, imxfb_devtype);
+
+static inline int is_imx1_fb(struct imxfb_info *fbi)
+{
+	return fbi->devtype = IMX1_FB;
+}
+
 #define IMX_NAME	"IMX"
 
 /*
@@ -366,7 +389,7 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 		break;
 	case 16:
 	default:
-		if (cpu_is_mx1())
+		if (is_imx1_fb(fbi))
 			pcr |= PCR_BPIX_12;
 		else
 			pcr |= PCR_BPIX_16;
@@ -596,6 +619,7 @@ static struct fb_ops imxfb_ops = {
 static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
 	struct imxfb_info *fbi = info->par;
+	u32 ymax_mask = is_imx1_fb(fbi) ? YMAX_MASK_IMX1 : YMAX_MASK_IMX21;
 
 	pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n",
 		var->xres, var->hsync_len,
@@ -617,7 +641,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
 	if (var->right_margin > 255)
 		printk(KERN_ERR "%s: invalid right_margin %d\n",
 			info->fix.id, var->right_margin);
-	if (var->yres < 1 || var->yres > YMAX_MASK)
+	if (var->yres < 1 || var->yres > ymax_mask)
 		printk(KERN_ERR "%s: invalid yres %d\n",
 			info->fix.id, var->yres);
 	if (var->vsync_len > 100)
@@ -645,7 +669,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
 		VCR_V_WAIT_2(var->upper_margin),
 		fbi->regs + LCDC_VCR);
 
-	writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres),
+	writel(SIZE_XMAX(var->xres) | (var->yres & ymax_mask),
 			fbi->regs + LCDC_SIZE);
 
 	writel(fbi->pcr, fbi->regs + LCDC_PCR);
@@ -765,6 +789,7 @@ static int __init imxfb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	fbi = info->par;
+	fbi->devtype = pdev->id_entry->driver_data;
 
 	if (!fb_mode)
 		fb_mode = pdata->mode[0].mode.name;
@@ -938,6 +963,7 @@ static struct platform_driver imxfb_driver = {
 	.driver		= {
 		.name	= DRIVER_NAME,
 	},
+	.id_table	= imxfb_devtype,
 };
 
 static int imxfb_setup(void)
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH v2 17/34] video: mx3fb: remove unneeded mach/hardware.h inclusion
From: Shawn Guo @ 2012-09-20  6:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348123547-31082-1-git-send-email-shawn.guo@linaro.org>

The inclusion of mach/hardware.h is not used by the driver at all.
Remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
---
 drivers/video/mx3fb.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 3b63ad8..fc50320 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -29,7 +29,6 @@
 #include <linux/dma/ipu-dma.h>
 
 #include <linux/platform_data/dma-imx.h>
-#include <mach/hardware.h>
 #include <linux/platform_data/video-mx3fb.h>
 
 #include <asm/io.h>
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH v2 13/34] dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
From: Shawn Guo @ 2012-09-20  6:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1348123547-31082-1-git-send-email-shawn.guo@linaro.org>

The header ipu.h really belongs to dma subsystem rather than imx
platform.  Rename it to ipu-dma.h and put it into include/linux/dma/.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-media@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
---
 drivers/dma/ipu/ipu_idmac.c                        |    3 +--
 drivers/dma/ipu/ipu_irq.c                          |    3 +--
 drivers/media/video/mx3_camera.c                   |    2 +-
 drivers/video/mx3fb.c                              |    2 +-
 .../mach/ipu.h => include/linux/dma/ipu-dma.h      |    6 +++---
 5 files changed, 7 insertions(+), 9 deletions(-)
 rename arch/arm/mach-imx/include/mach/ipu.h => include/linux/dma/ipu-dma.h (97%)

diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index c7573e5..6585537 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -22,8 +22,7 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/module.h>
-
-#include <mach/ipu.h>
+#include <linux/dma/ipu-dma.h>
 
 #include "../dmaengine.h"
 #include "ipu_intern.h"
diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index fa95bcc..a5ee37d 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -15,8 +15,7 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/module.h>
-
-#include <mach/ipu.h>
+#include <linux/dma/ipu-dma.h>
 
 #include "ipu_intern.h"
 
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c
index 1481b0d..892cba5 100644
--- a/drivers/media/video/mx3_camera.c
+++ b/drivers/media/video/mx3_camera.c
@@ -17,6 +17,7 @@
 #include <linux/vmalloc.h>
 #include <linux/interrupt.h>
 #include <linux/sched.h>
+#include <linux/dma/ipu-dma.h>
 
 #include <media/v4l2-common.h>
 #include <media/v4l2-dev.h>
@@ -24,7 +25,6 @@
 #include <media/soc_camera.h>
 #include <media/soc_mediabus.h>
 
-#include <mach/ipu.h>
 #include <linux/platform_data/camera-mx3.h>
 #include <linux/platform_data/dma-imx.h>
 
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index d738108..3b63ad8 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -26,10 +26,10 @@
 #include <linux/console.h>
 #include <linux/clk.h>
 #include <linux/mutex.h>
+#include <linux/dma/ipu-dma.h>
 
 #include <linux/platform_data/dma-imx.h>
 #include <mach/hardware.h>
-#include <mach/ipu.h>
 #include <linux/platform_data/video-mx3fb.h>
 
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/include/mach/ipu.h b/include/linux/dma/ipu-dma.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/ipu.h
rename to include/linux/dma/ipu-dma.h
index 539e559..1803111 100644
--- a/arch/arm/mach-imx/include/mach/ipu.h
+++ b/include/linux/dma/ipu-dma.h
@@ -9,8 +9,8 @@
  * published by the Free Software Foundation.
  */
 
-#ifndef _IPU_H_
-#define _IPU_H_
+#ifndef __LINUX_DMA_IPU_DMA_H
+#define __LINUX_DMA_IPU_DMA_H
 
 #include <linux/types.h>
 #include <linux/dmaengine.h>
@@ -174,4 +174,4 @@ struct idmac_channel {
 #define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd)
 #define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan)
 
-#endif
+#endif /* __LINUX_DMA_IPU_DMA_H */
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH v2 00/34] i.MX multi-platform support
From: Shawn Guo @ 2012-09-20  6:45 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: alsa-devel, linux-usb, Artem Bityutskiy, linux-fbdev,
	Wim Van Sebroeck, linux-mtd, linux-i2c, Arnd Bergmann,
	Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
	linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
	Vinod Koul, Greg Kroah-Hartman, Mark Brown, linux-mmc,
	Wolfram Sang, Javier Martin, Andrew Morton, Shawn Guo

Here is the second post, which should have addressed the comments that
reviewers put on v1.

It's available on branch below.

  git://git.linaro.org/people/shawnguo/linux-2.6.git imx/multi-platform-v2

And it's based on the following branches.

  calxeda/multi-plat
  arm-soc/multiplatform/platform-data
  arm-soc/multiplatform/smp_ops
  arm-soc/imx/cleanup
  arm-soc/imx/dt
  sound/for-3.7

Subsystem maintainers,

I plan to send the whole series for 3.7 via arm-soc tree.  Please let
me know if you have problem with that.  Thanks.

Shawn

---

Shawn Guo (34):
  ARM: imx: include board headers in the same folder
  ARM: imx: move iomux drivers and headers into mach-imx
  ARM: imx: remove unnecessary inclusion from device-imx*.h
  ARM: imx: move platform device code into mach-imx
  ARM: imx: merge plat-mxc into mach-imx
  ARM: imx: include common.h rather than mach/common.h
  ARM: imx: ARM: imx: include cpuidle.h rather than mach/cpuidle.h
  ARM: imx: include iim.h rather than mach/iim.h
  ARM: imx: include iram.h rather than mach/iram.h
  ARM: imx: include ulpi.h rather than mach/ulpi.h
  media: mx1_camera: remove the driver
  ARM: imx: remove mach/dma-mx1-mx2.h
  dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
  dma: imx-sdma: remove unneeded mach/hardware.h inclusion
  ASoC: imx-ssi: remove unneeded mach/hardware.h inclusion
  usb: ehci-mxc: remove unneeded mach/hardware.h inclusion
  video: mx3fb: remove unneeded mach/hardware.h inclusion
  watchdog: imx2_wdt: remove unneeded mach/hardware.h inclusion
  i2c: imx: remove cpu_is_xxx by using platform_device_id
  mtd: mxc_nand: remove cpu_is_xxx by using platform_device_id
  rtc: mxc_rtc: remove cpu_is_xxx by using platform_device_id
  dma: imx-dma: use devm_kzalloc and devm_request_irq
  dma: imx-dma: retrieve MEM and IRQ from resources
  dma: imx-dma: remove cpu_is_xxx by using platform_device_id
  media: mx2_camera: remove dead code in mx2_camera_add_device
  media: mx2_camera: use managed functions to clean up code
  media: mx2_camera: remove cpu_is_xxx by using platform_device_id
  mmc: mxcmmc: remove cpu_is_xxx by using platform_device_id
  video: imxfb: remove cpu_is_xxx by using platform_device_id
  ARM: imx: move debug macros to include/debug
  ARM: imx: include hardware.h rather than mach/hardware.h
  ARM: imx: remove header file mach/irqs.h
  ARM: imx: call mxc_device_init() in soc specific function
  ARM: imx: enable multi-platform build

 .../devicetree/bindings/i2c/fsl-imx-i2c.txt        |    4 +-
 MAINTAINERS                                        |    1 -
 arch/arm/Kconfig                                   |   15 +-
 arch/arm/Kconfig.debug                             |    8 +
 arch/arm/Makefile                                  |    1 -
 arch/arm/boot/dts/imx27.dtsi                       |    4 +-
 arch/arm/boot/dts/imx51.dtsi                       |    4 +-
 arch/arm/boot/dts/imx53.dtsi                       |    6 +-
 arch/arm/boot/dts/imx6q.dtsi                       |    6 +-
 arch/arm/configs/imx_v4_v5_defconfig               |    5 +-
 arch/arm/configs/imx_v6_v7_defconfig               |    3 +-
 .../mach/debug-macro.S => include/debug/imx.S}     |   33 +-
 arch/arm/{plat-mxc => mach-imx}/3ds_debugboard.c   |    2 +-
 .../include/mach => mach-imx}/3ds_debugboard.h     |    0
 arch/arm/mach-imx/Kconfig                          |   89 +-
 arch/arm/mach-imx/Makefile                         |   23 +-
 arch/arm/{plat-mxc => mach-imx}/avic.c             |    5 +-
 .../include/mach => mach-imx}/board-mx31lilly.h    |    0
 .../include/mach => mach-imx}/board-mx31lite.h     |    0
 .../include/mach => mach-imx}/board-mx31moboard.h  |    0
 .../include/mach => mach-imx}/board-pcm038.h       |    0
 arch/arm/mach-imx/clk-imx1.c                       |   18 +-
 arch/arm/mach-imx/clk-imx21.c                      |   18 +-
 arch/arm/mach-imx/clk-imx25.c                      |   26 +-
 arch/arm/mach-imx/clk-imx27.c                      |   40 +-
 arch/arm/mach-imx/clk-imx31.c                      |   21 +-
 arch/arm/mach-imx/clk-imx35.c                      |   13 +-
 arch/arm/mach-imx/clk-imx51-imx53.c                |   15 +-
 arch/arm/mach-imx/clk-imx6q.c                      |    3 +-
 arch/arm/mach-imx/clk-pllv1.c                      |    4 +-
 .../{plat-mxc/include/mach => mach-imx}/common.h   |    1 +
 arch/arm/mach-imx/cpu-imx25.c                      |    5 +-
 arch/arm/mach-imx/cpu-imx27.c                      |    2 +-
 arch/arm/mach-imx/cpu-imx31.c                      |    7 +-
 arch/arm/mach-imx/cpu-imx35.c                      |    5 +-
 arch/arm/mach-imx/cpu-imx5.c                       |    3 +-
 arch/arm/{plat-mxc => mach-imx}/cpu.c              |    3 +-
 arch/arm/mach-imx/cpu_op-mx51.c                    |    3 +-
 arch/arm/{plat-mxc => mach-imx}/cpufreq.c          |    3 +-
 arch/arm/{plat-mxc => mach-imx}/cpuidle.c          |    0
 .../{plat-mxc/include/mach => mach-imx}/cpuidle.h  |    0
 arch/arm/mach-imx/devices-imx1.h                   |    3 +-
 arch/arm/mach-imx/devices-imx21.h                  |    3 +-
 arch/arm/mach-imx/devices-imx25.h                  |    3 +-
 arch/arm/mach-imx/devices-imx27.h                  |    3 +-
 arch/arm/mach-imx/devices-imx31.h                  |    3 +-
 arch/arm/mach-imx/devices-imx35.h                  |    3 +-
 arch/arm/mach-imx/devices-imx50.h                  |    3 +-
 arch/arm/mach-imx/devices-imx51.h                  |    3 +-
 arch/arm/{plat-mxc => mach-imx}/devices/Kconfig    |    3 -
 arch/arm/{plat-mxc => mach-imx}/devices/Makefile   |    3 +-
 .../mach => mach-imx/devices}/devices-common.h     |   19 +-
 arch/arm/{plat-mxc => mach-imx/devices}/devices.c  |    4 +-
 .../devices/platform-ahci-imx.c                    |    5 +-
 .../{plat-mxc => mach-imx}/devices/platform-fec.c  |    5 +-
 .../devices/platform-flexcan.c                     |    4 +-
 .../devices/platform-fsl-usb2-udc.c                |    5 +-
 .../devices/platform-gpio-mxc.c                    |    2 +-
 .../devices/platform-gpio_keys.c                   |    5 +-
 .../devices/platform-imx-dma.c                     |   23 +-
 .../devices/platform-imx-fb.c                      |   16 +-
 .../devices/platform-imx-i2c.c                     |   32 +-
 .../devices/platform-imx-keypad.c                  |    4 +-
 .../devices/platform-imx-ssi.c                     |    4 +-
 .../devices/platform-imx-uart.c                    |    4 +-
 .../devices/platform-imx2-wdt.c                    |    5 +-
 .../devices/platform-imx21-hcd.c                   |    4 +-
 .../devices/platform-imx_udc.c                     |    4 +-
 .../devices/platform-imxdi_rtc.c                   |    5 +-
 .../devices/platform-ipu-core.c                    |    5 +-
 .../devices/platform-mx2-camera.c                  |   16 +-
 .../devices/platform-mxc-ehci.c                    |    5 +-
 .../devices/platform-mxc-mmc.c                     |   20 +-
 .../devices/platform-mxc_nand.c                    |   25 +-
 .../devices/platform-mxc_pwm.c                     |    4 +-
 .../devices/platform-mxc_rnga.c                    |    4 +-
 .../devices/platform-mxc_rtc.c                     |   13 +-
 .../devices/platform-mxc_w1.c                      |    4 +-
 .../devices/platform-pata_imx.c                    |    4 +-
 .../devices/platform-sdhci-esdhc-imx.c             |    5 +-
 .../devices/platform-spi_imx.c                     |    4 +-
 arch/arm/mach-imx/ehci-imx25.c                     |    4 +-
 arch/arm/mach-imx/ehci-imx27.c                     |    4 +-
 arch/arm/mach-imx/ehci-imx31.c                     |    4 +-
 arch/arm/mach-imx/ehci-imx35.c                     |    4 +-
 arch/arm/mach-imx/ehci-imx5.c                      |    4 +-
 arch/arm/{plat-mxc => mach-imx}/epit.c             |    6 +-
 .../include/mach => mach-imx}/eukrea-baseboards.h  |    0
 arch/arm/mach-imx/eukrea_mbimx27-baseboard.c       |    7 +-
 arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c     |    8 +-
 arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c     |    7 +-
 arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c     |    7 +-
 .../{plat-mxc/include/mach => mach-imx}/hardware.h |   26 +-
 arch/arm/mach-imx/hotplug.c                        |    3 +-
 arch/arm/{plat-mxc/include/mach => mach-imx}/iim.h |    0
 arch/arm/mach-imx/imx27-dt.c                       |   11 +-
 arch/arm/mach-imx/imx31-dt.c                       |    5 +-
 arch/arm/mach-imx/imx51-dt.c                       |    9 +-
 arch/arm/mach-imx/include/mach/dma-mx1-mx2.h       |   10 -
 arch/arm/mach-imx/iomux-imx31.c                    |    5 +-
 .../include/mach => mach-imx}/iomux-mx1.h          |    2 +-
 .../include/mach => mach-imx}/iomux-mx21.h         |    4 +-
 .../include/mach => mach-imx}/iomux-mx25.h         |    2 +-
 .../include/mach => mach-imx}/iomux-mx27.h         |    4 +-
 .../include/mach => mach-imx}/iomux-mx2x.h         |    0
 .../include/mach => mach-imx}/iomux-mx3.h          |    0
 .../include/mach => mach-imx}/iomux-mx35.h         |    2 +-
 .../include/mach => mach-imx}/iomux-mx50.h         |    2 +-
 .../include/mach => mach-imx}/iomux-mx51.h         |    2 +-
 arch/arm/{plat-mxc => mach-imx}/iomux-v1.c         |    5 +-
 .../{plat-mxc/include/mach => mach-imx}/iomux-v1.h |    0
 arch/arm/{plat-mxc => mach-imx}/iomux-v3.c         |    5 +-
 .../{plat-mxc/include/mach => mach-imx}/iomux-v3.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/iram.h |    0
 arch/arm/{plat-mxc => mach-imx}/iram_alloc.c       |    3 +-
 arch/arm/{plat-mxc => mach-imx}/irq-common.c       |    0
 arch/arm/{plat-mxc => mach-imx}/irq-common.h       |    3 +
 arch/arm/mach-imx/lluart.c                         |    3 +-
 arch/arm/mach-imx/mach-apf9328.c                   |    7 +-
 arch/arm/mach-imx/mach-armadillo5x0.c              |    9 +-
 arch/arm/mach-imx/mach-bug.c                       |    7 +-
 arch/arm/mach-imx/mach-cpuimx27.c                  |   11 +-
 arch/arm/mach-imx/mach-cpuimx35.c                  |    9 +-
 arch/arm/mach-imx/mach-cpuimx51sd.c                |    9 +-
 arch/arm/mach-imx/mach-eukrea_cpuimx25.c           |   10 +-
 arch/arm/mach-imx/mach-imx27_visstrim_m10.c        |    6 +-
 arch/arm/mach-imx/mach-imx27ipcam.c                |    6 +-
 arch/arm/mach-imx/mach-imx27lite.c                 |    6 +-
 arch/arm/mach-imx/mach-imx53.c                     |   11 +-
 arch/arm/mach-imx/mach-imx6q.c                     |    6 +-
 arch/arm/mach-imx/mach-kzm_arm11_01.c              |    7 +-
 arch/arm/mach-imx/mach-mx1ads.c                    |    7 +-
 arch/arm/mach-imx/mach-mx21ads.c                   |    6 +-
 arch/arm/mach-imx/mach-mx25_3ds.c                  |    8 +-
 arch/arm/mach-imx/mach-mx27_3ds.c                  |   10 +-
 arch/arm/mach-imx/mach-mx27ads.c                   |    6 +-
 arch/arm/mach-imx/mach-mx31_3ds.c                  |   12 +-
 arch/arm/mach-imx/mach-mx31ads.c                   |    5 +-
 arch/arm/mach-imx/mach-mx31lilly.c                 |   11 +-
 arch/arm/mach-imx/mach-mx31lite.c                  |   11 +-
 arch/arm/mach-imx/mach-mx31moboard.c               |   14 +-
 arch/arm/mach-imx/mach-mx35_3ds.c                  |    8 +-
 arch/arm/mach-imx/mach-mx50_rdp.c                  |    7 +-
 arch/arm/mach-imx/mach-mx51_3ds.c                  |    9 +-
 arch/arm/mach-imx/mach-mx51_babbage.c              |    7 +-
 arch/arm/mach-imx/mach-mxt_td60.c                  |    6 +-
 arch/arm/mach-imx/mach-pca100.c                    |    8 +-
 arch/arm/mach-imx/mach-pcm037.c                    |    8 +-
 arch/arm/mach-imx/mach-pcm037_eet.c                |    5 +-
 arch/arm/mach-imx/mach-pcm038.c                    |   13 +-
 arch/arm/mach-imx/mach-pcm043.c                    |    9 +-
 arch/arm/mach-imx/mach-qong.c                      |    6 +-
 arch/arm/mach-imx/mach-scb9328.c                   |    7 +-
 arch/arm/mach-imx/mach-vpr200.c                    |    7 +-
 arch/arm/mach-imx/mm-imx1.c                        |    9 +-
 arch/arm/mach-imx/mm-imx21.c                       |   14 +-
 arch/arm/mach-imx/mm-imx25.c                       |   12 +-
 arch/arm/mach-imx/mm-imx27.c                       |   14 +-
 arch/arm/mach-imx/mm-imx3.c                        |   13 +-
 arch/arm/mach-imx/mm-imx5.c                        |   12 +-
 arch/arm/mach-imx/mx1-camera-fiq-ksym.c            |   18 -
 arch/arm/mach-imx/mx1-camera-fiq.S                 |   35 -
 arch/arm/{plat-mxc/include/mach => mach-imx}/mx1.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx21.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx25.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx27.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx2x.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx31.h |    0
 arch/arm/mach-imx/mx31lilly-db.c                   |    9 +-
 arch/arm/mach-imx/mx31lite-db.c                    |    9 +-
 arch/arm/mach-imx/mx31moboard-devboard.c           |    9 +-
 arch/arm/mach-imx/mx31moboard-marxbot.c            |    9 +-
 arch/arm/mach-imx/mx31moboard-smartbot.c           |   11 +-
 .../arm/{plat-mxc/include/mach => mach-imx}/mx35.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx3x.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx50.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx51.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx53.h |    0
 .../arm/{plat-mxc/include/mach => mach-imx}/mx6q.h |    0
 arch/arm/{plat-mxc/include/mach => mach-imx}/mxc.h |    0
 arch/arm/mach-imx/pcm970-baseboard.c               |    7 +-
 arch/arm/mach-imx/platsmp.c                        |    5 +-
 arch/arm/mach-imx/pm-imx27.c                       |    3 +-
 arch/arm/mach-imx/pm-imx3.c                        |    7 +-
 arch/arm/mach-imx/pm-imx5.c                        |    7 +-
 arch/arm/mach-imx/pm-imx6q.c                       |    5 +-
 arch/arm/{plat-mxc => mach-imx}/ssi-fiq-ksym.c     |    0
 arch/arm/{plat-mxc => mach-imx}/ssi-fiq.S          |    0
 arch/arm/{plat-mxc => mach-imx}/system.c           |    5 +-
 arch/arm/{plat-mxc => mach-imx}/time.c             |    5 +-
 arch/arm/{plat-mxc => mach-imx}/tzic.c             |    6 +-
 arch/arm/{plat-mxc => mach-imx}/ulpi.c             |    2 +-
 .../arm/{plat-mxc/include/mach => mach-imx}/ulpi.h |    0
 arch/arm/plat-mxc/Kconfig                          |   89 --
 arch/arm/plat-mxc/Makefile                         |   24 -
 arch/arm/plat-mxc/devices/platform-mx1-camera.c    |   42 -
 arch/arm/plat-mxc/include/mach/irqs.h              |   21 -
 arch/arm/plat-mxc/include/mach/timex.h             |   22 -
 arch/arm/plat-mxc/include/mach/uncompress.h        |  132 ---
 drivers/dma/imx-dma.c                              |  137 +--
 drivers/dma/imx-sdma.c                             |    1 -
 drivers/dma/ipu/ipu_idmac.c                        |    3 +-
 drivers/dma/ipu/ipu_irq.c                          |    3 +-
 drivers/i2c/busses/i2c-imx.c                       |   40 +-
 drivers/media/video/Kconfig                        |   12 -
 drivers/media/video/Makefile                       |    1 -
 drivers/media/video/mx1_camera.c                   |  889 --------------------
 drivers/media/video/mx2_camera.c                   |  246 +++---
 drivers/media/video/mx3_camera.c                   |    2 +-
 drivers/mmc/host/mxcmmc.c                          |   31 +-
 drivers/mtd/nand/mxc_nand.c                        |   86 +-
 drivers/rtc/rtc-mxc.c                              |   34 +-
 drivers/usb/host/ehci-mxc.c                        |    1 -
 drivers/video/imxfb.c                              |   38 +-
 drivers/video/mx3fb.c                              |    3 +-
 drivers/watchdog/imx2_wdt.c                        |    1 -
 .../mach/ipu.h => include/linux/dma/ipu-dma.h      |    6 +-
 include/linux/platform_data/asoc-imx-ssi.h         |    2 +
 include/linux/platform_data/camera-mx1.h           |   35 -
 include/linux/platform_data/dma-imx.h              |    4 +-
 sound/soc/fsl/imx-pcm-fiq.c                        |    1 -
 sound/soc/fsl/imx-ssi.c                            |    1 -
 222 files changed, 1115 insertions(+), 2161 deletions(-)
 rename arch/arm/{plat-mxc/include/mach/debug-macro.S => include/debug/imx.S} (59%)
 rename arch/arm/{plat-mxc => mach-imx}/3ds_debugboard.c (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/3ds_debugboard.h (100%)
 rename arch/arm/{plat-mxc => mach-imx}/avic.c (98%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/board-mx31lilly.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/board-mx31lite.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/board-mx31moboard.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/board-pcm038.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/common.h (99%)
 rename arch/arm/{plat-mxc => mach-imx}/cpu.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/cpufreq.c (99%)
 rename arch/arm/{plat-mxc => mach-imx}/cpuidle.c (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/cpuidle.h (100%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/Kconfig (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/Makefile (96%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx/devices}/devices-common.h (96%)
 rename arch/arm/{plat-mxc => mach-imx/devices}/devices.c (92%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-ahci-imx.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-fec.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-flexcan.c (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-fsl-usb2-udc.c (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-gpio-mxc.c (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-gpio_keys.c (94%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-dma.c (63%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-fb.c (79%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-i2c.c (76%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-keypad.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-ssi.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx-uart.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx2-wdt.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx21-hcd.c (94%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imx_udc.c (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-imxdi_rtc.c (94%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-ipu-core.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mx2-camera.c (83%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc-ehci.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc-mmc.c (76%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc_nand.c (74%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc_pwm.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc_rnga.c (95%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc_rtc.c (77%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-mxc_w1.c (95%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-pata_imx.c (96%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-sdhci-esdhc-imx.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/devices/platform-spi_imx.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/epit.c (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/eukrea-baseboards.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/hardware.h (94%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iim.h (100%)
 delete mode 100644 arch/arm/mach-imx/include/mach/dma-mx1-mx2.h
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx1.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx21.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx25.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx27.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx2x.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx3.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx35.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx50.h (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-mx51.h (99%)
 rename arch/arm/{plat-mxc => mach-imx}/iomux-v1.c (98%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-v1.h (100%)
 rename arch/arm/{plat-mxc => mach-imx}/iomux-v3.c (97%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iomux-v3.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/iram.h (100%)
 rename arch/arm/{plat-mxc => mach-imx}/iram_alloc.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/irq-common.c (100%)
 rename arch/arm/{plat-mxc => mach-imx}/irq-common.h (94%)
 delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq-ksym.c
 delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq.S
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx1.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx21.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx25.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx27.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx2x.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx31.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx35.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx3x.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx50.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx51.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx53.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mx6q.h (100%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/mxc.h (100%)
 rename arch/arm/{plat-mxc => mach-imx}/ssi-fiq-ksym.c (100%)
 rename arch/arm/{plat-mxc => mach-imx}/ssi-fiq.S (100%)
 rename arch/arm/{plat-mxc => mach-imx}/system.c (97%)
 rename arch/arm/{plat-mxc => mach-imx}/time.c (99%)
 rename arch/arm/{plat-mxc => mach-imx}/tzic.c (98%)
 rename arch/arm/{plat-mxc => mach-imx}/ulpi.c (99%)
 rename arch/arm/{plat-mxc/include/mach => mach-imx}/ulpi.h (100%)
 delete mode 100644 arch/arm/plat-mxc/Kconfig
 delete mode 100644 arch/arm/plat-mxc/Makefile
 delete mode 100644 arch/arm/plat-mxc/devices/platform-mx1-camera.c
 delete mode 100644 arch/arm/plat-mxc/include/mach/irqs.h
 delete mode 100644 arch/arm/plat-mxc/include/mach/timex.h
 delete mode 100644 arch/arm/plat-mxc/include/mach/uncompress.h
 delete mode 100644 drivers/media/video/mx1_camera.c
 rename arch/arm/plat-mxc/include/mach/ipu.h => include/linux/dma/ipu-dma.h (97%)
 delete mode 100644 include/linux/platform_data/camera-mx1.h

-- 
1.7.9.5


^ permalink raw reply

* Re: [PATCH 04/29] ARM: OMAP1: Move board-ams-delta.h from plat to mach
From: Mark Brown @ 2012-09-20  1:16 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, linux-fbdev, Janusz Krzysztofik,
	Artem Bityutskiy, Dmitry Torokhov, alsa-devel, Peter Ujfalusi,
	Tomi Valkeinen, linux-mtd, linux-input, linux-omap, Liam Girdwood
In-Reply-To: <20120919210543.28074.10214.stgit@muffinssi>

On Wed, Sep 19, 2012 at 02:05:43PM -0700, Tony Lindgren wrote:
> This is only used by omap1.
> 
> And to fix things properly, this should not be included
> from the drivers at all.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

or I can apply it if that's easier.

^ permalink raw reply

* [PATCH 07/29] ARM: OMAP1: Move lcd_mipid.h from plat to mach
From: Tony Lindgren @ 2012-09-19 21:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20120919205732.28074.43697.stgit@muffinssi>

This is only used by omap1.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/board-nokia770.c         |    2 +-
 arch/arm/mach-omap1/include/mach/lcd_mipid.h |    0 
 drivers/video/omap/lcd_mipid.c               |    2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/{plat-omap/include/plat/lcd_mipid.h => mach-omap1/include/mach/lcd_mipid.h} (100%)

diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index bfc2b06..a2699eb 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -27,7 +27,7 @@
 
 #include <mach/mux.h>
 #include <mach/keypad.h>
-#include <plat/lcd_mipid.h>
+#include <mach/lcd_mipid.h>
 #include <plat/mmc.h>
 #include <plat/clock.h>
 
diff --git a/arch/arm/plat-omap/include/plat/lcd_mipid.h b/arch/arm/mach-omap1/include/mach/lcd_mipid.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/lcd_mipid.h
rename to arch/arm/mach-omap1/include/mach/lcd_mipid.h
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
index e3880c4..2b64d07 100644
--- a/drivers/video/omap/lcd_mipid.c
+++ b/drivers/video/omap/lcd_mipid.c
@@ -25,7 +25,7 @@
 #include <linux/spi/spi.h>
 #include <linux/module.h>
 
-#include <plat/lcd_mipid.h>
+#include <mach/lcd_mipid.h>
 
 #include "omapfb.h"
 


^ permalink raw reply related

* [PATCH 04/29] ARM: OMAP1: Move board-ams-delta.h from plat to mach
From: Tony Lindgren @ 2012-09-19 21:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-fbdev, Mark Brown, Janusz Krzysztofik, Artem Bityutskiy,
	Dmitry Torokhov, alsa-devel, Peter Ujfalusi, Tomi Valkeinen,
	linux-mtd, linux-input, linux-omap, Liam Girdwood
In-Reply-To: <20120919205732.28074.43697.stgit@muffinssi>

This is only used by omap1.

And to fix things properly, this should not be included
from the drivers at all.

Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/ams-delta-fiq-handler.S        |    2 +-
 arch/arm/mach-omap1/ams-delta-fiq.c                |    2 +-
 arch/arm/mach-omap1/board-ams-delta.c              |    2 +-
 arch/arm/mach-omap1/include/mach/board-ams-delta.h |    0 
 drivers/input/serio/ams_delta_serio.c              |    2 +-
 drivers/mtd/nand/ams-delta.c                       |    2 +-
 drivers/video/omap/lcd_ams_delta.c                 |    2 +-
 sound/soc/omap/ams-delta.c                         |    2 +-
 8 files changed, 7 insertions(+), 7 deletions(-)
 rename arch/arm/{plat-omap/include/plat/board-ams-delta.h => mach-omap1/include/mach/board-ams-delta.h} (100%)

diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
index d2b6acc..3d1e1c2 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S
+++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
@@ -16,7 +16,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 
 #include <mach/irqs.h>
 #include <mach/ams-delta-fiq.h>
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c
index 68e8e56..f12a12a 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq.c
+++ b/arch/arm/mach-omap1/ams-delta-fiq.c
@@ -19,7 +19,7 @@
 #include <linux/module.h>
 #include <linux/io.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 
 #include <asm/fiq.h>
 
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 05af063..b9929cb 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -35,7 +35,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 #include <plat/keypad.h>
 #include <mach/mux.h>
 
diff --git a/arch/arm/plat-omap/include/plat/board-ams-delta.h b/arch/arm/mach-omap1/include/mach/board-ams-delta.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/board-ams-delta.h
rename to arch/arm/mach-omap1/include/mach/board-ams-delta.h
diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c
index f5fbdf9..45887e3 100644
--- a/drivers/input/serio/ams_delta_serio.c
+++ b/drivers/input/serio/ams_delta_serio.c
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 
 #include <asm/mach-types.h>
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 
 #include <mach/ams-delta-fiq.h>
 
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
index c28eec0..9e7723a 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/ams-delta.c
@@ -29,7 +29,7 @@
 #include <asm/io.h>
 #include <asm/sizes.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 
 #include <mach/hardware.h>
 
diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c
index 5cca6b3..ed4cad8 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -27,7 +27,7 @@
 #include <linux/lcd.h>
 #include <linux/gpio.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 
 #include "omapfb.h"
 
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index 7b18b74..98e25d5 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -32,7 +32,7 @@
 
 #include <asm/mach-types.h>
 
-#include <plat/board-ams-delta.h>
+#include <mach/board-ams-delta.h>
 #include <plat/mcbsp.h>
 
 #include "omap-mcbsp.h"


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox