Commit bd42aa75b4231b5fd3742de4c4b84ad590a7d654
1 parent
36a8b8c399
Exists in
master
and in
7 other branches
unicore32: rename PKUNITY_IOSPACE_BASE to PKUNITY_MMIO_BASE
for the term IOSPACE normally refers to the PCI PIO space -- by advice with Arnd Bergmann Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Showing 2 changed files with 3 additions and 3 deletions Inline Diff
arch/unicore32/include/mach/PKUnity.h
1 | /* | 1 | /* |
2 | * linux/arch/unicore32/include/mach/PKUnity.h | 2 | * linux/arch/unicore32/include/mach/PKUnity.h |
3 | * | 3 | * |
4 | * Code specific to PKUnity SoC and UniCore ISA | 4 | * Code specific to PKUnity SoC and UniCore ISA |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2010 GUAN Xue-tao | 6 | * Copyright (C) 2001-2010 GUAN Xue-tao |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* Be sure that virtual mapping is defined right */ | 13 | /* Be sure that virtual mapping is defined right */ |
14 | #ifndef __MACH_PUV3_HARDWARE_H__ | 14 | #ifndef __MACH_PUV3_HARDWARE_H__ |
15 | #error You must include hardware.h not PKUnity.h | 15 | #error You must include hardware.h not PKUnity.h |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #include "bitfield.h" | 18 | #include "bitfield.h" |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Memory Definitions | 21 | * Memory Definitions |
22 | */ | 22 | */ |
23 | #define PKUNITY_SDRAM_BASE 0x00000000 /* 0x00000000 - 0x7FFFFFFF 2GB */ | 23 | #define PKUNITY_SDRAM_BASE 0x00000000 /* 0x00000000 - 0x7FFFFFFF 2GB */ |
24 | #define PKUNITY_IOSPACE_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ | 24 | #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ |
25 | #define PKUNITY_PCI_BASE 0x80000000 /* 0x80000000 - 0xBFFFFFFF 1GB */ | 25 | #define PKUNITY_PCI_BASE 0x80000000 /* 0x80000000 - 0xBFFFFFFF 1GB */ |
26 | #include "regs-pci.h" | 26 | #include "regs-pci.h" |
27 | #define PKUNITY_BOOT_ROM2_BASE 0xF4000000 /* 0xF4000000 - 0xF7FFFFFF 64MB */ | 27 | #define PKUNITY_BOOT_ROM2_BASE 0xF4000000 /* 0xF4000000 - 0xF7FFFFFF 64MB */ |
28 | #define PKUNITY_BOOT_SRAM2_BASE 0xF8000000 /* 0xF8000000 - 0xFBFFFFFF 64MB */ | 28 | #define PKUNITY_BOOT_SRAM2_BASE 0xF8000000 /* 0xF8000000 - 0xFBFFFFFF 64MB */ |
29 | #define PKUNITY_BOOT_FLASH_BASE 0xFC000000 /* 0xFC000000 - 0xFFFFFFFF 64MB */ | 29 | #define PKUNITY_BOOT_FLASH_BASE 0xFC000000 /* 0xFC000000 - 0xFFFFFFFF 64MB */ |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB) | 32 | * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB) |
33 | */ | 33 | */ |
34 | #define PKUNITY_UVC_MMAP_BASE 0x0D000000 /* 0x0D000000 - 0x0DFFFFFF 16MB */ | 34 | #define PKUNITY_UVC_MMAP_BASE 0x0D000000 /* 0x0D000000 - 0x0DFFFFFF 16MB */ |
35 | #define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */ | 35 | #define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */ |
36 | #define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 /* 0x0E000000 - 0x0EFFFFFF 16MB */ | 36 | #define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 /* 0x0E000000 - 0x0EFFFFFF 16MB */ |
37 | #define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */ | 37 | #define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */ |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) | 40 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) |
41 | */ | 41 | */ |
42 | /* PCI Configuration regs */ | 42 | /* PCI Configuration regs */ |
43 | #define PKUNITY_PCICFG_BASE 0x80000000 /* 0x80000000 - 0x8000000B 12B */ | 43 | #define PKUNITY_PCICFG_BASE 0x80000000 /* 0x80000000 - 0x8000000B 12B */ |
44 | /* PCI Bridge Base */ | 44 | /* PCI Bridge Base */ |
45 | #define PKUNITY_PCIBRI_BASE 0x80010000 /* 0x80010000 - 0x80010250 592B */ | 45 | #define PKUNITY_PCIBRI_BASE 0x80010000 /* 0x80010000 - 0x80010250 592B */ |
46 | /* PCI Legacy IO */ | 46 | /* PCI Legacy IO */ |
47 | #define PKUNITY_PCILIO_BASE 0x80030000 /* 0x80030000 - 0x8003FFFF 64KB */ | 47 | #define PKUNITY_PCILIO_BASE 0x80030000 /* 0x80030000 - 0x8003FFFF 64KB */ |
48 | /* PCI AHB-PCI MEM-mapping */ | 48 | /* PCI AHB-PCI MEM-mapping */ |
49 | #define PKUNITY_PCIMEM_BASE 0x90000000 /* 0x90000000 - 0x97FFFFFF 128MB */ | 49 | #define PKUNITY_PCIMEM_BASE 0x90000000 /* 0x90000000 - 0x97FFFFFF 128MB */ |
50 | /* PCI PCI-AHB MEM-mapping */ | 50 | /* PCI PCI-AHB MEM-mapping */ |
51 | #define PKUNITY_PCIAHB_BASE 0x98000000 /* 0x98000000 - 0x9FFFFFFF 128MB */ | 51 | #define PKUNITY_PCIAHB_BASE 0x98000000 /* 0x98000000 - 0x9FFFFFFF 128MB */ |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * PKUNITY System Bus Addresses (AHB): 0xC0000000 - 0xEDFFFFFF (640MB) | 54 | * PKUNITY System Bus Addresses (AHB): 0xC0000000 - 0xEDFFFFFF (640MB) |
55 | */ | 55 | */ |
56 | /* AHB-0 is DDR2 SDRAM */ | 56 | /* AHB-0 is DDR2 SDRAM */ |
57 | /* AHB-1 is PCI Space */ | 57 | /* AHB-1 is PCI Space */ |
58 | #define PKUNITY_ARBITER_BASE 0xC0000000 /* AHB-2 */ | 58 | #define PKUNITY_ARBITER_BASE 0xC0000000 /* AHB-2 */ |
59 | #define PKUNITY_DDR2CTRL_BASE 0xC0100000 /* AHB-3 */ | 59 | #define PKUNITY_DDR2CTRL_BASE 0xC0100000 /* AHB-3 */ |
60 | #define PKUNITY_DMAC_BASE 0xC0200000 /* AHB-4 */ | 60 | #define PKUNITY_DMAC_BASE 0xC0200000 /* AHB-4 */ |
61 | #include "regs-dmac.h" | 61 | #include "regs-dmac.h" |
62 | #define PKUNITY_UMAL_BASE 0xC0300000 /* AHB-5 */ | 62 | #define PKUNITY_UMAL_BASE 0xC0300000 /* AHB-5 */ |
63 | #include "regs-umal.h" | 63 | #include "regs-umal.h" |
64 | #define PKUNITY_USB_BASE 0xC0400000 /* AHB-6 */ | 64 | #define PKUNITY_USB_BASE 0xC0400000 /* AHB-6 */ |
65 | #define PKUNITY_SATA_BASE 0xC0500000 /* AHB-7 */ | 65 | #define PKUNITY_SATA_BASE 0xC0500000 /* AHB-7 */ |
66 | #define PKUNITY_SMC_BASE 0xC0600000 /* AHB-8 */ | 66 | #define PKUNITY_SMC_BASE 0xC0600000 /* AHB-8 */ |
67 | /* AHB-9 is for APB bridge */ | 67 | /* AHB-9 is for APB bridge */ |
68 | #define PKUNITY_MME_BASE 0xC0700000 /* AHB-10 */ | 68 | #define PKUNITY_MME_BASE 0xC0700000 /* AHB-10 */ |
69 | #define PKUNITY_UNIGFX_BASE 0xC0800000 /* AHB-11 */ | 69 | #define PKUNITY_UNIGFX_BASE 0xC0800000 /* AHB-11 */ |
70 | #include "regs-unigfx.h" | 70 | #include "regs-unigfx.h" |
71 | #define PKUNITY_NAND_BASE 0xC0900000 /* AHB-12 */ | 71 | #define PKUNITY_NAND_BASE 0xC0900000 /* AHB-12 */ |
72 | #include "regs-nand.h" | 72 | #include "regs-nand.h" |
73 | #define PKUNITY_H264D_BASE 0xC0A00000 /* AHB-13 */ | 73 | #define PKUNITY_H264D_BASE 0xC0A00000 /* AHB-13 */ |
74 | #define PKUNITY_H264E_BASE 0xC0B00000 /* AHB-14 */ | 74 | #define PKUNITY_H264E_BASE 0xC0B00000 /* AHB-14 */ |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * PKUNITY Peripheral Bus Addresses (APB): 0xEE000000 - 0xEFFFFFFF (128MB) | 77 | * PKUNITY Peripheral Bus Addresses (APB): 0xEE000000 - 0xEFFFFFFF (128MB) |
78 | */ | 78 | */ |
79 | #define PKUNITY_UART0_BASE 0xEE000000 /* APB-0 */ | 79 | #define PKUNITY_UART0_BASE 0xEE000000 /* APB-0 */ |
80 | #define PKUNITY_UART1_BASE 0xEE100000 /* APB-1 */ | 80 | #define PKUNITY_UART1_BASE 0xEE100000 /* APB-1 */ |
81 | #include "regs-uart.h" | 81 | #include "regs-uart.h" |
82 | #define PKUNITY_I2C_BASE 0xEE200000 /* APB-2 */ | 82 | #define PKUNITY_I2C_BASE 0xEE200000 /* APB-2 */ |
83 | #include "regs-i2c.h" | 83 | #include "regs-i2c.h" |
84 | #define PKUNITY_SPI_BASE 0xEE300000 /* APB-3 */ | 84 | #define PKUNITY_SPI_BASE 0xEE300000 /* APB-3 */ |
85 | #include "regs-spi.h" | 85 | #include "regs-spi.h" |
86 | #define PKUNITY_AC97_BASE 0xEE400000 /* APB-4 */ | 86 | #define PKUNITY_AC97_BASE 0xEE400000 /* APB-4 */ |
87 | #include "regs-ac97.h" | 87 | #include "regs-ac97.h" |
88 | #define PKUNITY_GPIO_BASE 0xEE500000 /* APB-5 */ | 88 | #define PKUNITY_GPIO_BASE 0xEE500000 /* APB-5 */ |
89 | #include "regs-gpio.h" | 89 | #include "regs-gpio.h" |
90 | #define PKUNITY_INTC_BASE 0xEE600000 /* APB-6 */ | 90 | #define PKUNITY_INTC_BASE 0xEE600000 /* APB-6 */ |
91 | #include "regs-intc.h" | 91 | #include "regs-intc.h" |
92 | #define PKUNITY_RTC_BASE 0xEE700000 /* APB-7 */ | 92 | #define PKUNITY_RTC_BASE 0xEE700000 /* APB-7 */ |
93 | #include "regs-rtc.h" | 93 | #include "regs-rtc.h" |
94 | #define PKUNITY_OST_BASE 0xEE800000 /* APB-8 */ | 94 | #define PKUNITY_OST_BASE 0xEE800000 /* APB-8 */ |
95 | #include "regs-ost.h" | 95 | #include "regs-ost.h" |
96 | #define PKUNITY_RESETC_BASE 0xEE900000 /* APB-9 */ | 96 | #define PKUNITY_RESETC_BASE 0xEE900000 /* APB-9 */ |
97 | #include "regs-resetc.h" | 97 | #include "regs-resetc.h" |
98 | #define PKUNITY_PM_BASE 0xEEA00000 /* APB-10 */ | 98 | #define PKUNITY_PM_BASE 0xEEA00000 /* APB-10 */ |
99 | #include "regs-pm.h" | 99 | #include "regs-pm.h" |
100 | #define PKUNITY_PS2_BASE 0xEEB00000 /* APB-11 */ | 100 | #define PKUNITY_PS2_BASE 0xEEB00000 /* APB-11 */ |
101 | #include "regs-ps2.h" | 101 | #include "regs-ps2.h" |
102 | #define PKUNITY_SDC_BASE 0xEEC00000 /* APB-12 */ | 102 | #define PKUNITY_SDC_BASE 0xEEC00000 /* APB-12 */ |
103 | #include "regs-sdc.h" | 103 | #include "regs-sdc.h" |
104 | 104 | ||
105 | 105 |
arch/unicore32/include/mach/hardware.h
1 | /* | 1 | /* |
2 | * linux/arch/unicore32/include/mach/hardware.h | 2 | * linux/arch/unicore32/include/mach/hardware.h |
3 | * | 3 | * |
4 | * Code specific to PKUnity SoC and UniCore ISA | 4 | * Code specific to PKUnity SoC and UniCore ISA |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2010 GUAN Xue-tao | 6 | * Copyright (C) 2001-2010 GUAN Xue-tao |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * This file contains the hardware definitions for PKUnity architecture | 12 | * This file contains the hardware definitions for PKUnity architecture |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __MACH_PUV3_HARDWARE_H__ | 15 | #ifndef __MACH_PUV3_HARDWARE_H__ |
16 | #define __MACH_PUV3_HARDWARE_H__ | 16 | #define __MACH_PUV3_HARDWARE_H__ |
17 | 17 | ||
18 | #include "PKUnity.h" | 18 | #include "PKUnity.h" |
19 | 19 | ||
20 | #define io_p2v(x) ((x) - PKUNITY_IOSPACE_BASE) | 20 | #define io_p2v(x) ((x) - PKUNITY_MMIO_BASE) |
21 | #define io_v2p(x) ((x) + PKUNITY_IOSPACE_BASE) | 21 | #define io_v2p(x) ((x) + PKUNITY_MMIO_BASE) |
22 | 22 | ||
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | 24 | ||
25 | # define __REG(x) (*((volatile unsigned long *)io_p2v(x))) | 25 | # define __REG(x) (*((volatile unsigned long *)io_p2v(x))) |
26 | # define __PREG(x) (io_v2p((unsigned long)&(x))) | 26 | # define __PREG(x) (io_v2p((unsigned long)&(x))) |
27 | 27 | ||
28 | #else | 28 | #else |
29 | 29 | ||
30 | # define __REG(x) io_p2v(x) | 30 | # define __REG(x) io_p2v(x) |
31 | # define __PREG(x) io_v2p(x) | 31 | # define __PREG(x) io_v2p(x) |
32 | 32 | ||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */ | 35 | #define PCIBIOS_MIN_IO 0x4000 /* should lower than 64KB */ |
36 | #define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE | 36 | #define PCIBIOS_MIN_MEM PKUNITY_PCIMEM_BASE |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * We override the standard dma-mask routines for bouncing. | 39 | * We override the standard dma-mask routines for bouncing. |
40 | */ | 40 | */ |
41 | #define HAVE_ARCH_PCI_SET_DMA_MASK | 41 | #define HAVE_ARCH_PCI_SET_DMA_MASK |
42 | 42 | ||
43 | #define pcibios_assign_all_busses() 1 | 43 | #define pcibios_assign_all_busses() 1 |
44 | 44 | ||
45 | #endif /* __MACH_PUV3_HARDWARE_H__ */ | 45 | #endif /* __MACH_PUV3_HARDWARE_H__ */ |
46 | 46 |