unicore32: modify io_p2v and io_v2p macros, and adjust PKUNITY_mmio_BASEs
1. remove __REG macro 2. add (void __iomem *) to io_p2v macro 3. add (phys_addr_t) to io_v2p macro 4. add PKUNITY_AHB_BASE and PKUNITY_APB_BASE definitions 5. modify all PKUNITY_mmio_BASEs from physical addr to virtual addr 6. adjust prefix macro for all usage of PKUNITY_mmio_BASEs -- by advice with Arnd Bergmann Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -17,17 +17,16 @@
|
||||
|
||||
#include "PKUnity.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#define io_p2v(x) (void __iomem *)((x) - PKUNITY_MMIO_BASE)
|
||||
#define io_v2p(x) (phys_addr_t)((x) + PKUNITY_MMIO_BASE)
|
||||
#else
|
||||
#define io_p2v(x) ((x) - PKUNITY_MMIO_BASE)
|
||||
#define io_v2p(x) ((x) + PKUNITY_MMIO_BASE)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
# define __REG(x) (void __iomem *)io_p2v(x)
|
||||
|
||||
#endif
|
||||
|
||||
#define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */
|
||||
#define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE
|
||||
#define PCIBIOS_MIN_MEM io_v2p(PKUNITY_PCIMEM_BASE)
|
||||
|
||||
/*
|
||||
* We override the standard dma-mask routines for bouncing.
|
||||
|
||||
Reference in New Issue
Block a user