From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/8] mips: implement to access the KSEG0/1 memory range in map_physmem
Date: Sat, 26 Dec 2015 08:25:32 +0100 [thread overview]
Message-ID: <201512260825.32778.marex@denx.de> (raw)
In-Reply-To: <BLU436-SMTP1051570C6473392AC34EA29FFF80@phx.gbl>
On Friday, December 25, 2015 at 07:56:22 PM, Wills Wang wrote:
> U-boot just use the no MMU virtual address segment(KSEG0/1), this
> patch enable access the uncached memory range(KSEG1) by flag
> "MAP_NOCACHE", other flag for KSEG0 access.
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
> arch/mips/include/asm/io.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> index a7ab087..943053d 100644
> --- a/arch/mips/include/asm/io.h
> +++ b/arch/mips/include/asm/io.h
> @@ -485,7 +485,7 @@ static inline void sync(void)
> * that can be used to access the memory range with the caching
> * properties specified by "flags".
> */
> -#define MAP_NOCACHE (0)
> +#define MAP_NOCACHE (1)
I _think_ this is something someone familiar with mips has to review,
since I think this has a potential to break a lot of machines.
> #define MAP_WRCOMBINE (0)
> #define MAP_WRBACK (0)
> #define MAP_WRTHROUGH (0)
> @@ -493,7 +493,10 @@ static inline void sync(void)
> static inline void *
> map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
> {
> - return (void *)paddr;
> + if (flags)
> + return (void *)KSEG1ADDR(paddr);
> + else
> + return (void *)KSEG0ADDR(paddr);
> }
>
> /*
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-12-26 7:25 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1451069788-6786-1-git-send-email-wills.wang@live.com>
2015-12-25 18:56 ` [U-Boot] [PATCH v4 1/8] include: Add support for "do_div" macro Wills Wang
2015-12-26 7:24 ` Marek Vasut
2015-12-26 15:48 ` Wills Wang
2015-12-26 13:09 ` Daniel Schwierzeck
2015-12-26 16:54 ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 2/8] mips: implement to access the KSEG0/1 memory range in map_physmem Wills Wang
2015-12-26 7:25 ` Marek Vasut [this message]
2015-12-25 18:56 ` [U-Boot] [PATCH v4 3/8] mips: add base support for atheros ath79 based SOCs Wills Wang
2015-12-26 7:28 ` Marek Vasut
2015-12-26 16:17 ` Wills Wang
2015-12-26 17:01 ` Daniel Schwierzeck
2015-12-26 17:06 ` Marek Vasut
2015-12-27 9:37 ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 4/8] mips: ath79: add serial driver for ar933x SOC Wills Wang
2015-12-26 13:20 ` Daniel Schwierzeck
2015-12-26 16:54 ` Wills Wang
2015-12-26 17:19 ` Daniel Schwierzeck
2015-12-27 6:28 ` Wills Wang
2015-12-27 8:21 ` Thomas Chou
2015-12-27 13:07 ` Thomas Chou
2015-12-27 8:31 ` Thomas Chou
2015-12-25 18:56 ` [U-Boot] [PATCH v4 5/8] mips: ath79: add spi driver Wills Wang
2015-12-26 13:23 ` Daniel Schwierzeck
2015-12-26 16:56 ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 6/8] mips: ath79: add AP121 reference board Wills Wang
2015-12-26 13:52 ` Daniel Schwierzeck
2015-12-26 16:59 ` Wills Wang
2015-12-26 17:07 ` Daniel Schwierzeck
2015-12-27 6:36 ` Wills Wang
2015-12-27 6:41 ` Marek Vasut
2015-12-27 7:03 ` Wills Wang
2015-12-27 7:10 ` Marek Vasut
2015-12-25 18:56 ` [U-Boot] [PATCH v4 7/8] mips: support optimize tuning for same common processor cores Wills Wang
2015-12-26 7:30 ` Marek Vasut
2015-12-26 18:58 ` Daniel Schwierzeck
2015-12-27 3:03 ` Wills Wang
2015-12-25 18:56 ` [U-Boot] [PATCH v4 8/8] mips: move optimize tuning option from deprecated config.mk to Kconfig Wills Wang
2015-12-26 7:30 ` Marek Vasut
2015-12-26 17:33 ` Wills Wang
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=201512260825.32778.marex@denx.de \
--to=marex@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox