From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huacai Chen <chenhc@lemote.com>
Cc: "open list:MIPS" <linux-mips@vger.kernel.org>,
Fuxin Zhang <zhangfx@lemote.com>,
Zhangjin Wu <wuzhangjin@gmail.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 4/4] MIPS: Loongson64: Reserve legacy MMIO space according to bridge type
Date: Thu, 16 Jul 2020 14:04:00 +0200 [thread overview]
Message-ID: <20200716120400.GB11361@alpha.franken.de> (raw)
In-Reply-To: <CAAhV-H6NE9EHxZOGxHqapK1Yj9hmVk0cXhcfG5__O5hNdVxR0Q@mail.gmail.com>
On Thu, Jul 16, 2020 at 07:10:09PM +0800, Huacai Chen wrote:
> Hi, Thomas,
>
> On Thu, Jul 16, 2020 at 6:01 PM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
> >
> > On Thu, Jul 09, 2020 at 07:33:44PM +0800, Huacai Chen wrote:
> > > Define MMIO_LOWER_RESERVED as a constant is incorrect, because different
> > > PCHs (bridge types) have different legacy MMIO space size. According to
> > > the datasheets, the legacy MMIO space size of LS7A is 0x20000, and which
> > > of other PCHs is 0x4000. So it is necessary to reserve legacy MMIO space
> > > according to the bridge type.
> > >
> > > Currently IO_SPACE_LIMIT is defined as 0xffff which is too small for the
> > > LS7A bridge, so increase it to 0xfffff for LOONGSON64.
> > >
> > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > ---
> > > arch/mips/include/asm/io.h | 4 ++++
> > > arch/mips/include/asm/mach-loongson64/spaces.h | 3 ---
> > > arch/mips/loongson64/init.c | 18 ++++++++++++++----
> > > 3 files changed, 18 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> > > index 346fffd..7358372 100644
> > > --- a/arch/mips/include/asm/io.h
> > > +++ b/arch/mips/include/asm/io.h
> > > @@ -51,7 +51,11 @@
> > >
> > > /* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */
> > >
> > > +#ifndef CONFIG_CPU_LOONGSON64
> > > #define IO_SPACE_LIMIT 0xffff
> > > +#else
> > > +#define IO_SPACE_LIMIT 0xfffff
> > > +#endif
> >
> > can you please move this #define to mach-generic/spaces.h and
> > override it in mach-loongson64/spaces.h ?
> Maybe that's not a good idea, because all other archs define
> IO_SPACE_LIMIT in io.h, moving to another file may cause some build
> errors.
it's already included via asm/addrspace.h
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2020-07-16 12:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 11:33 [PATCH 1/4] MIPS: Loongson64: Fix machine naming Huacai Chen
2020-07-09 11:33 ` [PATCH 2/4] MIPS: Loongson64: DeviceTree for LS7A PCH Huacai Chen
2020-07-14 7:26 ` Tiezhu Yang
2020-07-16 10:01 ` Thomas Bogendoerfer
2020-07-09 11:33 ` [PATCH 3/4] MIPS: Loongson64: Load LS7A dtbs Huacai Chen
2020-07-14 7:27 ` Tiezhu Yang
2020-07-16 10:01 ` Thomas Bogendoerfer
2020-07-09 11:33 ` [PATCH 4/4] MIPS: Loongson64: Reserve legacy MMIO space according to bridge type Huacai Chen
2020-07-14 7:27 ` Tiezhu Yang
2020-07-16 10:00 ` Thomas Bogendoerfer
2020-07-16 11:10 ` Huacai Chen
2020-07-16 12:04 ` Thomas Bogendoerfer [this message]
2020-07-17 1:33 ` Huacai Chen
2020-07-14 7:25 ` [PATCH 1/4] MIPS: Loongson64: Fix machine naming Tiezhu Yang
2020-07-16 10:00 ` Thomas Bogendoerfer
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=20200716120400.GB11361@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=chenhc@lemote.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-mips@vger.kernel.org \
--cc=wuzhangjin@gmail.com \
--cc=zhangfx@lemote.com \
/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).