From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 1/9] efikamx: read board id
Date: Tue, 19 Oct 2010 23:15:07 +0200 [thread overview]
Message-ID: <20101019211507.GA28242@pengutronix.de> (raw)
In-Reply-To: <20101019205251.082848683@rtp-net.org>
On Tue, Oct 19, 2010 at 10:42:54PM +0200, Arnaud Patard wrote:
> read board id value from the GPIO3_16/17/11
>
>
> +/* PCBID2 PCBID1 PCBID0 STATE
> + 1 1 1 ER1:rev1.1
> + 1 1 0 ER2:rev1.2
> + 1 0 1 ER3:rev1.3
> + 1 0 0 ER4:rev1.4
> +*/
> +static void __init mx51_efikamx_board_id(void)
> +{
> + int id;
> +
> + /* things are taking time to settle */
> + msleep(500);
Is it really necessary to delay the boot process such a long time?
> +
> + gpio_request(EFIKAMX_PCBID0, "pcbid0");
> + gpio_direction_input(EFIKAMX_PCBID0);
> + gpio_request(EFIKAMX_PCBID1, "pcbid1");
> + gpio_direction_input(EFIKAMX_PCBID1);
> + gpio_request(EFIKAMX_PCBID2, "pcbid2");
> + gpio_direction_input(EFIKAMX_PCBID2);
> +
> + id = gpio_get_value(EFIKAMX_PCBID0);
> + id |= gpio_get_value(EFIKAMX_PCBID1) << 1;
> + id |= gpio_get_value(EFIKAMX_PCBID2) << 2;
> +
> + switch (id) {
> + case 7:
> + system_rev = 0x11;
> + break;
> + case 6:
> + system_rev = 0x12;
> + break;
> + case 5:
> + system_rev = 0x13;
> + break;
> + case 4:
> + system_rev = 0x14;
> + break;
> + default:
> + system_rev = 0x10;
> + break;
> + }
> +
> + if ((system_rev == 0x10)
Please replace the tab after 'if' with a space
> + || (system_rev == 0x12)
> + || (system_rev == 0x14)) {
> + printk(KERN_WARNING
> + "EfikaMX: Unsupported board revision 1.%u!\n",
> + system_rev & 0xf);
> + }
I know nothing about the versioning scheme, but what about 1.1? Is it
supported?
> +}
> +
> static void __init mxc_board_init(void)
> {
> mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
> ARRAY_SIZE(mx51efikamx_pads));
> + mx51_efikamx_board_id();
> mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
> mxc_init_imx_uart();
> }
>
>
>
--
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:[~2010-10-19 21:15 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 20:42 [patch 0/9] efikamx support improvements Arnaud Patard (Rtp)
2010-10-19 20:42 ` [patch 1/9] efikamx: read board id Arnaud Patard (Rtp)
2010-10-19 21:15 ` Sascha Hauer [this message]
2010-10-19 21:30 ` Matt Sealey
2010-10-20 7:54 ` Amit Kucheria
2010-10-20 8:12 ` Arnaud Patard (Rtp)
2010-10-20 9:03 ` Amit Kucheria
2010-10-20 8:24 ` Sascha Hauer
2010-10-20 8:35 ` Arnaud Patard (Rtp)
2010-10-20 8:59 ` Matt Sealey
2010-10-20 9:16 ` Uwe Kleine-König
2010-10-20 17:26 ` Matt Sealey
2010-10-20 19:26 ` Loïc Minier
2010-10-20 19:53 ` Arnaud Patard (Rtp)
2010-10-21 1:32 ` Matt Sealey
2010-10-20 20:53 ` Matt Sealey
2010-10-19 20:42 ` [patch 2/9] efikamx: add mmc support Arnaud Patard (Rtp)
2010-10-19 20:42 ` [patch 3/9] imx51: enhance/fix iomux configuration Arnaud Patard (Rtp)
2010-10-19 21:04 ` Sascha Hauer
2010-10-20 8:14 ` Arnaud Patard (Rtp)
2010-10-20 9:14 ` Eric Bénard
2010-10-20 9:26 ` Arnaud Patard (Rtp)
2010-10-20 9:18 ` Eric Bénard
2010-10-20 9:29 ` Arnaud Patard (Rtp)
2010-10-20 9:41 ` Amit Kucheria
2010-10-20 10:00 ` Uwe Kleine-König
2010-10-20 10:12 ` Arnaud Patard (Rtp)
2010-10-20 12:10 ` Uwe Kleine-König
2010-10-19 20:42 ` [patch 4/9] imx51: add gpio mode for csi1 {h,v}sync Arnaud Patard (Rtp)
2010-10-19 20:42 ` [patch 5/9] efikamx: add leds support Arnaud Patard (Rtp)
2010-10-20 11:15 ` Amit Kucheria
2010-10-19 20:42 ` [patch 6/9] efikamx: add support for power key Arnaud Patard (Rtp)
2010-10-19 20:43 ` [patch 7/9] imx51: fix gpio_4_24 and gpio_4_25 pad configuration Arnaud Patard (Rtp)
2010-10-19 20:43 ` [patch 8/9] efikamx: add spi nor support Arnaud Patard (Rtp)
2010-10-20 11:26 ` Amit Kucheria
2010-10-20 12:01 ` Arnaud Patard (Rtp)
2010-10-20 12:32 ` Amit Kucheria
2010-10-20 17:36 ` Matt Sealey
2010-10-20 17:55 ` Arnaud Patard (Rtp)
2010-10-20 20:51 ` Matt Sealey
2010-10-19 20:43 ` [patch 9/9] efikamx: add reset Arnaud Patard (Rtp)
2010-10-19 23:51 ` Fabio Estevam
2010-10-20 8:13 ` Arnaud Patard (Rtp)
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=20101019211507.GA28242@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).