Skip to content

Commit

Permalink
xtensa: avoid duplicate of IO range definitions
Browse files Browse the repository at this point in the history
Define IO addresses in a single place, to make it easier to change for
non-standard memory maps.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
Baruch Siach authored and Max Filippov committed Jan 14, 2014
1 parent 5f42146 commit 4809bb4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions arch/xtensa/include/asm/initialize_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@
wdtlb a4, a5
witlb a4, a5

movi a5, 0xe0000006
movi a4, 0xf0000000 + CA_WRITEBACK
movi a5, XCHAL_KIO_CACHED_VADDR + 6
movi a4, XCHAL_KIO_PADDR + CA_WRITEBACK
wdtlb a4, a5
witlb a4, a5

movi a5, 0xf0000006
movi a4, 0xf0000000 + CA_BYPASS
movi a5, XCHAL_KIO_BYPASS_VADDR + 6
movi a4, XCHAL_KIO_PADDR + CA_BYPASS
wdtlb a4, a5
witlb a4, a5

Expand Down
6 changes: 1 addition & 5 deletions arch/xtensa/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
#ifdef __KERNEL__
#include <asm/byteorder.h>
#include <asm/page.h>
#include <asm/vectors.h>
#include <linux/bug.h>
#include <linux/kernel.h>

#include <linux/types.h>

#define XCHAL_KIO_CACHED_VADDR 0xe0000000
#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
#define XCHAL_KIO_PADDR 0xf0000000
#define XCHAL_KIO_SIZE 0x10000000

#define IOADDR(x) (XCHAL_KIO_BYPASS_VADDR + (x))
#define IO_SPACE_LIMIT ~0

Expand Down
5 changes: 5 additions & 0 deletions arch/xtensa/include/asm/vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

#include <variant/core.h>

#define XCHAL_KIO_CACHED_VADDR 0xe0000000
#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
#define XCHAL_KIO_PADDR 0xf0000000
#define XCHAL_KIO_SIZE 0x10000000

#if defined(CONFIG_MMU)

/* Will Become VECBASE */
Expand Down

0 comments on commit 4809bb4

Please sign in to comment.