diff options
author | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-03-04 18:07:48 +0800 |
---|---|---|
committer | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-03-17 09:19:21 +0800 |
commit | 1cf46c42d7688a2e09de87fc9201b0e9a0961866 (patch) | |
tree | f6bba402319785ed745be62e5b655715626d2761 /arch/unicore32/kernel/puv3-core.c | |
parent | 4fde87cb13a29c06e0b4c2cba86445492098fbc2 (diff) | |
download | talos-obmc-linux-1cf46c42d7688a2e09de87fc9201b0e9a0961866.tar.gz talos-obmc-linux-1cf46c42d7688a2e09de87fc9201b0e9a0961866.zip |
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>
Diffstat (limited to 'arch/unicore32/kernel/puv3-core.c')
-rw-r--r-- | arch/unicore32/kernel/puv3-core.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/unicore32/kernel/puv3-core.c b/arch/unicore32/kernel/puv3-core.c index 7d10e7b07c20..8b1b6beb858e 100644 --- a/arch/unicore32/kernel/puv3-core.c +++ b/arch/unicore32/kernel/puv3-core.c @@ -50,8 +50,8 @@ unsigned long long sched_clock(void) static struct resource puv3_usb_resources[] = { /* order is significant! */ { - .start = PKUNITY_USB_BASE, - .end = PKUNITY_USB_BASE + 0x3ff, + .start = io_v2p(PKUNITY_USB_BASE), + .end = io_v2p(PKUNITY_USB_BASE) + 0x3ff, .flags = IORESOURCE_MEM, }, { .start = IRQ_USB, @@ -82,8 +82,8 @@ static struct musb_hdrc_platform_data puv3_usb_plat = { static struct resource puv3_mmc_resources[] = { [0] = { - .start = PKUNITY_SDC_BASE, - .end = PKUNITY_SDC_BASE + 0xfff, + .start = io_v2p(PKUNITY_SDC_BASE), + .end = io_v2p(PKUNITY_SDC_BASE) + 0xfff, .flags = IORESOURCE_MEM, }, [1] = { @@ -95,8 +95,8 @@ static struct resource puv3_mmc_resources[] = { static struct resource puv3_unigfx_resources[] = { [0] = { - .start = PKUNITY_UNIGFX_BASE, - .end = PKUNITY_UNIGFX_BASE + 0xfff, + .start = io_v2p(PKUNITY_UNIGFX_BASE), + .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, .flags = IORESOURCE_MEM, }, [1] = { @@ -108,8 +108,8 @@ static struct resource puv3_unigfx_resources[] = { static struct resource puv3_rtc_resources[] = { [0] = { - .start = PKUNITY_RTC_BASE, - .end = PKUNITY_RTC_BASE + 0xff, + .start = io_v2p(PKUNITY_RTC_BASE), + .end = io_v2p(PKUNITY_RTC_BASE) + 0xff, .flags = IORESOURCE_MEM, }, [1] = { @@ -126,16 +126,16 @@ static struct resource puv3_rtc_resources[] = { static struct resource puv3_pwm_resources[] = { [0] = { - .start = PKUNITY_OST_BASE + 0x80, - .end = PKUNITY_OST_BASE + 0xff, + .start = io_v2p(PKUNITY_OST_BASE) + 0x80, + .end = io_v2p(PKUNITY_OST_BASE) + 0xff, .flags = IORESOURCE_MEM, }, }; static struct resource puv3_uart0_resources[] = { [0] = { - .start = PKUNITY_UART0_BASE, - .end = PKUNITY_UART0_BASE + 0xff, + .start = io_v2p(PKUNITY_UART0_BASE), + .end = io_v2p(PKUNITY_UART0_BASE) + 0xff, .flags = IORESOURCE_MEM, }, [1] = { @@ -147,8 +147,8 @@ static struct resource puv3_uart0_resources[] = { static struct resource puv3_uart1_resources[] = { [0] = { - .start = PKUNITY_UART1_BASE, - .end = PKUNITY_UART1_BASE + 0xff, + .start = io_v2p(PKUNITY_UART1_BASE), + .end = io_v2p(PKUNITY_UART1_BASE) + 0xff, .flags = IORESOURCE_MEM, }, [1] = { @@ -160,8 +160,8 @@ static struct resource puv3_uart1_resources[] = { static struct resource puv3_umal_resources[] = { [0] = { - .start = PKUNITY_UMAL_BASE, - .end = PKUNITY_UMAL_BASE + 0x1fff, + .start = io_v2p(PKUNITY_UMAL_BASE), + .end = io_v2p(PKUNITY_UMAL_BASE) + 0x1fff, .flags = IORESOURCE_MEM, }, [1] = { |