All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramon Fried <rfried.dev@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] net: luton: remove address translation after ofnode_read_resource
Date: Thu, 20 May 2021 07:37:57 +0300	[thread overview]
Message-ID: <CAGi-RULO43+JFcSYA3GJ3ShTSudtQLxcz3dUks6Y1ggN=H+nig@mail.gmail.com> (raw)
In-Reply-To: <20210518154026.1.I98c378739e65e7fed36a680a86d1c307e71c9460@changeid>

On Tue, May 18, 2021 at 4:40 PM Patrick Delaunay
<patrick.delaunay@foss.st.com> wrote:
>
> Removed call of ofnode_translate_address() after ofnode_read_resource
> in luton_switch.c:luton_probe(); it is unnecessary since
> the commit feb7ac457c20 ("dm: core: Add address translation in
> fdt_get_resource").
>
> Fixes: feb7ac457c20 ("dm: core: Add address translation in fdt_get_resource")
> Reported-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
>  drivers/net/mscc_eswitch/luton_switch.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
> index 54afa14c9d..73c950d118 100644
> --- a/drivers/net/mscc_eswitch/luton_switch.c
> +++ b/drivers/net/mscc_eswitch/luton_switch.c
> @@ -588,7 +588,6 @@ static int luton_probe(struct udevice *dev)
>         struct luton_private *priv = dev_get_priv(dev);
>         int i, ret;
>         struct resource res;
> -       fdt32_t faddr;
>         phys_addr_t addr_base;
>         unsigned long addr_size;
>         ofnode eth_node, node, mdio_node;
> @@ -658,9 +657,7 @@ static int luton_probe(struct udevice *dev)
>
>                 if (ofnode_read_resource(mdio_node, 0, &res))
>                         return -ENOMEM;
> -               faddr = cpu_to_fdt32(res.start);
> -
> -               addr_base = ofnode_translate_address(mdio_node, &faddr);
> +               addr_base = res.start;
>                 addr_size = res.end - res.start;
>
>                 /* If the bus is new then create a new bus */
> --
> 2.17.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

  reply	other threads:[~2021-05-20  4:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 13:40 [PATCH 0/2] dm: core: Add address translation in fdt_get_resource - fixes Patrick Delaunay
2021-05-18 13:40 ` [PATCH 1/2] net: luton: remove address translation after ofnode_read_resource Patrick Delaunay
2021-05-20  4:37   ` Ramon Fried [this message]
2021-05-18 13:40 ` [PATCH 2/2] test: add dm_test_read_resource Patrick Delaunay
2021-05-19 15:34   ` Simon Glass

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='CAGi-RULO43+JFcSYA3GJ3ShTSudtQLxcz3dUks6Y1ggN=H+nig@mail.gmail.com' \
    --to=rfried.dev@gmail.com \
    --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.