From: Seb <sebtx452@gmail.com>
To: John Crispin <john@phrozen.org>
Cc: linux-mtd@lists.infradead.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled
Date: Wed, 18 Jan 2017 18:12:09 +0100 [thread overview]
Message-ID: <CA+hF=Gc5ZBLqo65fbchZeqtyEUgH-kdqpf8i3A-Z5nFTt58a4A@mail.gmail.com> (raw)
In-Reply-To: <845374ff-62b0-983b-b399-4965421a9066@phrozen.org>
> the bug is also fixed on the 300 and 500 series chips, so we would want
> to check for that aswell.
>
I added this to the begin of "ltq_mtd_probe" function:
bool mtd_addr_swap;
if ( ltq_ebu_r32(LTQ_EBU_BUSCON0) & EBU_ENDIAN_SWAP ) {
switch (ltq_soc_type()) {
case SOC_TYPE_VR9_2 :
case SOC_TYPE_AR10 :
mtd_addr_swap = false;
break;
default :
mtd_addr_swap = true;
}
} else mtd_addr_swap = true;
It's easier to add other architectures as needed. I tried it on my
OpenWrt release, and got it working fine. Is it correct in this way ?
next prev parent reply other threads:[~2017-01-18 17:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 12:10 [PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled Sebastien Decourriere
2017-01-18 12:38 ` John Crispin
2017-01-18 13:48 ` Seb
2017-01-18 13:51 ` John Crispin
2017-01-18 17:12 ` Seb [this message]
2017-01-19 10:06 Sebastien Decourriere
2017-01-19 23:50 ` Langer, Thomas
2017-01-20 9:33 Sebastien Decourriere
2017-01-24 17:03 ` Ralf Baechle
2017-01-24 21:32 ` Hauke Mehrtens
2017-01-25 9:04 ` Seb
2017-01-25 16:58 ` Langer, Thomas
2017-01-26 11:02 ` Seb
2017-01-26 16:01 ` Langer, Thomas
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='CA+hF=Gc5ZBLqo65fbchZeqtyEUgH-kdqpf8i3A-Z5nFTt58a4A@mail.gmail.com' \
--to=sebtx452@gmail.com \
--cc=john@phrozen.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mtd@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).