mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jules Maselbas <jmaselbas@zdiv.net>, barebox@lists.infradead.org
Subject: Re: [PATCH 5/6] mci: Add sunxi-mmc driver
Date: Tue, 10 Dec 2024 16:14:50 +0100	[thread overview]
Message-ID: <5bf5849c-fdee-4b66-a819-dea718143e17@pengutronix.de> (raw)
In-Reply-To: <20241107145722.5145-6-jmaselbas@zdiv.net>

Hello Jules,

On 07.11.24 15:57, Jules Maselbas wrote:
> This driver is adapted from different sources: Linux, u-boot and p-boot.
> The latter, p-boot (forked from u-boot), is a bootloader for pinephones.
> 
> It currently only support PIO xfer but could be further improved to also
> support DMA xfer. This driver is split in three files so it can be used
> by the PBL and barebox proper.
> 
> Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>

With below nitpick addressed:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> +static int sunxi_mmc_probe(struct device *dev)
> +{
> +	struct device_node *np = dev->of_node;
> +	struct resource *iores;
> +	struct sunxi_mmc_host *host;
> +	unsigned int f_min, f_max;
> +	int ret;
> +
> +	iores = dev_request_mem_resource(dev, 0);
> +	if (IS_ERR(iores))
> +		return PTR_ERR(iores);
> +	host = xzalloc(sizeof(*host));
> +	host->base = IOMEM(iores->start);
> +	dma_set_mask(dev, DMA_BIT_MASK(32));
> +	host->cfg = device_get_match_data(dev);
> +
> +	host->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);

Please use gpiod_get & gpiod_get_valute, which will handle details like active low for you.

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-12-10 15:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 14:57 [PATCH 0/6] Initial support for Allwinner A64 SoC Jules Maselbas
2024-11-07 14:57 ` [PATCH 1/6] clk: clk-composite: fix callback guard in clk_composite_round_rate Jules Maselbas
2024-11-07 15:05   ` Ahmad Fatoum
2024-11-08 10:21   ` (subset) " Sascha Hauer
2024-11-07 14:57 ` [PATCH 2/6] clk: divider: add error code propagation Jules Maselbas
2024-11-13  8:47   ` Ahmad Fatoum
2024-11-07 14:57 ` [PATCH 3/6] clk: Add clock driver for sun50i-a64 Jules Maselbas
2024-11-08 10:39   ` Sascha Hauer
2024-11-08 11:08     ` Jules Maselbas
2024-11-08 12:59       ` Sascha Hauer
2024-11-12 15:58         ` Jules Maselbas
2024-11-13  8:42           ` Sascha Hauer
2024-11-07 14:57 ` [PATCH 4/6] pinctrl: Add sun50i-a64 pinctrl driver Jules Maselbas
2024-11-08 10:48   ` Sascha Hauer
2024-11-07 14:57 ` [PATCH 5/6] mci: Add sunxi-mmc driver Jules Maselbas
2024-12-10 15:14   ` Ahmad Fatoum [this message]
2024-11-07 14:57 ` [PATCH 6/6] ARM: sunxi: Introduce mach-sunxi Jules Maselbas
2024-12-10 15:18   ` Ahmad Fatoum

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=5bf5849c-fdee-4b66-a819-dea718143e17@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@zdiv.net \
    /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