From: Baruch Siach <baruch@tkos.co.il>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/5] imx: support for the IIM fusebox
Date: Mon, 16 Aug 2010 11:47:18 +0300 [thread overview]
Message-ID: <20100816084716.GA1664@jasper.tkos.co.il> (raw)
In-Reply-To: <20100816083330.GI27749@pengutronix.de>
Hi Sascha,
On Mon, Aug 16, 2010 at 10:33:30AM +0200, Sascha Hauer wrote:
> On Sun, Aug 15, 2010 at 04:39:23PM +0300, Baruch Siach wrote:
> > This patch series adds a driver for the IIM fusebox. As suggested by Sascha
> > Hauer, this driver is implemented as a character device, which allows use of
> > the standard md/mw commands to access the fuses.
>
> Much better, thanks. I just tested this on an i.MX35 and it works fine.
> I used the following patch to add support for the i.MX35. I think it's
> better to put the IIM device info into a i.MX35 specific file. The
> device does not need any platform data, and it is much code duplicated
> into each board otherwise. Maybe you can do this change for the i.MX25
> aswell.
OK. I'll fold the platform code into patch 3, and send as a reply to that
patch. You can then drop no. 4.
baruch
> commit 1d47b8fe08b519e43babb7de802813359bed8e54
> Author: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Mon Aug 16 10:26:52 2010 +0200
>
> i.MX35: add iim support
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> diff --git a/arch/arm/mach-imx/imx35.c b/arch/arm/mach-imx/imx35.c
> index 74d63eb..72851f7 100644
> --- a/arch/arm/mach-imx/imx35.c
> +++ b/arch/arm/mach-imx/imx35.c
> @@ -16,6 +16,7 @@
> */
>
> #include <common.h>
> +#include <init.h>
> #include <asm/io.h>
> #include <mach/imx-regs.h>
> #include <mach/iim.h>
> @@ -39,3 +40,52 @@ int imx_silicon_revision()
>
> return (reg & 0xFF);
> }
> +
> +#ifdef CONFIG_IMX_IIM
> +#define IIM_BANK_SIZE 32 /* excluding alignment padding for each row */
> +
> +static struct device_d imx_iim_dev = {
> + .name = "imx_iim",
> + .map_base = IMX_IIM_BASE,
> +};
> +
> +static struct device_d imx_iim_bank0_dev = {
> + .name = "imx_iim_bank",
> + .id = 0,
> + .map_base = IMX_IIM_BASE + 0x800,
> + .size = IIM_BANK_SIZE,
> +};
> +
> +static struct device_d imx_iim_bank1_dev = {
> + .name = "imx_iim_bank",
> + .id = 1,
> + .map_base = IMX_IIM_BASE + 0xc00,
> + .size = IIM_BANK_SIZE,
> +};
> +
> +static struct device_d imx_iim_bank2_dev = {
> + .name = "imx_iim_bank",
> + .id = 2,
> + .map_base = IMX_IIM_BASE + 0x1000,
> + .size = IIM_BANK_SIZE,
> +};
> +
> +static int imx35_iim_init(void)
> +{
> + uint32_t reg;
> +
> + /* Start the clock */
> + reg = readl(IMX_CCM_BASE + CCM_CGR3);
> + reg |= (3 << 2);
> + writel(reg, IMX_CCM_BASE + CCM_CGR3);
> +
> + register_device(&imx_iim_dev);
> + register_device(&imx_iim_bank0_dev);
> + register_device(&imx_iim_bank1_dev);
> + register_device(&imx_iim_bank2_dev);
> +
> + return 0;
> +}
> +
> +device_initcall(imx35_iim_init);
> +#endif /* CONFIG_IMX_IIM */
>
> --
> 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 |
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2010-08-16 8:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-15 13:39 Baruch Siach
2010-08-15 13:39 ` [PATCH 1/5] imx: move IIM registers to their own header Baruch Siach
2010-08-15 13:39 ` [PATCH 2/5] imx: driver for the IIM fusebox Baruch Siach
2010-08-15 13:39 ` [PATCH 3/5] imx25: add chip specific IIM fusebox defines Baruch Siach
2010-08-15 13:39 ` [PATCH 4/5] imx25 3ds: add support for the iim fusebox driver Baruch Siach
2010-08-15 13:39 ` [PATCH 5/5] fec: add support for IIM stored mac address Baruch Siach
2010-08-16 8:45 ` Sascha Hauer
2010-08-16 8:52 ` Baruch Siach
2010-08-16 9:02 ` Sascha Hauer
2010-08-16 8:33 ` [PATCH 0/5] imx: support for the IIM fusebox Sascha Hauer
2010-08-16 8:47 ` Baruch Siach [this message]
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=20100816084716.GA1664@jasper.tkos.co.il \
--to=baruch@tkos.co.il \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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