All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH v2 3/6] gpio: mxc_gpio: add OF_PLATDATA support
Date: Mon, 27 Jul 2020 14:10:55 +0200	[thread overview]
Message-ID: <5a8f6146-1349-f05c-00f9-2603e0ad28bd@denx.de> (raw)
In-Reply-To: <20200722131438.12215-4-walter.lozano@collabora.com>

Hi Walter,

On 22.07.20 15:14, Walter Lozano wrote:
> Continuing with the OF_PLATADATA support for iMX6 to reduce SPL
> footprint, add it to mxc_gpio. Thanks to this, it will be possible to
> enable card detection on MMC driver.
> 
> Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
> ---
> 

This conflicts with commit 6103e570cdd0d0e854b071ee17b14589356a82bd
Author: Ye Li <ye.li@nxp.com>
Date:   Tue Jun 9 20:29:51 2020 -0700

    gpio: mxc_gpio: Improve to use ofdata_to_platdata

already mainlined. Can you take a look ? Thanks !

Best regards,
Stefano

> (no changes since v1)
> 
>  drivers/gpio/mxc_gpio.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
> index 316dcc757b..fc49b5b577 100644
> --- a/drivers/gpio/mxc_gpio.c
> +++ b/drivers/gpio/mxc_gpio.c
> @@ -13,6 +13,8 @@
>  #include <asm/arch/imx-regs.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> +#include <dt-structs.h>
> +#include <mapmem.h>
>  
>  enum mxc_gpio_direction {
>  	MXC_GPIO_DIRECTION_IN,
> @@ -22,6 +24,10 @@ enum mxc_gpio_direction {
>  #define GPIO_PER_BANK			32
>  
>  struct mxc_gpio_plat {
> +#if CONFIG_IS_ENABLED(OF_PLATDATA)
> +	/* Put this first since driver model will copy the data here */
> +	struct dtd_gpio_mxc dtplat;
> +#endif
>  	int bank_index;
>  	struct gpio_regs *regs;
>  };
> @@ -306,8 +312,16 @@ static int mxc_gpio_bind(struct udevice *dev)
>  	 * is statically initialized in U_BOOT_DEVICES.Here
>  	 * will return.
>  	 */
> -	if (plat)
> +
> +	if (plat) {
> +#if CONFIG_IS_ENABLED(OF_PLATDATA)
> +		struct dtd_gpio_mxc *dtplat = &plat->dtplat;
> +
> +		plat->regs = map_sysmem(dtplat->reg[0], dtplat->reg[1]);
> +		plat->bank_index = dev->req_seq;
> +#endif
>  		return 0;
> +	}
>  
>  	addr = devfdt_get_addr(dev);
>  	if (addr == FDT_ADDR_T_NONE)
> @@ -350,6 +364,8 @@ U_BOOT_DRIVER(gpio_mxc) = {
>  	.bind	= mxc_gpio_bind,
>  };
>  
> +U_BOOT_DRIVER_ALIAS(gpio_mxc, fsl_imx6q_gpio)
> +
>  #if !CONFIG_IS_ENABLED(OF_CONTROL)
>  static const struct mxc_gpio_plat mxc_plat[] = {
>  	{ 0, (struct gpio_regs *)GPIO1_BASE_ADDR },
> 


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2020-07-27 12:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 13:14 [PATCH v2 0/6] mx6cuboxi: enable OF_PLATDATA with MMC support Walter Lozano
2020-07-22 13:14 ` [PATCH v2 1/6] mmc: fsl_esdhc_imx: rename driver name to match ll_entry Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-22 13:14 ` [PATCH v2 2/6] mmc: fsl_esdhc_imx: add OF_PLATDATA support Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-22 13:14 ` [PATCH v2 3/6] gpio: mxc_gpio: " Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-27 12:10   ` Stefano Babic [this message]
2020-07-29 15:32     ` Walter Lozano
2020-07-22 13:14 ` [PATCH v2 4/6] mmc: fsl_esdhc_imx: add CD support when OF_PLATDATA is enabled Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-22 13:14 ` [PATCH v2 5/6] drivers: rename more drivers to match compatible string Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-22 13:14 ` [PATCH v2 6/6] mx6cuboxi: enable OF_PLATDATA Walter Lozano
2020-07-26 14:54   ` Simon Glass
2020-07-23  1:34 ` [PATCH v2 0/6] mx6cuboxi: enable OF_PLATDATA with MMC support Peng Fan
2020-07-23  2:01   ` Walter Lozano

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=5a8f6146-1349-f05c-00f9-2603e0ad28bd@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.