All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 9/9] net: macb: Fix check for little-endian system in gmac_configure_dma()
Date: Mon, 24 Jun 2019 21:12:15 +0800	[thread overview]
Message-ID: <CAEUhbmX7RKPXx85FgtCTewXTj0viystU4Ggc3UqGyNnxoePFrQ@mail.gmail.com> (raw)
In-Reply-To: <52450ee2-95bd-dfd2-f1a8-922a781600f5@gmail.com>

Hi Ramon,

On Mon, Jun 24, 2019 at 8:51 PM Ramon Fried <rfried.dev@gmail.com> wrote:
>
>
> On 6/24/19 3:32 PM, Bin Meng wrote:
> > Hi Ramon,
> >
> > On Mon, Jun 24, 2019 at 8:22 PM Ramon Fried <rfried.dev@gmail.com> wrote:
> >>
> >> On 6/24/19 8:03 AM, Bin Meng wrote:
> >>
> >> On Mon, Jun 24, 2019 at 12:03 PM Anup Patel <Anup.Patel@wdc.com> wrote:
> >>
> >> We should depend on __LITTLE_ENDIAN pre-defined compiler macro for
> >> little-endian system instead of U-Boot specific CONFIG_SYS_LITTLE_ENDIAN
> >> macro.
> >>
> >> Signed-off-by: Anup Patel <anup.patel@wdc.com>
> >> ---
> >>  drivers/net/macb.c | 7 ++++---
> >>  1 file changed, 4 insertions(+), 3 deletions(-)
> >>
> >> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >>
> >> Hi.
> >> I don't like this approach, each platform should configure it's
> >> endianess, this is stated in README in root folder.
> >> relying on a specific GCC preprocessor extension is limiting us only to use GCC.
> >> The RISCV issue with MACB can be easily resolved by defining the
> >> CONFIG_SYS_LITTLE_ENDIAN config.
> > OK, but a system wide CONFIG_SYS_LITTLE_ENDIAN may bring side effects
> > to other drivers, as not all devices are using the same endianness
> > even in the same system. Maybe we can do something by parsing some
> > property in device tree?
> >
> > Regards,
> > Bin
>
> Hey Bin
>
> I grep'ed for all instances of CONFIG_SYS_LITTLE_ENDIAN and I don't see any place
> where something might brake. can you elaborate ?

I mean this system wide CONFIG_SYS_LITTLE_ENDIAN is easy to break
since it cannot represent all devices, although I did not check all
instances currently in U-Boot. Maybe it's OK for now for the SiFive
board. But this option is not better than the pure compiler flag
either. So I was proposing using some properties in DT. Does that
help?

Regards,
Bin

  parent reply	other threads:[~2019-06-24 13:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  4:02 [U-Boot] [PATCH v7 0/9] Update SiFive Unleashed Drivers Anup Patel
2019-06-24  4:02 ` [U-Boot] [PATCH v7 1/9] clk: sifive: Factor-out PLL library as separate module Anup Patel
2019-06-24  4:02 ` [U-Boot] [PATCH v7 2/9] clk: sifive: Sync-up WRPLL library with upstream Linux Anup Patel
2019-06-24  4:02 ` [U-Boot] [PATCH v7 3/9] clk: sifive: Sync-up DT bindings header " Anup Patel
2019-06-24  5:03   ` Bin Meng
2019-06-24  4:02 ` [U-Boot] [PATCH v7 4/9] clk: sifive: Sync-up main driver " Anup Patel
2019-06-24  4:03 ` [U-Boot] [PATCH v7 5/9] clk: sifive: Drop GEMGXL clock driver Anup Patel
2019-06-24  4:03 ` [U-Boot] [PATCH v7 6/9] net: macb: Extend MACB driver for SiFive Unleashed board Anup Patel
2019-06-24  5:03   ` Bin Meng
2019-06-25  5:21   ` Ramon Fried
2019-06-25  5:48     ` Anup Patel
2019-06-24  4:03 ` [U-Boot] [PATCH v7 7/9] riscv: sifive: fu540: Setup ethaddr env variable using OTP Anup Patel
2019-06-24  5:03   ` Bin Meng
2019-07-10 17:15   ` Troy Benjegerdes
2019-07-10 23:47     ` Alistair Francis
2019-07-11  4:28     ` Anup Patel
2019-07-11 10:19       ` Ramon Fried
2019-07-12  8:39         ` Anup Patel
2019-07-15  7:07       ` Ramon Fried
2019-07-20  0:42       ` Joey Hewitt
2019-07-23  2:58         ` Joe Hershberger
2019-06-24  4:03 ` [U-Boot] [PATCH v7 8/9] doc: sifive-fu540: Update README for steps to create FW_PAYLOAD Anup Patel
2019-06-24  4:03 ` [U-Boot] [PATCH v7 9/9] net: macb: Fix check for little-endian system in gmac_configure_dma() Anup Patel
2019-06-24  5:03   ` Bin Meng
2019-06-24 12:22     ` Ramon Fried
2019-06-24 12:32       ` Bin Meng
2019-06-24 12:51         ` Ramon Fried
2019-06-24 13:02           ` Daniel Schwierzeck
2019-06-24 13:07             ` Ramon Fried
2019-06-25  4:11               ` Anup Patel
2019-06-24 13:12           ` Bin Meng [this message]
2019-06-24 13:27             ` Ramon Fried

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=CAEUhbmX7RKPXx85FgtCTewXTj0viystU4Ggc3UqGyNnxoePFrQ@mail.gmail.com \
    --to=bmeng.cn@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.