From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ARM i.MX5: Add IPU device support
Date: Thu, 14 Apr 2011 11:25:05 +0200 [thread overview]
Message-ID: <20110414092505.GB7285@pengutronix.de> (raw)
In-Reply-To: <1302710016-3569-2-git-send-email-weitway@gmail.com>
On Wed, Apr 13, 2011 at 11:53:31PM +0800, weitway at gmail.com wrote:
> From: Jason Chen <b02280@freescale.com>
>
> diff --git a/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c b/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c
> new file mode 100644
> index 0000000..fe76cf1
> --- /dev/null
> +++ b/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c
> @@ -0,0 +1,94 @@
> +/*
> + * Copyright (C) 2010 Pengutronix
> + * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
> + *
> + * This program is free software; you can redistribute it and/or modify it under
> + * the terms of the GNU General Public License version 2 as published by the
> + * Free Software Foundation.
> + */
> +#include <mach/hardware.h>
> +#include <mach/devices-common.h>
> +
> +#define imx5_ipuv3_data_entry_single(soc, size, ipu_init) \
> + { \
> + .iobase = soc ## _IPU_CTRL_BASE_ADDR, \
> + .irq_err = soc ## _INT_IPU_ERR, \
> + .irq = soc ## _INT_IPU_SYN, \
> + .iosize = size, \
> + .init = ipu_init, \
> + }
> +
> +#ifdef CONFIG_SOC_IMX51
> +int __init mx51_ipuv3_init(struct platform_device *pdev)
> +{
> + int ret = 0;
> + u32 val;
> +
> + /* hard reset the IPU */
> + val = readl(MX51_IO_ADDRESS(MX51_SRC_BASE_ADDR));
> + val |= 1 << 3;
> + writel(val, MX51_IO_ADDRESS(MX51_SRC_BASE_ADDR));
> +
> + return ret;
> +}
> +
> +const struct imx_ipuv3_data imx51_ipuv3_data __initconst =
> + imx5_ipuv3_data_entry_single(MX51,
> + SZ_512M, mx51_ipuv3_init);
> +#endif /* ifdef CONFIG_SOC_IMX51 */
> +
> +#ifdef CONFIG_SOC_IMX53
> +int __init mx53_ipuv3_init(struct platform_device *pdev)
> +{
> + int ret = 0;
> + u32 val;
> + int i;
> +
> + /* fixup ipu base address */
> + for (i = 0; i < pdev->num_resources; i++) {
> + struct resource *r = &pdev->resource[i];
> +
> + if (IORESOURCE_MEM == resource_type(r))
> + r->start -= 0x18000000;
> + }
This is ugly. We should rather use IPU_CM_REG_BASE directly for the
resources and remove the offsets from the IPU driver.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2011-04-14 9:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 15:53 [PATCH 1/7] Add a mfd IPUv3 driver weitway at gmail.com
2011-04-13 15:53 ` [PATCH 2/7] ARM i.MX5: Add IPU device support weitway at gmail.com
2011-04-14 9:25 ` Sascha Hauer [this message]
2011-04-14 12:40 ` Jason Chen
2011-04-13 15:53 ` [PATCH 3/7] Add i.MX5 framebuffer driver weitway at gmail.com
2011-04-14 8:49 ` Sascha Hauer
2011-04-13 15:53 ` [PATCH 4/7] ARM i.MX51 babbage: Add framebuffer support weitway at gmail.com
2011-04-13 15:53 ` [PATCH 5/7] ARM i.MX53 loco: " weitway at gmail.com
2011-04-14 8:57 ` Sascha Hauer
2011-04-14 9:01 ` Chen Jie-B02280
2011-04-14 9:12 ` Sascha Hauer
2011-04-14 12:37 ` Jason Chen
2011-04-13 15:53 ` [PATCH 6/7] ARM i.MX53: add pwm devices support weitway at gmail.com
2011-04-13 15:53 ` [PATCH 7/7] ARM: i.MX53 loco: add pwm backlight device weitway at gmail.com
2011-04-14 9:08 ` [PATCH 1/7] Add a mfd IPUv3 driver Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110414092505.GB7285@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).