diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/types.h | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 1 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 16 |
4 files changed, 9 insertions, 18 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index c171f5bcf258..380baa1780e9 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -22,6 +22,9 @@ config WORD_SIZE | |||
22 | config PPC_MERGE | 22 | config PPC_MERGE |
23 | def_bool y | 23 | def_bool y |
24 | 24 | ||
25 | config ARCH_PHYS_ADDR_T_64BIT | ||
26 | def_bool PPC64 || PHYS_64BIT | ||
27 | |||
25 | config MMU | 28 | config MMU |
26 | bool | 29 | bool |
27 | default y | 30 | default y |
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index a9a9262e84a3..c004c13f291e 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -48,13 +48,6 @@ typedef struct { | |||
48 | 48 | ||
49 | typedef __vector128 vector128; | 49 | typedef __vector128 vector128; |
50 | 50 | ||
51 | /* Physical address used by some IO functions */ | ||
52 | #if defined(CONFIG_PPC64) || defined(CONFIG_PHYS_64BIT) | ||
53 | typedef u64 phys_addr_t; | ||
54 | #else | ||
55 | typedef u32 phys_addr_t; | ||
56 | #endif | ||
57 | |||
58 | #if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) | 51 | #if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) |
59 | typedef u64 dma_addr_t; | 52 | typedef u64 dma_addr_t; |
60 | #else | 53 | #else |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 439c5ba34ecf..548efa55c8fe 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -135,7 +135,6 @@ config PTE_64BIT | |||
135 | config PHYS_64BIT | 135 | config PHYS_64BIT |
136 | bool 'Large physical address support' if E500 || PPC_86xx | 136 | bool 'Large physical address support' if E500 || PPC_86xx |
137 | depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx | 137 | depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx |
138 | select RESOURCES_64BIT | ||
139 | ---help--- | 138 | ---help--- |
140 | This option enables kernel support for larger than 32-bit physical | 139 | This option enables kernel support for larger than 32-bit physical |
141 | addresses. This feature may not be available on all cores. | 140 | addresses. This feature may not be available on all cores. |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 9f6f73d584d6..d3e4d61030b5 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -39,13 +39,10 @@ static int dma_offset_set; | |||
39 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) | 39 | #define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) |
40 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) | 40 | #define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) |
41 | 41 | ||
42 | #ifdef CONFIG_RESOURCES_64BIT | 42 | #define RES_TO_U32_LOW(val) \ |
43 | #define RES_TO_U32_LOW(val) U64_TO_U32_LOW(val) | 43 | ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_LOW(val) : (val)) |
44 | #define RES_TO_U32_HIGH(val) U64_TO_U32_HIGH(val) | 44 | #define RES_TO_U32_HIGH(val) \ |
45 | #else | 45 | ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_HIGH(val) : (0)) |
46 | #define RES_TO_U32_LOW(val) (val) | ||
47 | #define RES_TO_U32_HIGH(val) (0) | ||
48 | #endif | ||
49 | 46 | ||
50 | static inline int ppc440spe_revA(void) | 47 | static inline int ppc440spe_revA(void) |
51 | { | 48 | { |
@@ -144,12 +141,11 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, | |||
144 | 141 | ||
145 | /* Use that */ | 142 | /* Use that */ |
146 | res->start = pci_addr; | 143 | res->start = pci_addr; |
147 | #ifndef CONFIG_RESOURCES_64BIT | ||
148 | /* Beware of 32 bits resources */ | 144 | /* Beware of 32 bits resources */ |
149 | if ((pci_addr + size) > 0x100000000ull) | 145 | if (sizeof(resource_size_t) == sizeof(u32) && |
146 | (pci_addr + size) > 0x100000000ull) | ||
150 | res->end = 0xffffffff; | 147 | res->end = 0xffffffff; |
151 | else | 148 | else |
152 | #endif | ||
153 | res->end = res->start + size - 1; | 149 | res->end = res->start + size - 1; |
154 | break; | 150 | break; |
155 | } | 151 | } |