aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/amigahw.h16
-rw-r--r--include/asm-ppc/amigaints.h133
-rw-r--r--include/asm-ppc/amigappc.h85
-rw-r--r--include/asm-ppc/ans-lcd.h11
-rw-r--r--include/asm-ppc/bootinfo.h5
-rw-r--r--include/asm-ppc/io.h51
-rw-r--r--include/asm-ppc/machdep.h4
-rw-r--r--include/asm-ppc/ocp.h2
-rw-r--r--include/asm-ppc/page.h44
-rw-r--r--include/asm-ppc/pgtable.h8
-rw-r--r--include/asm-ppc/prom.h1
11 files changed, 10 insertions, 350 deletions
diff --git a/include/asm-ppc/amigahw.h b/include/asm-ppc/amigahw.h
deleted file mode 100644
index 90fd1274d727..000000000000
--- a/include/asm-ppc/amigahw.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifdef __KERNEL__
2#ifndef __ASMPPC_AMIGAHW_H
3#define __ASMPPC_AMIGAHW_H
4
5#include <asm-m68k/amigahw.h>
6
7#undef CHIP_PHYSADDR
8#ifdef CONFIG_APUS_FAST_EXCEPT
9#define CHIP_PHYSADDR (0x000000)
10#else
11#define CHIP_PHYSADDR (0x004000)
12#endif
13
14
15#endif /* __ASMPPC_AMIGAHW_H */
16#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/amigaints.h b/include/asm-ppc/amigaints.h
deleted file mode 100644
index aa3ff6349e81..000000000000
--- a/include/asm-ppc/amigaints.h
+++ /dev/null
@@ -1,133 +0,0 @@
1/*
2** amigaints.h -- Amiga Linux interrupt handling structs and prototypes
3**
4** Copyright 1992 by Greg Harp
5**
6** This file is subject to the terms and conditions of the GNU General Public
7** License. See the file COPYING in the main directory of this archive
8** for more details.
9**
10** Created 10/2/92 by Greg Harp
11*/
12
13#ifdef __KERNEL__
14#ifndef _ASMm68k_AMIGAINTS_H_
15#define _ASMm68k_AMIGAINTS_H_
16
17/*
18** Amiga Interrupt sources.
19**
20*/
21
22#define AUTO_IRQS (8)
23#define AMI_STD_IRQS (14)
24#define CIA_IRQS (5)
25#define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */
26
27/* vertical blanking interrupt */
28#define IRQ_AMIGA_VERTB 0
29
30/* copper interrupt */
31#define IRQ_AMIGA_COPPER 1
32
33/* Audio interrupts */
34#define IRQ_AMIGA_AUD0 2
35#define IRQ_AMIGA_AUD1 3
36#define IRQ_AMIGA_AUD2 4
37#define IRQ_AMIGA_AUD3 5
38
39/* Blitter done interrupt */
40#define IRQ_AMIGA_BLIT 6
41
42/* floppy disk interrupts */
43#define IRQ_AMIGA_DSKSYN 7
44#define IRQ_AMIGA_DSKBLK 8
45
46/* builtin serial port interrupts */
47#define IRQ_AMIGA_RBF 9
48#define IRQ_AMIGA_TBE 10
49
50/* software interrupts */
51#define IRQ_AMIGA_SOFT 11
52
53/* interrupts from external hardware */
54#define IRQ_AMIGA_PORTS 12
55#define IRQ_AMIGA_EXTER 13
56
57/* CIA interrupt sources */
58#define IRQ_AMIGA_CIAA 14
59#define IRQ_AMIGA_CIAA_TA 14
60#define IRQ_AMIGA_CIAA_TB 15
61#define IRQ_AMIGA_CIAA_ALRM 16
62#define IRQ_AMIGA_CIAA_SP 17
63#define IRQ_AMIGA_CIAA_FLG 18
64#define IRQ_AMIGA_CIAB 19
65#define IRQ_AMIGA_CIAB_TA 19
66#define IRQ_AMIGA_CIAB_TB 20
67#define IRQ_AMIGA_CIAB_ALRM 21
68#define IRQ_AMIGA_CIAB_SP 22
69#define IRQ_AMIGA_CIAB_FLG 23
70
71/* auto-vector interrupts */
72#define IRQ_AMIGA_AUTO 24
73#define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */
74#define IRQ_AMIGA_AUTO_1 25
75#define IRQ_AMIGA_AUTO_2 26
76#define IRQ_AMIGA_AUTO_3 27
77#define IRQ_AMIGA_AUTO_4 28
78#define IRQ_AMIGA_AUTO_5 29
79#define IRQ_AMIGA_AUTO_6 30
80#define IRQ_AMIGA_AUTO_7 31
81
82#define IRQ_FLOPPY IRQ_AMIGA_DSKBLK
83
84/* INTREQR masks */
85#define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */
86#define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */
87#define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */
88#define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */
89#define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */
90#define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */
91#define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */
92
93#define IF_SETCLR 0x8000 /* set/clr bit */
94#define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */
95#define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */
96#define IF_DSKSYN 0x1000 /* disk sync interrupt */
97#define IF_RBF 0x0800 /* serial receive buffer full interrupt */
98#define IF_AUD3 0x0400 /* audio channel 3 done interrupt */
99#define IF_AUD2 0x0200 /* audio channel 2 done interrupt */
100#define IF_AUD1 0x0100 /* audio channel 1 done interrupt */
101#define IF_AUD0 0x0080 /* audio channel 0 done interrupt */
102#define IF_BLIT 0x0040 /* blitter done interrupt */
103#define IF_VERTB 0x0020 /* vertical blanking interrupt */
104#define IF_COPER 0x0010 /* copper interrupt */
105#define IF_PORTS 0x0008 /* external level 2 and CIA A interrupt */
106#define IF_SOFT 0x0004 /* software initiated interrupt */
107#define IF_DSKBLK 0x0002 /* diskblock DMA finished */
108#define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */
109
110extern void amiga_do_irq(int irq, struct pt_regs *fp);
111extern void amiga_do_irq_list(int irq, struct pt_regs *fp);
112
113/* CIA interrupt control register bits */
114
115#define CIA_ICR_TA 0x01
116#define CIA_ICR_TB 0x02
117#define CIA_ICR_ALRM 0x04
118#define CIA_ICR_SP 0x08
119#define CIA_ICR_FLG 0x10
120#define CIA_ICR_ALL 0x1f
121#define CIA_ICR_SETCLR 0x80
122
123/* to access the interrupt control registers of CIA's use only
124** these functions, they behave exactly like the amiga os routines
125*/
126
127extern struct ciabase ciaa_base, ciab_base;
128
129extern unsigned char cia_set_irq(unsigned int irq, int set);
130extern unsigned char cia_able_irq(unsigned int irq, int enable);
131
132#endif /* asm-m68k/amigaints.h */
133#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/amigappc.h b/include/asm-ppc/amigappc.h
deleted file mode 100644
index 35114ce5135f..000000000000
--- a/include/asm-ppc/amigappc.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*
2** asm-ppc/amigappc.h -- This header defines some values and pointers for
3** the Phase 5 PowerUp card.
4**
5** Copyright 1997, 1998 by Phase5, Germany.
6**
7** This file is subject to the terms and conditions of the GNU General Public
8** License. See the file COPYING in the main directory of this archive
9** for more details.
10**
11** Created: 7/22/97 by Jesper Skov
12*/
13
14#ifdef __KERNEL__
15#ifndef _M68K_AMIGAPPC_H
16#define _M68K_AMIGAPPC_H
17
18#ifndef __ASSEMBLY__
19
20/* #include <asm/system.h> */
21#define mb() __asm__ __volatile__ ("sync" : : : "memory")
22
23#define APUS_WRITE(_a_, _v_) \
24do { \
25 (*((volatile unsigned char *)(_a_)) = (_v_)); \
26 mb(); \
27} while (0)
28
29#define APUS_READ(_a_, _v_) \
30do { \
31 (_v_) = (*((volatile unsigned char *)(_a_))); \
32 mb(); \
33} while (0)
34#endif /* ndef __ASSEMBLY__ */
35
36/* Maybe add a [#ifdef WANT_ZTWOBASE] condition to amigahw.h? */
37#define zTwoBase (0x80000000)
38
39#define APUS_IPL_BASE (zTwoBase + 0x00f60000)
40#define APUS_REG_RESET (APUS_IPL_BASE + 0x00)
41#define APUS_REG_WAITSTATE (APUS_IPL_BASE + 0x10)
42#define APUS_REG_SHADOW (APUS_IPL_BASE + 0x18)
43#define APUS_REG_LOCK (APUS_IPL_BASE + 0x20)
44#define APUS_REG_INT (APUS_IPL_BASE + 0x28)
45#define APUS_IPL_EMU (APUS_IPL_BASE + 0x30)
46#define APUS_INT_LVL (APUS_IPL_BASE + 0x38)
47
48#define REGSHADOW_SETRESET (0x80)
49#define REGSHADOW_SELFRESET (0x40)
50
51#define REGLOCK_SETRESET (0x80)
52#define REGLOCK_BLACKMAGICK1 (0x40)
53#define REGLOCK_BLACKMAGICK2 (0x20)
54#define REGLOCK_BLACKMAGICK3 (0x10)
55
56#define REGWAITSTATE_SETRESET (0x80)
57#define REGWAITSTATE_PPCW (0x08)
58#define REGWAITSTATE_PPCR (0x04)
59
60#define REGRESET_SETRESET (0x80)
61#define REGRESET_PPCRESET (0x10)
62#define REGRESET_M68KRESET (0x08)
63#define REGRESET_AMIGARESET (0x04)
64#define REGRESET_AUXRESET (0x02)
65#define REGRESET_SCSIRESET (0x01)
66
67#define REGINT_SETRESET (0x80)
68#define REGINT_ENABLEIPL (0x02)
69#define REGINT_INTMASTER (0x01)
70
71#define IPLEMU_SETRESET (0x80)
72#define IPLEMU_DISABLEINT (0x40)
73#define IPLEMU_IPL2 (0x20)
74#define IPLEMU_IPL1 (0x10)
75#define IPLEMU_IPL0 (0x08)
76#define IPLEMU_PPCIPL2 (0x04)
77#define IPLEMU_PPCIPL1 (0x02)
78#define IPLEMU_PPCIPL0 (0x01)
79#define IPLEMU_IPLMASK (IPLEMU_PPCIPL2|IPLEMU_PPCIPL1|IPLEMU_PPCIPL0)
80
81#define INTLVL_SETRESET (0x80)
82#define INTLVL_MASK (0x7f)
83
84#endif /* _M68k_AMIGAPPC_H */
85#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/ans-lcd.h b/include/asm-ppc/ans-lcd.h
deleted file mode 100644
index d795b9fd2db6..000000000000
--- a/include/asm-ppc/ans-lcd.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _PPC_ANS_LCD_H
2#define _PPC_ANS_LCD_H
3
4#define ANSLCD_MINOR 156
5
6#define ANSLCD_CLEAR 0x01
7#define ANSLCD_SENDCTRL 0x02
8#define ANSLCD_SETSHORTDELAY 0x03
9#define ANSLCD_SETLONGDELAY 0x04
10
11#endif
diff --git a/include/asm-ppc/bootinfo.h b/include/asm-ppc/bootinfo.h
index 2ace4a74f263..f6ed77aee328 100644
--- a/include/asm-ppc/bootinfo.h
+++ b/include/asm-ppc/bootinfo.h
@@ -11,10 +11,6 @@
11 11
12#include <asm/page.h> 12#include <asm/page.h>
13 13
14#if defined(CONFIG_APUS) && !defined(__BOOTER__)
15#include <asm-m68k/bootinfo.h>
16#else
17
18struct bi_record { 14struct bi_record {
19 unsigned long tag; /* tag ID */ 15 unsigned long tag; /* tag ID */
20 unsigned long size; /* size of record (in bytes) */ 16 unsigned long size; /* size of record (in bytes) */
@@ -44,7 +40,6 @@ bootinfo_addr(unsigned long offset)
44 return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1, 40 return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1,
45 (1 << 20)); 41 (1 << 20));
46} 42}
47#endif /* CONFIG_APUS */
48 43
49 44
50#endif /* _PPC_BOOTINFO_H */ 45#endif /* _PPC_BOOTINFO_H */
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 95d590423cf2..8f58231a8bc6 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -30,7 +30,7 @@
30#include <asm/mpc8xx.h> 30#include <asm/mpc8xx.h>
31#elif defined(CONFIG_8260) 31#elif defined(CONFIG_8260)
32#include <asm/mpc8260.h> 32#include <asm/mpc8260.h>
33#elif defined(CONFIG_APUS) || !defined(CONFIG_PCI) 33#elif !defined(CONFIG_PCI)
34#define _IO_BASE 0 34#define _IO_BASE 0
35#define _ISA_MEM_BASE 0 35#define _ISA_MEM_BASE 0
36#define PCI_DRAM_OFFSET 0 36#define PCI_DRAM_OFFSET 0
@@ -145,24 +145,7 @@ static inline void writeb(__u8 b, volatile void __iomem *addr)
145} 145}
146#endif 146#endif
147 147
148#if defined(CONFIG_APUS) 148#if defined (CONFIG_8260_PCI9)
149static inline __u16 readw(const volatile void __iomem *addr)
150{
151 return *(__force volatile __u16 *)(addr);
152}
153static inline __u32 readl(const volatile void __iomem *addr)
154{
155 return *(__force volatile __u32 *)(addr);
156}
157static inline void writew(__u16 b, volatile void __iomem *addr)
158{
159 *(__force volatile __u16 *)(addr) = b;
160}
161static inline void writel(__u32 b, volatile void __iomem *addr)
162{
163 *(__force volatile __u32 *)(addr) = b;
164}
165#elif defined (CONFIG_8260_PCI9)
166/* Use macros if PCI9 workaround enabled */ 149/* Use macros if PCI9 workaround enabled */
167#define readw(addr) in_le16((volatile u16 *)(addr)) 150#define readw(addr) in_le16((volatile u16 *)(addr))
168#define readl(addr) in_le32((volatile u32 *)(addr)) 151#define readl(addr) in_le32((volatile u32 *)(addr))
@@ -185,7 +168,7 @@ static inline void writel(__u32 b, volatile void __iomem *addr)
185{ 168{
186 out_le32(addr, b); 169 out_le32(addr, b);
187} 170}
188#endif /* CONFIG_APUS */ 171#endif /* CONFIG_8260_PCI9 */
189 172
190#define readb_relaxed(addr) readb(addr) 173#define readb_relaxed(addr) readb(addr)
191#define readw_relaxed(addr) readw(addr) 174#define readw_relaxed(addr) readw(addr)
@@ -300,13 +283,7 @@ extern __inline__ void name(unsigned int val, unsigned int port) \
300} 283}
301 284
302__do_out_asm(outb, "stbx") 285__do_out_asm(outb, "stbx")
303#ifdef CONFIG_APUS 286#if defined (CONFIG_8260_PCI9)
304__do_in_asm(inb, "lbzx")
305__do_in_asm(inw, "lhz%U1%X1")
306__do_in_asm(inl, "lwz%U1%X1")
307__do_out_asm(outl,"stw%U0%X0")
308__do_out_asm(outw, "sth%U0%X0")
309#elif defined (CONFIG_8260_PCI9)
310/* in asm cannot be defined if PCI9 workaround is used */ 287/* in asm cannot be defined if PCI9 workaround is used */
311#define inb(port) in_8((port)+___IO_BASE) 288#define inb(port) in_8((port)+___IO_BASE)
312#define inw(port) in_le16((port)+___IO_BASE) 289#define inw(port) in_le16((port)+___IO_BASE)
@@ -371,7 +348,6 @@ extern void __iomem *ioremap64(unsigned long long address, unsigned long size);
371#define ioremap_nocache(addr, size) ioremap((addr), (size)) 348#define ioremap_nocache(addr, size) ioremap((addr), (size))
372extern void iounmap(volatile void __iomem *addr); 349extern void iounmap(volatile void __iomem *addr);
373extern unsigned long iopa(unsigned long addr); 350extern unsigned long iopa(unsigned long addr);
374extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
375extern void io_block_mapping(unsigned long virt, phys_addr_t phys, 351extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
376 unsigned int size, int flags); 352 unsigned int size, int flags);
377 353
@@ -384,24 +360,16 @@ extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
384 */ 360 */
385extern inline unsigned long virt_to_bus(volatile void * address) 361extern inline unsigned long virt_to_bus(volatile void * address)
386{ 362{
387#ifndef CONFIG_APUS
388 if (address == (void *)0) 363 if (address == (void *)0)
389 return 0; 364 return 0;
390 return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET; 365 return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET;
391#else
392 return iopa ((unsigned long) address);
393#endif
394} 366}
395 367
396extern inline void * bus_to_virt(unsigned long address) 368extern inline void * bus_to_virt(unsigned long address)
397{ 369{
398#ifndef CONFIG_APUS
399 if (address == 0) 370 if (address == 0)
400 return NULL; 371 return NULL;
401 return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE); 372 return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE);
402#else
403 return (void*) mm_ptov (address);
404#endif
405} 373}
406 374
407/* 375/*
@@ -410,20 +378,12 @@ extern inline void * bus_to_virt(unsigned long address)
410 */ 378 */
411extern inline unsigned long virt_to_phys(volatile void * address) 379extern inline unsigned long virt_to_phys(volatile void * address)
412{ 380{
413#ifndef CONFIG_APUS
414 return (unsigned long) address - KERNELBASE; 381 return (unsigned long) address - KERNELBASE;
415#else
416 return iopa ((unsigned long) address);
417#endif
418} 382}
419 383
420extern inline void * phys_to_virt(unsigned long address) 384extern inline void * phys_to_virt(unsigned long address)
421{ 385{
422#ifndef CONFIG_APUS
423 return (void *) (address + KERNELBASE); 386 return (void *) (address + KERNELBASE);
424#else
425 return (void*) mm_ptov (address);
426#endif
427} 387}
428 388
429/* 389/*
@@ -553,4 +513,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
553#define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) 513#define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v))
554#define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) 514#define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v))
555 515
516#define setbits8(_addr, _v) out_8((_addr), in_8(_addr) | (_v))
517#define clrbits8(_addr, _v) out_8((_addr), in_8(_addr) & ~(_v))
518
556#endif /* __KERNEL__ */ 519#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h
index 293a444a1d77..a20b499b0186 100644
--- a/include/asm-ppc/machdep.h
+++ b/include/asm-ppc/machdep.h
@@ -8,10 +8,6 @@
8#include <asm/setup.h> 8#include <asm/setup.h>
9#include <asm/page.h> 9#include <asm/page.h>
10 10
11#ifdef CONFIG_APUS
12#include <asm-m68k/machdep.h>
13#endif
14
15struct pt_regs; 11struct pt_regs;
16struct pci_bus; 12struct pci_bus;
17struct pci_dev; 13struct pci_dev;
diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h
index 16dbc7d17450..1379a4f76de3 100644
--- a/include/asm-ppc/ocp.h
+++ b/include/asm-ppc/ocp.h
@@ -27,10 +27,10 @@
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/list.h> 28#include <linux/list.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/rwsem.h>
30 31
31#include <asm/mmu.h> 32#include <asm/mmu.h>
32#include <asm/ocp_ids.h> 33#include <asm/ocp_ids.h>
33#include <asm/rwsem.h>
34#include <asm/semaphore.h> 34#include <asm/semaphore.h>
35 35
36#ifdef CONFIG_PPC_OCP 36#ifdef CONFIG_PPC_OCP
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index fe95c8258cf9..ad4c5a1bc9d6 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -97,62 +97,22 @@ extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
97extern void copy_user_page(void *to, void *from, unsigned long vaddr, 97extern void copy_user_page(void *to, void *from, unsigned long vaddr,
98 struct page *pg); 98 struct page *pg);
99 99
100#ifndef CONFIG_APUS
101#define PPC_MEMSTART 0 100#define PPC_MEMSTART 0
102#define PPC_PGSTART 0
103#define PPC_MEMOFFSET PAGE_OFFSET 101#define PPC_MEMOFFSET PAGE_OFFSET
104#else
105extern unsigned long ppc_memstart;
106extern unsigned long ppc_pgstart;
107extern unsigned long ppc_memoffset;
108#define PPC_MEMSTART ppc_memstart
109#define PPC_PGSTART ppc_pgstart
110#define PPC_MEMOFFSET ppc_memoffset
111#endif
112 102
113#if defined(CONFIG_APUS) && !defined(MODULE)
114/* map phys->virtual and virtual->phys for RAM pages */
115static inline unsigned long ___pa(unsigned long v)
116{
117 unsigned long p;
118 asm volatile ("1: addis %0, %1, %2;"
119 ".section \".vtop_fixup\",\"aw\";"
120 ".align 1;"
121 ".long 1b;"
122 ".previous;"
123 : "=r" (p)
124 : "b" (v), "K" (((-PAGE_OFFSET) >> 16) & 0xffff));
125
126 return p;
127}
128static inline void* ___va(unsigned long p)
129{
130 unsigned long v;
131 asm volatile ("1: addis %0, %1, %2;"
132 ".section \".ptov_fixup\",\"aw\";"
133 ".align 1;"
134 ".long 1b;"
135 ".previous;"
136 : "=r" (v)
137 : "b" (p), "K" (((PAGE_OFFSET) >> 16) & 0xffff));
138
139 return (void*) v;
140}
141#else
142#define ___pa(vaddr) ((vaddr)-PPC_MEMOFFSET) 103#define ___pa(vaddr) ((vaddr)-PPC_MEMOFFSET)
143#define ___va(paddr) ((paddr)+PPC_MEMOFFSET) 104#define ___va(paddr) ((paddr)+PPC_MEMOFFSET)
144#endif
145 105
146extern int page_is_ram(unsigned long pfn); 106extern int page_is_ram(unsigned long pfn);
147 107
148#define __pa(x) ___pa((unsigned long)(x)) 108#define __pa(x) ___pa((unsigned long)(x))
149#define __va(x) ((void *)(___va((unsigned long)(x)))) 109#define __va(x) ((void *)(___va((unsigned long)(x))))
150 110
151#define ARCH_PFN_OFFSET (PPC_PGSTART) 111#define ARCH_PFN_OFFSET 0
152#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 112#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
153#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) 113#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
154 114
155#define pfn_valid(pfn) (((pfn) - PPC_PGSTART) < max_mapnr) 115#define pfn_valid(pfn) ((pfn) < max_mapnr)
156#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 116#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
157 117
158/* Pure 2^n version of get_order */ 118/* Pure 2^n version of get_order */
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index c159315d2c8f..063ad91cbbcc 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -765,14 +765,6 @@ extern void paging_init(void);
765#define pte_to_pgoff(pte) (pte_val(pte) >> 3) 765#define pte_to_pgoff(pte) (pte_val(pte) >> 3)
766#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) 766#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE })
767 767
768/* CONFIG_APUS */
769/* For virtual address to physical address conversion */
770extern void cache_clear(__u32 addr, int length);
771extern void cache_push(__u32 addr, int length);
772extern int mm_end_of_chunk (unsigned long addr, int len);
773extern unsigned long iopa(unsigned long addr);
774extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
775
776/* Values for nocacheflag and cmode */ 768/* Values for nocacheflag and cmode */
777/* These are not used by the APUS kernel_map, but prevents 769/* These are not used by the APUS kernel_map, but prevents
778 compilation errors. */ 770 compilation errors. */
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
index 901f7fa8b2d7..71f4c996fe75 100644
--- a/include/asm-ppc/prom.h
+++ b/include/asm-ppc/prom.h
@@ -35,7 +35,6 @@ extern unsigned long sub_reloc_offset(unsigned long);
35#define machine_is_compatible(x) 0 35#define machine_is_compatible(x) 0
36#define of_find_compatible_node(f, t, c) NULL 36#define of_find_compatible_node(f, t, c) NULL
37#define of_get_property(p, n, l) NULL 37#define of_get_property(p, n, l) NULL
38#define get_property(a, b, c) of_get_property((a), (b), (c))
39 38
40#endif /* _PPC_PROM_H */ 39#endif /* _PPC_PROM_H */
41#endif /* __KERNEL__ */ 40#endif /* __KERNEL__ */