linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/4] ARM: add GPMI support for imx23/imx28
Date: Wed, 13 Apr 2011 09:25:26 -0400	[thread overview]
Message-ID: <BANLkTi=xHoT_=pwy3y7q0FSXRWNQ3Pe21A@mail.gmail.com> (raw)
In-Reply-To: <20110413114304.GA1897@S2100-06.ap.freescale.net>

2011/4/13 Shawn Guo <shawn.guo@freescale.com>:
> On Wed, Apr 13, 2011 at 02:24:38PM +0800, Huang Shijie wrote:
>> add the clock and iomux initialization for GPMI in the imx23 and imx28.
>> and register the gpmi driver.
>>
>> Signed-off-by: Huang Shijie <b32955@freescale.com>
>> ---
>> ?arch/arm/mach-mxs/Kconfig ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +
>> ?arch/arm/mach-mxs/clock-mx23.c ? ? ? ? ? ? ? ? ?| ? ?3 +
>> ?arch/arm/mach-mxs/clock-mx28.c ? ? ? ? ? ? ? ? ?| ? ?3 +
>> ?arch/arm/mach-mxs/devices-mx23.h ? ? ? ? ? ? ? ?| ? ?3 +
>> ?arch/arm/mach-mxs/devices-mx28.h ? ? ? ? ? ? ? ?| ? ?3 +
>> ?arch/arm/mach-mxs/devices/Kconfig ? ? ? ? ? ? ? | ? ?3 +
>> ?arch/arm/mach-mxs/devices/Makefile ? ? ? ? ? ? ?| ? ?1 +
>> ?arch/arm/mach-mxs/devices/platform-gpmi.c ? ? ? | ?134 +++++++++++++++++++++++
>> ?arch/arm/mach-mxs/include/mach/devices-common.h | ? ?4 +
>> ?arch/arm/mach-mxs/include/mach/gpmi-nfc.h ? ? ? | ? 65 +++++++++++
>> ?arch/arm/mach-mxs/mach-mx23evk.c ? ? ? ? ? ? ? ?| ? 37 ++++++
>> ?arch/arm/mach-mxs/mach-mx28evk.c ? ? ? ? ? ? ? ?| ? 37 ++++++
>> ?12 files changed, 295 insertions(+), 0 deletions(-)
>> ?create mode 100644 arch/arm/mach-mxs/devices/platform-gpmi.c
>> ?create mode 100644 arch/arm/mach-mxs/include/mach/gpmi-nfc.h
>>
> [...]
>> diff --git a/arch/arm/mach-mxs/devices/platform-gpmi.c b/arch/arm/mach-mxs/devices/platform-gpmi.c
>> new file mode 100644
>> index 0000000..74ebe22
>> --- /dev/null
>> +++ b/arch/arm/mach-mxs/devices/platform-gpmi.c
>> @@ -0,0 +1,134 @@
>> +/*
>> + * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ?See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License along
>> + * with this program; if not, write to the Free Software Foundation, Inc.,
>> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>> + */
>> +#include <asm/sizes.h>
>> +#include <mach/mx23.h>
>> +#include <mach/mx28.h>
>> +#include <mach/gpmi-nfc.h>
>> +#include <mach/devices-common.h>
>
> devices-common.h already includes gpmi-nfc.h

ok. thanks
>
> [...]
>> diff --git a/arch/arm/mach-mxs/include/mach/gpmi-nfc.h b/arch/arm/mach-mxs/include/mach/gpmi-nfc.h
>> new file mode 100644
>> index 0000000..cf8e8c3
>> --- /dev/null
>> +++ b/arch/arm/mach-mxs/include/mach/gpmi-nfc.h
>> @@ -0,0 +1,65 @@
>> +/*
>> + * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ?See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License along
>> + * with this program; if not, write to the Free Software Foundation, Inc.,
>> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>> + */
>> +
>> +#ifndef __INCLUDE_LINUX_DEVICE_H
>> +#define __INCLUDE_LINUX_DEVICE_H
>
> __INCLUDE_LINUX_DEVICE_H is too generic to protect the inclusion of
> gpmi-nfc.h

ok, thanks
>
> [...]
>> diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
>> index a66994f..db715f9 100644
>> --- a/arch/arm/mach-mxs/mach-mx23evk.c
>> +++ b/arch/arm/mach-mxs/mach-mx23evk.c
>> @@ -34,6 +34,42 @@ static const iomux_cfg_t mx23evk_pads[] __initconst = {
>> ? ? ? MX23_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
>> ? ? ? MX23_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,
>>
>> + ? ? /* gpmi */
>> + ? ? MX23_PAD_GPMI_D00__GPMI_D00 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>
> You can use MXS_PAD_CTRL here.
>
>> + ? ? MX23_PAD_GPMI_D01__GPMI_D01 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D02__GPMI_D02 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D03__GPMI_D03 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D04__GPMI_D04 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D05__GPMI_D05 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D06__GPMI_D06 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_D07__GPMI_D07 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_CLE__GPMI_CLE |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_ALE__GPMI_ALE |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_WPN__GPMI_WPN |
>> + ? ? ? ? ? ? (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_WRN__GPMI_WRN |
>> + ? ? ? ? ? ? (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_RDN__GPMI_RDN |
>> + ? ? ? ? ? ? (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_RDY0__GPMI_RDY0 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_RDY1__GPMI_RDY1 |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_CE0N__GPMI_CE0N |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> + ? ? MX23_PAD_GPMI_CE1N__GPMI_CE1N |
>> + ? ? ? ? ? ? (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
>> +
>
> mmc (ssp) has pin conflict with gpmi on both mx23evk and mx28evk.
>
> Uwe,
>
> How do you usually handle such pin conflicts on board?
In the our imx508 code, we add a initialization  hook in the platform
data , and calls the
hook in the driver's probe().

Does this a good solution?


>
>> ? ? ? /* auart */
>> ? ? ? MX23_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
>> ? ? ? MX23_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
>> @@ -108,6 +144,7 @@ static void __init mx23evk_init(void)
>> ? ? ? mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
>>
>> ? ? ? mx23_add_duart();
>> + ? ? mx23_add_gpmi();
>> ? ? ? mx23_add_auart0();
>>
> Can you please add gpmi stuff like this and pad configuration at the
> end to reflect the order that devices get supported?
ok.

Best Regards
Huang Shijie

>
>> ? ? ? ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable");
>> diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
>> index 08002d0..cf8ddcb 100644
>> --- a/arch/arm/mach-mxs/mach-mx28evk.c
>> +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> Ditto
>
> --
> Regards,
> Shawn
>
>

  reply	other threads:[~2011-04-13 13:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  6:24 [PATCH v5 0/4] add the GPMI controller driver for IMX23/IMX28 Huang Shijie
2011-04-13  6:24 ` [PATCH v5 3/4] MTD : add support for imx23 and imx28 Huang Shijie
2011-04-13  6:24 ` [PATCH v5 4/4] MTD : add GPMI driver in the config and Makefile Huang Shijie
2011-07-08 18:23 ` [PATCH v5 2/4] MTD : add the common code for GPMI controller driver Huang Shijie
2011-04-13 19:54   ` Lothar Waßmann
2011-04-14  2:20     ` Huang Shijie
2011-04-14  6:38       ` Lothar Waßmann
2011-04-14  6:40         ` Huang Shijie
2011-04-14  6:24   ` Lothar Waßmann
2011-04-14  6:36     ` Huang Shijie
2011-07-08 18:24 ` [PATCH v5 1/4] ARM: add GPMI support for imx23/imx28 Huang Shijie
2011-04-13  7:41   ` Lothar Waßmann
2011-04-13  9:42     ` Huang Shijie
2011-04-13  9:03   ` Uwe Kleine-König
2011-04-13  9:52     ` Huang Shijie
2011-04-13 10:03       ` Uwe Kleine-König
2011-04-13 10:49         ` Huang Shijie
2011-04-13 11:43   ` Shawn Guo
2011-04-13 13:25     ` Huang Shijie [this message]
2011-04-13 13:51     ` Uwe Kleine-König
2011-04-14  1:19       ` Shawn Guo

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='BANLkTi=xHoT_=pwy3y7q0FSXRWNQ3Pe21A@mail.gmail.com' \
    --to=shijie8@gmail.com \
    --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).