From b8b572e1015f81b4e748417be2629dfe51ab99f9 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 1 Aug 2008 15:20:30 +1000 Subject: powerpc: Move include files to arch/powerpc/include/asm from include/asm-powerpc. This is the result of a mkdir arch/powerpc/include/asm git mv include/asm-powerpc/* arch/powerpc/include/asm Followed by a few documentation/comment fixups and a couple of places where was being used explicitly. Of the latter only one was outside the arch code and it is a driver only built for powerpc. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/8253pit.h | 10 + arch/powerpc/include/asm/8xx_immap.h | 564 ++++++++++ arch/powerpc/include/asm/Kbuild | 37 + arch/powerpc/include/asm/a.out.h | 20 + arch/powerpc/include/asm/abs_addr.h | 75 ++ arch/powerpc/include/asm/agp.h | 22 + arch/powerpc/include/asm/asm-compat.h | 69 ++ arch/powerpc/include/asm/atomic.h | 479 +++++++++ arch/powerpc/include/asm/auxvec.h | 19 + arch/powerpc/include/asm/backlight.h | 41 + arch/powerpc/include/asm/bitops.h | 410 ++++++++ arch/powerpc/include/asm/bootx.h | 171 ++++ arch/powerpc/include/asm/btext.h | 28 + arch/powerpc/include/asm/bug.h | 121 +++ arch/powerpc/include/asm/bugs.h | 18 + arch/powerpc/include/asm/byteorder.h | 89 ++ arch/powerpc/include/asm/cache.h | 45 + arch/powerpc/include/asm/cacheflush.h | 75 ++ arch/powerpc/include/asm/cell-pmu.h | 105 ++ arch/powerpc/include/asm/cell-regs.h | 315 ++++++ arch/powerpc/include/asm/checksum.h | 117 +++ arch/powerpc/include/asm/clk_interface.h | 20 + arch/powerpc/include/asm/code-patching.h | 54 + arch/powerpc/include/asm/compat.h | 214 ++++ arch/powerpc/include/asm/cpm.h | 106 ++ arch/powerpc/include/asm/cpm1.h | 652 ++++++++++++ arch/powerpc/include/asm/cpm2.h | 1195 ++++++++++++++++++++++ arch/powerpc/include/asm/cputable.h | 514 ++++++++++ arch/powerpc/include/asm/cputhreads.h | 71 ++ arch/powerpc/include/asm/cputime.h | 235 +++++ arch/powerpc/include/asm/current.h | 40 + arch/powerpc/include/asm/dbdma.h | 108 ++ arch/powerpc/include/asm/dcr-generic.h | 49 + arch/powerpc/include/asm/dcr-mmio.h | 61 ++ arch/powerpc/include/asm/dcr-native.h | 116 +++ arch/powerpc/include/asm/dcr-regs.h | 149 +++ arch/powerpc/include/asm/dcr.h | 82 ++ arch/powerpc/include/asm/delay.h | 34 + arch/powerpc/include/asm/device.h | 24 + arch/powerpc/include/asm/div64.h | 1 + arch/powerpc/include/asm/dma-mapping.h | 474 +++++++++ arch/powerpc/include/asm/dma.h | 360 +++++++ arch/powerpc/include/asm/edac.h | 40 + arch/powerpc/include/asm/eeh.h | 211 ++++ arch/powerpc/include/asm/eeh_event.h | 53 + arch/powerpc/include/asm/elf.h | 424 ++++++++ arch/powerpc/include/asm/emergency-restart.h | 1 + arch/powerpc/include/asm/errno.h | 11 + arch/powerpc/include/asm/exception.h | 311 ++++++ arch/powerpc/include/asm/fb.h | 21 + arch/powerpc/include/asm/fcntl.h | 11 + arch/powerpc/include/asm/feature-fixups.h | 126 +++ arch/powerpc/include/asm/firmware.h | 132 +++ arch/powerpc/include/asm/fixmap.h | 106 ++ arch/powerpc/include/asm/floppy.h | 213 ++++ arch/powerpc/include/asm/fs_pd.h | 50 + arch/powerpc/include/asm/fsl_gtm.h | 47 + arch/powerpc/include/asm/fsl_lbc.h | 311 ++++++ arch/powerpc/include/asm/ftrace.h | 14 + arch/powerpc/include/asm/futex.h | 117 +++ arch/powerpc/include/asm/gpio.h | 56 + arch/powerpc/include/asm/grackle.h | 12 + arch/powerpc/include/asm/hardirq.h | 29 + arch/powerpc/include/asm/heathrow.h | 67 ++ arch/powerpc/include/asm/highmem.h | 138 +++ arch/powerpc/include/asm/hugetlb.h | 75 ++ arch/powerpc/include/asm/hvcall.h | 296 ++++++ arch/powerpc/include/asm/hvconsole.h | 41 + arch/powerpc/include/asm/hvcserver.h | 59 ++ arch/powerpc/include/asm/hw_irq.h | 135 +++ arch/powerpc/include/asm/hydra.h | 102 ++ arch/powerpc/include/asm/i8259.h | 17 + arch/powerpc/include/asm/ibmebus.h | 60 ++ arch/powerpc/include/asm/ide.h | 59 ++ arch/powerpc/include/asm/immap_86xx.h | 156 +++ arch/powerpc/include/asm/immap_cpm2.h | 650 ++++++++++++ arch/powerpc/include/asm/immap_qe.h | 483 +++++++++ arch/powerpc/include/asm/io-defs.h | 60 ++ arch/powerpc/include/asm/io.h | 787 ++++++++++++++ arch/powerpc/include/asm/ioctl.h | 13 + arch/powerpc/include/asm/ioctls.h | 110 ++ arch/powerpc/include/asm/iommu.h | 131 +++ arch/powerpc/include/asm/ipcbuf.h | 34 + arch/powerpc/include/asm/ipic.h | 91 ++ arch/powerpc/include/asm/irq.h | 654 ++++++++++++ arch/powerpc/include/asm/irq_regs.h | 2 + arch/powerpc/include/asm/irqflags.h | 42 + arch/powerpc/include/asm/iseries/alpaca.h | 31 + arch/powerpc/include/asm/iseries/hv_call.h | 111 ++ arch/powerpc/include/asm/iseries/hv_call_event.h | 201 ++++ arch/powerpc/include/asm/iseries/hv_call_sc.h | 50 + arch/powerpc/include/asm/iseries/hv_call_xm.h | 61 ++ arch/powerpc/include/asm/iseries/hv_lp_config.h | 128 +++ arch/powerpc/include/asm/iseries/hv_lp_event.h | 162 +++ arch/powerpc/include/asm/iseries/hv_types.h | 112 ++ arch/powerpc/include/asm/iseries/iommu.h | 41 + arch/powerpc/include/asm/iseries/it_lp_queue.h | 78 ++ arch/powerpc/include/asm/iseries/lpar_map.h | 85 ++ arch/powerpc/include/asm/iseries/mf.h | 51 + arch/powerpc/include/asm/iseries/vio.h | 265 +++++ arch/powerpc/include/asm/kdebug.h | 15 + arch/powerpc/include/asm/kdump.h | 35 + arch/powerpc/include/asm/kexec.h | 160 +++ arch/powerpc/include/asm/keylargo.h | 261 +++++ arch/powerpc/include/asm/kgdb.h | 63 ++ arch/powerpc/include/asm/kmap_types.h | 33 + arch/powerpc/include/asm/kprobes.h | 118 +++ arch/powerpc/include/asm/kvm.h | 55 + arch/powerpc/include/asm/kvm_asm.h | 55 + arch/powerpc/include/asm/kvm_host.h | 155 +++ arch/powerpc/include/asm/kvm_para.h | 37 + arch/powerpc/include/asm/kvm_ppc.h | 95 ++ arch/powerpc/include/asm/libata-portmap.h | 12 + arch/powerpc/include/asm/linkage.h | 6 + arch/powerpc/include/asm/lmb.h | 15 + arch/powerpc/include/asm/local.h | 200 ++++ arch/powerpc/include/asm/lppaca.h | 159 +++ arch/powerpc/include/asm/lv1call.h | 348 +++++++ arch/powerpc/include/asm/machdep.h | 365 +++++++ arch/powerpc/include/asm/macio.h | 142 +++ arch/powerpc/include/asm/mc146818rtc.h | 36 + arch/powerpc/include/asm/mediabay.h | 43 + arch/powerpc/include/asm/mman.h | 63 ++ arch/powerpc/include/asm/mmu-40x.h | 63 ++ arch/powerpc/include/asm/mmu-44x.h | 76 ++ arch/powerpc/include/asm/mmu-8xx.h | 145 +++ arch/powerpc/include/asm/mmu-fsl-booke.h | 82 ++ arch/powerpc/include/asm/mmu-hash32.h | 83 ++ arch/powerpc/include/asm/mmu-hash64.h | 478 +++++++++ arch/powerpc/include/asm/mmu.h | 26 + arch/powerpc/include/asm/mmu_context.h | 280 +++++ arch/powerpc/include/asm/mmzone.h | 47 + arch/powerpc/include/asm/module.h | 77 ++ arch/powerpc/include/asm/mpc512x.h | 22 + arch/powerpc/include/asm/mpc52xx.h | 295 ++++++ arch/powerpc/include/asm/mpc52xx_psc.h | 276 +++++ arch/powerpc/include/asm/mpc6xx.h | 6 + arch/powerpc/include/asm/mpc8260.h | 25 + arch/powerpc/include/asm/mpc86xx.h | 33 + arch/powerpc/include/asm/mpc8xx.h | 12 + arch/powerpc/include/asm/mpic.h | 481 +++++++++ arch/powerpc/include/asm/msgbuf.h | 33 + arch/powerpc/include/asm/mutex.h | 9 + arch/powerpc/include/asm/nvram.h | 139 +++ arch/powerpc/include/asm/of_device.h | 31 + arch/powerpc/include/asm/of_platform.h | 42 + arch/powerpc/include/asm/ohare.h | 54 + arch/powerpc/include/asm/oprofile_impl.h | 134 +++ arch/powerpc/include/asm/pSeries_reconfig.h | 29 + arch/powerpc/include/asm/paca.h | 112 ++ arch/powerpc/include/asm/page.h | 225 ++++ arch/powerpc/include/asm/page_32.h | 38 + arch/powerpc/include/asm/page_64.h | 185 ++++ arch/powerpc/include/asm/param.h | 22 + arch/powerpc/include/asm/parport.h | 39 + arch/powerpc/include/asm/pasemi_dma.h | 538 ++++++++++ arch/powerpc/include/asm/pci-bridge.h | 302 ++++++ arch/powerpc/include/asm/pci.h | 228 +++++ arch/powerpc/include/asm/percpu.h | 24 + arch/powerpc/include/asm/pgalloc-32.h | 43 + arch/powerpc/include/asm/pgalloc-64.h | 166 +++ arch/powerpc/include/asm/pgalloc.h | 12 + arch/powerpc/include/asm/pgtable-4k.h | 117 +++ arch/powerpc/include/asm/pgtable-64k.h | 155 +++ arch/powerpc/include/asm/pgtable-ppc32.h | 802 +++++++++++++++ arch/powerpc/include/asm/pgtable-ppc64.h | 468 +++++++++ arch/powerpc/include/asm/pgtable.h | 57 ++ arch/powerpc/include/asm/phyp_dump.h | 47 + arch/powerpc/include/asm/pmac_feature.h | 405 ++++++++ arch/powerpc/include/asm/pmac_low_i2c.h | 107 ++ arch/powerpc/include/asm/pmac_pfunc.h | 252 +++++ arch/powerpc/include/asm/pmc.h | 37 + arch/powerpc/include/asm/pmi.h | 66 ++ arch/powerpc/include/asm/poll.h | 1 + arch/powerpc/include/asm/posix_types.h | 128 +++ arch/powerpc/include/asm/ppc-pci.h | 149 +++ arch/powerpc/include/asm/ppc4xx.h | 18 + arch/powerpc/include/asm/ppc_asm.h | 689 +++++++++++++ arch/powerpc/include/asm/processor.h | 314 ++++++ arch/powerpc/include/asm/prom.h | 356 +++++++ arch/powerpc/include/asm/ps3.h | 519 ++++++++++ arch/powerpc/include/asm/ps3av.h | 744 ++++++++++++++ arch/powerpc/include/asm/ps3fb.h | 44 + arch/powerpc/include/asm/ps3stor.h | 71 ++ arch/powerpc/include/asm/ptrace.h | 293 ++++++ arch/powerpc/include/asm/qe.h | 642 ++++++++++++ arch/powerpc/include/asm/qe_ic.h | 128 +++ arch/powerpc/include/asm/reg.h | 788 ++++++++++++++ arch/powerpc/include/asm/reg_8xx.h | 42 + arch/powerpc/include/asm/reg_booke.h | 501 +++++++++ arch/powerpc/include/asm/reg_fsl_emb.h | 72 ++ arch/powerpc/include/asm/resource.h | 1 + arch/powerpc/include/asm/rheap.h | 89 ++ arch/powerpc/include/asm/rio.h | 18 + arch/powerpc/include/asm/rtas.h | 247 +++++ arch/powerpc/include/asm/rtc.h | 78 ++ arch/powerpc/include/asm/rwsem.h | 173 ++++ arch/powerpc/include/asm/scatterlist.h | 50 + arch/powerpc/include/asm/seccomp.h | 20 + arch/powerpc/include/asm/sections.h | 22 + arch/powerpc/include/asm/sembuf.h | 36 + arch/powerpc/include/asm/serial.h | 24 + arch/powerpc/include/asm/setjmp.h | 18 + arch/powerpc/include/asm/setup.h | 6 + arch/powerpc/include/asm/shmbuf.h | 59 ++ arch/powerpc/include/asm/shmparam.h | 6 + arch/powerpc/include/asm/sigcontext.h | 87 ++ arch/powerpc/include/asm/siginfo.h | 26 + arch/powerpc/include/asm/signal.h | 150 +++ arch/powerpc/include/asm/smp.h | 127 +++ arch/powerpc/include/asm/smu.h | 700 +++++++++++++ arch/powerpc/include/asm/socket.h | 64 ++ arch/powerpc/include/asm/sockios.h | 20 + arch/powerpc/include/asm/sparsemem.h | 32 + arch/powerpc/include/asm/spinlock.h | 295 ++++++ arch/powerpc/include/asm/spinlock_types.h | 20 + arch/powerpc/include/asm/spu.h | 732 +++++++++++++ arch/powerpc/include/asm/spu_csa.h | 266 +++++ arch/powerpc/include/asm/spu_info.h | 54 + arch/powerpc/include/asm/spu_priv1.h | 236 +++++ arch/powerpc/include/asm/sstep.h | 27 + arch/powerpc/include/asm/stat.h | 81 ++ arch/powerpc/include/asm/statfs.h | 60 ++ arch/powerpc/include/asm/string.h | 32 + arch/powerpc/include/asm/suspend.h | 9 + arch/powerpc/include/asm/synch.h | 44 + arch/powerpc/include/asm/syscall.h | 84 ++ arch/powerpc/include/asm/syscalls.h | 52 + arch/powerpc/include/asm/systbl.h | 324 ++++++ arch/powerpc/include/asm/system.h | 548 ++++++++++ arch/powerpc/include/asm/tce.h | 50 + arch/powerpc/include/asm/termbits.h | 209 ++++ arch/powerpc/include/asm/termios.h | 85 ++ arch/powerpc/include/asm/thread_info.h | 161 +++ arch/powerpc/include/asm/time.h | 255 +++++ arch/powerpc/include/asm/timex.h | 50 + arch/powerpc/include/asm/tlb.h | 81 ++ arch/powerpc/include/asm/tlbflush.h | 166 +++ arch/powerpc/include/asm/topology.h | 117 +++ arch/powerpc/include/asm/tsi108.h | 121 +++ arch/powerpc/include/asm/tsi108_irq.h | 124 +++ arch/powerpc/include/asm/tsi108_pci.h | 45 + arch/powerpc/include/asm/types.h | 75 ++ arch/powerpc/include/asm/uaccess.h | 496 +++++++++ arch/powerpc/include/asm/ucc.h | 64 ++ arch/powerpc/include/asm/ucc_fast.h | 244 +++++ arch/powerpc/include/asm/ucc_slow.h | 290 ++++++ arch/powerpc/include/asm/ucontext.h | 40 + arch/powerpc/include/asm/udbg.h | 55 + arch/powerpc/include/asm/uic.h | 21 + arch/powerpc/include/asm/unaligned.h | 16 + arch/powerpc/include/asm/uninorth.h | 229 +++++ arch/powerpc/include/asm/unistd.h | 398 +++++++ arch/powerpc/include/asm/user.h | 51 + arch/powerpc/include/asm/vdso.h | 78 ++ arch/powerpc/include/asm/vdso_datapage.h | 121 +++ arch/powerpc/include/asm/vga.h | 53 + arch/powerpc/include/asm/vio.h | 118 +++ arch/powerpc/include/asm/xilinx_intc.h | 20 + arch/powerpc/include/asm/xmon.h | 33 + arch/powerpc/include/asm/xor.h | 1 + 261 files changed, 39502 insertions(+) create mode 100644 arch/powerpc/include/asm/8253pit.h create mode 100644 arch/powerpc/include/asm/8xx_immap.h create mode 100644 arch/powerpc/include/asm/Kbuild create mode 100644 arch/powerpc/include/asm/a.out.h create mode 100644 arch/powerpc/include/asm/abs_addr.h create mode 100644 arch/powerpc/include/asm/agp.h create mode 100644 arch/powerpc/include/asm/asm-compat.h create mode 100644 arch/powerpc/include/asm/atomic.h create mode 100644 arch/powerpc/include/asm/auxvec.h create mode 100644 arch/powerpc/include/asm/backlight.h create mode 100644 arch/powerpc/include/asm/bitops.h create mode 100644 arch/powerpc/include/asm/bootx.h create mode 100644 arch/powerpc/include/asm/btext.h create mode 100644 arch/powerpc/include/asm/bug.h create mode 100644 arch/powerpc/include/asm/bugs.h create mode 100644 arch/powerpc/include/asm/byteorder.h create mode 100644 arch/powerpc/include/asm/cache.h create mode 100644 arch/powerpc/include/asm/cacheflush.h create mode 100644 arch/powerpc/include/asm/cell-pmu.h create mode 100644 arch/powerpc/include/asm/cell-regs.h create mode 100644 arch/powerpc/include/asm/checksum.h create mode 100644 arch/powerpc/include/asm/clk_interface.h create mode 100644 arch/powerpc/include/asm/code-patching.h create mode 100644 arch/powerpc/include/asm/compat.h create mode 100644 arch/powerpc/include/asm/cpm.h create mode 100644 arch/powerpc/include/asm/cpm1.h create mode 100644 arch/powerpc/include/asm/cpm2.h create mode 100644 arch/powerpc/include/asm/cputable.h create mode 100644 arch/powerpc/include/asm/cputhreads.h create mode 100644 arch/powerpc/include/asm/cputime.h create mode 100644 arch/powerpc/include/asm/current.h create mode 100644 arch/powerpc/include/asm/dbdma.h create mode 100644 arch/powerpc/include/asm/dcr-generic.h create mode 100644 arch/powerpc/include/asm/dcr-mmio.h create mode 100644 arch/powerpc/include/asm/dcr-native.h create mode 100644 arch/powerpc/include/asm/dcr-regs.h create mode 100644 arch/powerpc/include/asm/dcr.h create mode 100644 arch/powerpc/include/asm/delay.h create mode 100644 arch/powerpc/include/asm/device.h create mode 100644 arch/powerpc/include/asm/div64.h create mode 100644 arch/powerpc/include/asm/dma-mapping.h create mode 100644 arch/powerpc/include/asm/dma.h create mode 100644 arch/powerpc/include/asm/edac.h create mode 100644 arch/powerpc/include/asm/eeh.h create mode 100644 arch/powerpc/include/asm/eeh_event.h create mode 100644 arch/powerpc/include/asm/elf.h create mode 100644 arch/powerpc/include/asm/emergency-restart.h create mode 100644 arch/powerpc/include/asm/errno.h create mode 100644 arch/powerpc/include/asm/exception.h create mode 100644 arch/powerpc/include/asm/fb.h create mode 100644 arch/powerpc/include/asm/fcntl.h create mode 100644 arch/powerpc/include/asm/feature-fixups.h create mode 100644 arch/powerpc/include/asm/firmware.h create mode 100644 arch/powerpc/include/asm/fixmap.h create mode 100644 arch/powerpc/include/asm/floppy.h create mode 100644 arch/powerpc/include/asm/fs_pd.h create mode 100644 arch/powerpc/include/asm/fsl_gtm.h create mode 100644 arch/powerpc/include/asm/fsl_lbc.h create mode 100644 arch/powerpc/include/asm/ftrace.h create mode 100644 arch/powerpc/include/asm/futex.h create mode 100644 arch/powerpc/include/asm/gpio.h create mode 100644 arch/powerpc/include/asm/grackle.h create mode 100644 arch/powerpc/include/asm/hardirq.h create mode 100644 arch/powerpc/include/asm/heathrow.h create mode 100644 arch/powerpc/include/asm/highmem.h create mode 100644 arch/powerpc/include/asm/hugetlb.h create mode 100644 arch/powerpc/include/asm/hvcall.h create mode 100644 arch/powerpc/include/asm/hvconsole.h create mode 100644 arch/powerpc/include/asm/hvcserver.h create mode 100644 arch/powerpc/include/asm/hw_irq.h create mode 100644 arch/powerpc/include/asm/hydra.h create mode 100644 arch/powerpc/include/asm/i8259.h create mode 100644 arch/powerpc/include/asm/ibmebus.h create mode 100644 arch/powerpc/include/asm/ide.h create mode 100644 arch/powerpc/include/asm/immap_86xx.h create mode 100644 arch/powerpc/include/asm/immap_cpm2.h create mode 100644 arch/powerpc/include/asm/immap_qe.h create mode 100644 arch/powerpc/include/asm/io-defs.h create mode 100644 arch/powerpc/include/asm/io.h create mode 100644 arch/powerpc/include/asm/ioctl.h create mode 100644 arch/powerpc/include/asm/ioctls.h create mode 100644 arch/powerpc/include/asm/iommu.h create mode 100644 arch/powerpc/include/asm/ipcbuf.h create mode 100644 arch/powerpc/include/asm/ipic.h create mode 100644 arch/powerpc/include/asm/irq.h create mode 100644 arch/powerpc/include/asm/irq_regs.h create mode 100644 arch/powerpc/include/asm/irqflags.h create mode 100644 arch/powerpc/include/asm/iseries/alpaca.h create mode 100644 arch/powerpc/include/asm/iseries/hv_call.h create mode 100644 arch/powerpc/include/asm/iseries/hv_call_event.h create mode 100644 arch/powerpc/include/asm/iseries/hv_call_sc.h create mode 100644 arch/powerpc/include/asm/iseries/hv_call_xm.h create mode 100644 arch/powerpc/include/asm/iseries/hv_lp_config.h create mode 100644 arch/powerpc/include/asm/iseries/hv_lp_event.h create mode 100644 arch/powerpc/include/asm/iseries/hv_types.h create mode 100644 arch/powerpc/include/asm/iseries/iommu.h create mode 100644 arch/powerpc/include/asm/iseries/it_lp_queue.h create mode 100644 arch/powerpc/include/asm/iseries/lpar_map.h create mode 100644 arch/powerpc/include/asm/iseries/mf.h create mode 100644 arch/powerpc/include/asm/iseries/vio.h create mode 100644 arch/powerpc/include/asm/kdebug.h create mode 100644 arch/powerpc/include/asm/kdump.h create mode 100644 arch/powerpc/include/asm/kexec.h create mode 100644 arch/powerpc/include/asm/keylargo.h create mode 100644 arch/powerpc/include/asm/kgdb.h create mode 100644 arch/powerpc/include/asm/kmap_types.h create mode 100644 arch/powerpc/include/asm/kprobes.h create mode 100644 arch/powerpc/include/asm/kvm.h create mode 100644 arch/powerpc/include/asm/kvm_asm.h create mode 100644 arch/powerpc/include/asm/kvm_host.h create mode 100644 arch/powerpc/include/asm/kvm_para.h create mode 100644 arch/powerpc/include/asm/kvm_ppc.h create mode 100644 arch/powerpc/include/asm/libata-portmap.h create mode 100644 arch/powerpc/include/asm/linkage.h create mode 100644 arch/powerpc/include/asm/lmb.h create mode 100644 arch/powerpc/include/asm/local.h create mode 100644 arch/powerpc/include/asm/lppaca.h create mode 100644 arch/powerpc/include/asm/lv1call.h create mode 100644 arch/powerpc/include/asm/machdep.h create mode 100644 arch/powerpc/include/asm/macio.h create mode 100644 arch/powerpc/include/asm/mc146818rtc.h create mode 100644 arch/powerpc/include/asm/mediabay.h create mode 100644 arch/powerpc/include/asm/mman.h create mode 100644 arch/powerpc/include/asm/mmu-40x.h create mode 100644 arch/powerpc/include/asm/mmu-44x.h create mode 100644 arch/powerpc/include/asm/mmu-8xx.h create mode 100644 arch/powerpc/include/asm/mmu-fsl-booke.h create mode 100644 arch/powerpc/include/asm/mmu-hash32.h create mode 100644 arch/powerpc/include/asm/mmu-hash64.h create mode 100644 arch/powerpc/include/asm/mmu.h create mode 100644 arch/powerpc/include/asm/mmu_context.h create mode 100644 arch/powerpc/include/asm/mmzone.h create mode 100644 arch/powerpc/include/asm/module.h create mode 100644 arch/powerpc/include/asm/mpc512x.h create mode 100644 arch/powerpc/include/asm/mpc52xx.h create mode 100644 arch/powerpc/include/asm/mpc52xx_psc.h create mode 100644 arch/powerpc/include/asm/mpc6xx.h create mode 100644 arch/powerpc/include/asm/mpc8260.h create mode 100644 arch/powerpc/include/asm/mpc86xx.h create mode 100644 arch/powerpc/include/asm/mpc8xx.h create mode 100644 arch/powerpc/include/asm/mpic.h create mode 100644 arch/powerpc/include/asm/msgbuf.h create mode 100644 arch/powerpc/include/asm/mutex.h create mode 100644 arch/powerpc/include/asm/nvram.h create mode 100644 arch/powerpc/include/asm/of_device.h create mode 100644 arch/powerpc/include/asm/of_platform.h create mode 100644 arch/powerpc/include/asm/ohare.h create mode 100644 arch/powerpc/include/asm/oprofile_impl.h create mode 100644 arch/powerpc/include/asm/pSeries_reconfig.h create mode 100644 arch/powerpc/include/asm/paca.h create mode 100644 arch/powerpc/include/asm/page.h create mode 100644 arch/powerpc/include/asm/page_32.h create mode 100644 arch/powerpc/include/asm/page_64.h create mode 100644 arch/powerpc/include/asm/param.h create mode 100644 arch/powerpc/include/asm/parport.h create mode 100644 arch/powerpc/include/asm/pasemi_dma.h create mode 100644 arch/powerpc/include/asm/pci-bridge.h create mode 100644 arch/powerpc/include/asm/pci.h create mode 100644 arch/powerpc/include/asm/percpu.h create mode 100644 arch/powerpc/include/asm/pgalloc-32.h create mode 100644 arch/powerpc/include/asm/pgalloc-64.h create mode 100644 arch/powerpc/include/asm/pgalloc.h create mode 100644 arch/powerpc/include/asm/pgtable-4k.h create mode 100644 arch/powerpc/include/asm/pgtable-64k.h create mode 100644 arch/powerpc/include/asm/pgtable-ppc32.h create mode 100644 arch/powerpc/include/asm/pgtable-ppc64.h create mode 100644 arch/powerpc/include/asm/pgtable.h create mode 100644 arch/powerpc/include/asm/phyp_dump.h create mode 100644 arch/powerpc/include/asm/pmac_feature.h create mode 100644 arch/powerpc/include/asm/pmac_low_i2c.h create mode 100644 arch/powerpc/include/asm/pmac_pfunc.h create mode 100644 arch/powerpc/include/asm/pmc.h create mode 100644 arch/powerpc/include/asm/pmi.h create mode 100644 arch/powerpc/include/asm/poll.h create mode 100644 arch/powerpc/include/asm/posix_types.h create mode 100644 arch/powerpc/include/asm/ppc-pci.h create mode 100644 arch/powerpc/include/asm/ppc4xx.h create mode 100644 arch/powerpc/include/asm/ppc_asm.h create mode 100644 arch/powerpc/include/asm/processor.h create mode 100644 arch/powerpc/include/asm/prom.h create mode 100644 arch/powerpc/include/asm/ps3.h create mode 100644 arch/powerpc/include/asm/ps3av.h create mode 100644 arch/powerpc/include/asm/ps3fb.h create mode 100644 arch/powerpc/include/asm/ps3stor.h create mode 100644 arch/powerpc/include/asm/ptrace.h create mode 100644 arch/powerpc/include/asm/qe.h create mode 100644 arch/powerpc/include/asm/qe_ic.h create mode 100644 arch/powerpc/include/asm/reg.h create mode 100644 arch/powerpc/include/asm/reg_8xx.h create mode 100644 arch/powerpc/include/asm/reg_booke.h create mode 100644 arch/powerpc/include/asm/reg_fsl_emb.h create mode 100644 arch/powerpc/include/asm/resource.h create mode 100644 arch/powerpc/include/asm/rheap.h create mode 100644 arch/powerpc/include/asm/rio.h create mode 100644 arch/powerpc/include/asm/rtas.h create mode 100644 arch/powerpc/include/asm/rtc.h create mode 100644 arch/powerpc/include/asm/rwsem.h create mode 100644 arch/powerpc/include/asm/scatterlist.h create mode 100644 arch/powerpc/include/asm/seccomp.h create mode 100644 arch/powerpc/include/asm/sections.h create mode 100644 arch/powerpc/include/asm/sembuf.h create mode 100644 arch/powerpc/include/asm/serial.h create mode 100644 arch/powerpc/include/asm/setjmp.h create mode 100644 arch/powerpc/include/asm/setup.h create mode 100644 arch/powerpc/include/asm/shmbuf.h create mode 100644 arch/powerpc/include/asm/shmparam.h create mode 100644 arch/powerpc/include/asm/sigcontext.h create mode 100644 arch/powerpc/include/asm/siginfo.h create mode 100644 arch/powerpc/include/asm/signal.h create mode 100644 arch/powerpc/include/asm/smp.h create mode 100644 arch/powerpc/include/asm/smu.h create mode 100644 arch/powerpc/include/asm/socket.h create mode 100644 arch/powerpc/include/asm/sockios.h create mode 100644 arch/powerpc/include/asm/sparsemem.h create mode 100644 arch/powerpc/include/asm/spinlock.h create mode 100644 arch/powerpc/include/asm/spinlock_types.h create mode 100644 arch/powerpc/include/asm/spu.h create mode 100644 arch/powerpc/include/asm/spu_csa.h create mode 100644 arch/powerpc/include/asm/spu_info.h create mode 100644 arch/powerpc/include/asm/spu_priv1.h create mode 100644 arch/powerpc/include/asm/sstep.h create mode 100644 arch/powerpc/include/asm/stat.h create mode 100644 arch/powerpc/include/asm/statfs.h create mode 100644 arch/powerpc/include/asm/string.h create mode 100644 arch/powerpc/include/asm/suspend.h create mode 100644 arch/powerpc/include/asm/synch.h create mode 100644 arch/powerpc/include/asm/syscall.h create mode 100644 arch/powerpc/include/asm/syscalls.h create mode 100644 arch/powerpc/include/asm/systbl.h create mode 100644 arch/powerpc/include/asm/system.h create mode 100644 arch/powerpc/include/asm/tce.h create mode 100644 arch/powerpc/include/asm/termbits.h create mode 100644 arch/powerpc/include/asm/termios.h create mode 100644 arch/powerpc/include/asm/thread_info.h create mode 100644 arch/powerpc/include/asm/time.h create mode 100644 arch/powerpc/include/asm/timex.h create mode 100644 arch/powerpc/include/asm/tlb.h create mode 100644 arch/powerpc/include/asm/tlbflush.h create mode 100644 arch/powerpc/include/asm/topology.h create mode 100644 arch/powerpc/include/asm/tsi108.h create mode 100644 arch/powerpc/include/asm/tsi108_irq.h create mode 100644 arch/powerpc/include/asm/tsi108_pci.h create mode 100644 arch/powerpc/include/asm/types.h create mode 100644 arch/powerpc/include/asm/uaccess.h create mode 100644 arch/powerpc/include/asm/ucc.h create mode 100644 arch/powerpc/include/asm/ucc_fast.h create mode 100644 arch/powerpc/include/asm/ucc_slow.h create mode 100644 arch/powerpc/include/asm/ucontext.h create mode 100644 arch/powerpc/include/asm/udbg.h create mode 100644 arch/powerpc/include/asm/uic.h create mode 100644 arch/powerpc/include/asm/unaligned.h create mode 100644 arch/powerpc/include/asm/uninorth.h create mode 100644 arch/powerpc/include/asm/unistd.h create mode 100644 arch/powerpc/include/asm/user.h create mode 100644 arch/powerpc/include/asm/vdso.h create mode 100644 arch/powerpc/include/asm/vdso_datapage.h create mode 100644 arch/powerpc/include/asm/vga.h create mode 100644 arch/powerpc/include/asm/vio.h create mode 100644 arch/powerpc/include/asm/xilinx_intc.h create mode 100644 arch/powerpc/include/asm/xmon.h create mode 100644 arch/powerpc/include/asm/xor.h (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/8253pit.h b/arch/powerpc/include/asm/8253pit.h new file mode 100644 index 000000000000..b70d6e53b303 --- /dev/null +++ b/arch/powerpc/include/asm/8253pit.h @@ -0,0 +1,10 @@ +#ifndef _ASM_POWERPC_8253PIT_H +#define _ASM_POWERPC_8253PIT_H + +/* + * 8253/8254 Programmable Interval Timer + */ + +#define PIT_TICK_RATE 1193182UL + +#endif /* _ASM_POWERPC_8253PIT_H */ diff --git a/arch/powerpc/include/asm/8xx_immap.h b/arch/powerpc/include/asm/8xx_immap.h new file mode 100644 index 000000000000..4b0e15206006 --- /dev/null +++ b/arch/powerpc/include/asm/8xx_immap.h @@ -0,0 +1,564 @@ +/* + * MPC8xx Internal Memory Map + * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) + * + * The I/O on the MPC860 is comprised of blocks of special registers + * and the dual port ram for the Communication Processor Module. + * Within this space are functional units such as the SIU, memory + * controller, system timers, and other control functions. It is + * a combination that I found difficult to separate into logical + * functional files.....but anyone else is welcome to try. -- Dan + */ +#ifdef __KERNEL__ +#ifndef __IMMAP_8XX__ +#define __IMMAP_8XX__ + +/* System configuration registers. +*/ +typedef struct sys_conf { + uint sc_siumcr; + uint sc_sypcr; + uint sc_swt; + char res1[2]; + ushort sc_swsr; + uint sc_sipend; + uint sc_simask; + uint sc_siel; + uint sc_sivec; + uint sc_tesr; + char res2[0xc]; + uint sc_sdcr; + char res3[0x4c]; +} sysconf8xx_t; + +/* PCMCIA configuration registers. +*/ +typedef struct pcmcia_conf { + uint pcmc_pbr0; + uint pcmc_por0; + uint pcmc_pbr1; + uint pcmc_por1; + uint pcmc_pbr2; + uint pcmc_por2; + uint pcmc_pbr3; + uint pcmc_por3; + uint pcmc_pbr4; + uint pcmc_por4; + uint pcmc_pbr5; + uint pcmc_por5; + uint pcmc_pbr6; + uint pcmc_por6; + uint pcmc_pbr7; + uint pcmc_por7; + char res1[0x20]; + uint pcmc_pgcra; + uint pcmc_pgcrb; + uint pcmc_pscr; + char res2[4]; + uint pcmc_pipr; + char res3[4]; + uint pcmc_per; + char res4[4]; +} pcmconf8xx_t; + +/* Memory controller registers. +*/ +typedef struct mem_ctlr { + uint memc_br0; + uint memc_or0; + uint memc_br1; + uint memc_or1; + uint memc_br2; + uint memc_or2; + uint memc_br3; + uint memc_or3; + uint memc_br4; + uint memc_or4; + uint memc_br5; + uint memc_or5; + uint memc_br6; + uint memc_or6; + uint memc_br7; + uint memc_or7; + char res1[0x24]; + uint memc_mar; + uint memc_mcr; + char res2[4]; + uint memc_mamr; + uint memc_mbmr; + ushort memc_mstat; + ushort memc_mptpr; + uint memc_mdr; + char res3[0x80]; +} memctl8xx_t; + +/*----------------------------------------------------------------------- + * BR - Memory Controler: Base Register 16-9 + */ +#define BR_BA_MSK 0xffff8000 /* Base Address Mask */ +#define BR_AT_MSK 0x00007000 /* Address Type Mask */ +#define BR_PS_MSK 0x00000c00 /* Port Size Mask */ +#define BR_PS_32 0x00000000 /* 32 bit port size */ +#define BR_PS_16 0x00000800 /* 16 bit port size */ +#define BR_PS_8 0x00000400 /* 8 bit port size */ +#define BR_PARE 0x00000200 /* Parity Enable */ +#define BR_WP 0x00000100 /* Write Protect */ +#define BR_MS_MSK 0x000000c0 /* Machine Select Mask */ +#define BR_MS_GPCM 0x00000000 /* G.P.C.M. Machine Select */ +#define BR_MS_UPMA 0x00000080 /* U.P.M.A Machine Select */ +#define BR_MS_UPMB 0x000000c0 /* U.P.M.B Machine Select */ +#define BR_V 0x00000001 /* Bank Valid */ + +/*----------------------------------------------------------------------- + * OR - Memory Controler: Option Register 16-11 + */ +#define OR_AM_MSK 0xffff8000 /* Address Mask Mask */ +#define OR_ATM_MSK 0x00007000 /* Address Type Mask Mask */ +#define OR_CSNT_SAM 0x00000800 /* Chip Select Negation Time/ Start */ + /* Address Multiplex */ +#define OR_ACS_MSK 0x00000600 /* Address to Chip Select Setup mask */ +#define OR_ACS_DIV1 0x00000000 /* CS is output at the same time */ +#define OR_ACS_DIV4 0x00000400 /* CS is output 1/4 a clock later */ +#define OR_ACS_DIV2 0x00000600 /* CS is output 1/2 a clock later */ +#define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */ +#define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/ +#define OR_BI 0x00000100 /* Burst inhibit */ +#define OR_SCY_MSK 0x000000f0 /* Cycle Length in Clocks */ +#define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */ +#define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */ +#define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */ +#define OR_SCY_3_CLK 0x00000030 /* 3 clock cycles wait states */ +#define OR_SCY_4_CLK 0x00000040 /* 4 clock cycles wait states */ +#define OR_SCY_5_CLK 0x00000050 /* 5 clock cycles wait states */ +#define OR_SCY_6_CLK 0x00000060 /* 6 clock cycles wait states */ +#define OR_SCY_7_CLK 0x00000070 /* 7 clock cycles wait states */ +#define OR_SCY_8_CLK 0x00000080 /* 8 clock cycles wait states */ +#define OR_SCY_9_CLK 0x00000090 /* 9 clock cycles wait states */ +#define OR_SCY_10_CLK 0x000000a0 /* 10 clock cycles wait states */ +#define OR_SCY_11_CLK 0x000000b0 /* 11 clock cycles wait states */ +#define OR_SCY_12_CLK 0x000000c0 /* 12 clock cycles wait states */ +#define OR_SCY_13_CLK 0x000000d0 /* 13 clock cycles wait states */ +#define OR_SCY_14_CLK 0x000000e0 /* 14 clock cycles wait states */ +#define OR_SCY_15_CLK 0x000000f0 /* 15 clock cycles wait states */ +#define OR_SETA 0x00000008 /* External Transfer Acknowledge */ +#define OR_TRLX 0x00000004 /* Timing Relaxed */ +#define OR_EHTR 0x00000002 /* Extended Hold Time on Read */ + +/* System Integration Timers. +*/ +typedef struct sys_int_timers { + ushort sit_tbscr; + char res0[0x02]; + uint sit_tbreff0; + uint sit_tbreff1; + char res1[0x14]; + ushort sit_rtcsc; + char res2[0x02]; + uint sit_rtc; + uint sit_rtsec; + uint sit_rtcal; + char res3[0x10]; + ushort sit_piscr; + char res4[2]; + uint sit_pitc; + uint sit_pitr; + char res5[0x34]; +} sit8xx_t; + +#define TBSCR_TBIRQ_MASK ((ushort)0xff00) +#define TBSCR_REFA ((ushort)0x0080) +#define TBSCR_REFB ((ushort)0x0040) +#define TBSCR_REFAE ((ushort)0x0008) +#define TBSCR_REFBE ((ushort)0x0004) +#define TBSCR_TBF ((ushort)0x0002) +#define TBSCR_TBE ((ushort)0x0001) + +#define RTCSC_RTCIRQ_MASK ((ushort)0xff00) +#define RTCSC_SEC ((ushort)0x0080) +#define RTCSC_ALR ((ushort)0x0040) +#define RTCSC_38K ((ushort)0x0010) +#define RTCSC_SIE ((ushort)0x0008) +#define RTCSC_ALE ((ushort)0x0004) +#define RTCSC_RTF ((ushort)0x0002) +#define RTCSC_RTE ((ushort)0x0001) + +#define PISCR_PIRQ_MASK ((ushort)0xff00) +#define PISCR_PS ((ushort)0x0080) +#define PISCR_PIE ((ushort)0x0004) +#define PISCR_PTF ((ushort)0x0002) +#define PISCR_PTE ((ushort)0x0001) + +/* Clocks and Reset. +*/ +typedef struct clk_and_reset { + uint car_sccr; + uint car_plprcr; + uint car_rsr; + char res[0x74]; /* Reserved area */ +} car8xx_t; + +/* System Integration Timers keys. +*/ +typedef struct sitk { + uint sitk_tbscrk; + uint sitk_tbreff0k; + uint sitk_tbreff1k; + uint sitk_tbk; + char res1[0x10]; + uint sitk_rtcsck; + uint sitk_rtck; + uint sitk_rtseck; + uint sitk_rtcalk; + char res2[0x10]; + uint sitk_piscrk; + uint sitk_pitck; + char res3[0x38]; +} sitk8xx_t; + +/* Clocks and reset keys. +*/ +typedef struct cark { + uint cark_sccrk; + uint cark_plprcrk; + uint cark_rsrk; + char res[0x474]; +} cark8xx_t; + +/* The key to unlock registers maintained by keep-alive power. +*/ +#define KAPWR_KEY ((unsigned int)0x55ccaa33) + +/* Video interface. MPC823 Only. +*/ +typedef struct vid823 { + ushort vid_vccr; + ushort res1; + u_char vid_vsr; + u_char res2; + u_char vid_vcmr; + u_char res3; + uint vid_vbcb; + uint res4; + uint vid_vfcr0; + uint vid_vfaa0; + uint vid_vfba0; + uint vid_vfcr1; + uint vid_vfaa1; + uint vid_vfba1; + u_char res5[0x18]; +} vid823_t; + +/* LCD interface. 823 Only. +*/ +typedef struct lcd { + uint lcd_lccr; + uint lcd_lchcr; + uint lcd_lcvcr; + char res1[4]; + uint lcd_lcfaa; + uint lcd_lcfba; + char lcd_lcsr; + char res2[0x7]; +} lcd823_t; + +/* I2C +*/ +typedef struct i2c { + u_char i2c_i2mod; + char res1[3]; + u_char i2c_i2add; + char res2[3]; + u_char i2c_i2brg; + char res3[3]; + u_char i2c_i2com; + char res4[3]; + u_char i2c_i2cer; + char res5[3]; + u_char i2c_i2cmr; + char res6[0x8b]; +} i2c8xx_t; + +/* DMA control/status registers. +*/ +typedef struct sdma_csr { + char res1[4]; + uint sdma_sdar; + u_char sdma_sdsr; + char res3[3]; + u_char sdma_sdmr; + char res4[3]; + u_char sdma_idsr1; + char res5[3]; + u_char sdma_idmr1; + char res6[3]; + u_char sdma_idsr2; + char res7[3]; + u_char sdma_idmr2; + char res8[0x13]; +} sdma8xx_t; + +/* Communication Processor Module Interrupt Controller. +*/ +typedef struct cpm_ic { + ushort cpic_civr; + char res[0xe]; + uint cpic_cicr; + uint cpic_cipr; + uint cpic_cimr; + uint cpic_cisr; +} cpic8xx_t; + +/* Input/Output Port control/status registers. +*/ +typedef struct io_port { + ushort iop_padir; + ushort iop_papar; + ushort iop_paodr; + ushort iop_padat; + char res1[8]; + ushort iop_pcdir; + ushort iop_pcpar; + ushort iop_pcso; + ushort iop_pcdat; + ushort iop_pcint; + char res2[6]; + ushort iop_pddir; + ushort iop_pdpar; + char res3[2]; + ushort iop_pddat; + uint utmode; + char res4[4]; +} iop8xx_t; + +/* Communication Processor Module Timers +*/ +typedef struct cpm_timers { + ushort cpmt_tgcr; + char res1[0xe]; + ushort cpmt_tmr1; + ushort cpmt_tmr2; + ushort cpmt_trr1; + ushort cpmt_trr2; + ushort cpmt_tcr1; + ushort cpmt_tcr2; + ushort cpmt_tcn1; + ushort cpmt_tcn2; + ushort cpmt_tmr3; + ushort cpmt_tmr4; + ushort cpmt_trr3; + ushort cpmt_trr4; + ushort cpmt_tcr3; + ushort cpmt_tcr4; + ushort cpmt_tcn3; + ushort cpmt_tcn4; + ushort cpmt_ter1; + ushort cpmt_ter2; + ushort cpmt_ter3; + ushort cpmt_ter4; + char res2[8]; +} cpmtimer8xx_t; + +/* Finally, the Communication Processor stuff..... +*/ +typedef struct scc { /* Serial communication channels */ + uint scc_gsmrl; + uint scc_gsmrh; + ushort scc_psmr; + char res1[2]; + ushort scc_todr; + ushort scc_dsr; + ushort scc_scce; + char res2[2]; + ushort scc_sccm; + char res3; + u_char scc_sccs; + char res4[8]; +} scc_t; + +typedef struct smc { /* Serial management channels */ + char res1[2]; + ushort smc_smcmr; + char res2[2]; + u_char smc_smce; + char res3[3]; + u_char smc_smcm; + char res4[5]; +} smc_t; + +/* MPC860T Fast Ethernet Controller. It isn't part of the CPM, but + * it fits within the address space. + */ + +typedef struct fec { + uint fec_addr_low; /* lower 32 bits of station address */ + ushort fec_addr_high; /* upper 16 bits of station address */ + ushort res1; /* reserved */ + uint fec_hash_table_high; /* upper 32-bits of hash table */ + uint fec_hash_table_low; /* lower 32-bits of hash table */ + uint fec_r_des_start; /* beginning of Rx descriptor ring */ + uint fec_x_des_start; /* beginning of Tx descriptor ring */ + uint fec_r_buff_size; /* Rx buffer size */ + uint res2[9]; /* reserved */ + uint fec_ecntrl; /* ethernet control register */ + uint fec_ievent; /* interrupt event register */ + uint fec_imask; /* interrupt mask register */ + uint fec_ivec; /* interrupt level and vector status */ + uint fec_r_des_active; /* Rx ring updated flag */ + uint fec_x_des_active; /* Tx ring updated flag */ + uint res3[10]; /* reserved */ + uint fec_mii_data; /* MII data register */ + uint fec_mii_speed; /* MII speed control register */ + uint res4[17]; /* reserved */ + uint fec_r_bound; /* end of RAM (read-only) */ + uint fec_r_fstart; /* Rx FIFO start address */ + uint res5[6]; /* reserved */ + uint fec_x_fstart; /* Tx FIFO start address */ + uint res6[17]; /* reserved */ + uint fec_fun_code; /* fec SDMA function code */ + uint res7[3]; /* reserved */ + uint fec_r_cntrl; /* Rx control register */ + uint fec_r_hash; /* Rx hash register */ + uint res8[14]; /* reserved */ + uint fec_x_cntrl; /* Tx control register */ + uint res9[0x1e]; /* reserved */ +} fec_t; + +/* The FEC and LCD color map share the same address space.... + * I guess we will never see an 823T :-). + */ +union fec_lcd { + fec_t fl_un_fec; + u_char fl_un_cmap[0x200]; +}; + +typedef struct comm_proc { + /* General control and status registers. + */ + ushort cp_cpcr; + u_char res1[2]; + ushort cp_rccr; + u_char res2; + u_char cp_rmds; + u_char res3[4]; + ushort cp_cpmcr1; + ushort cp_cpmcr2; + ushort cp_cpmcr3; + ushort cp_cpmcr4; + u_char res4[2]; + ushort cp_rter; + u_char res5[2]; + ushort cp_rtmr; + u_char res6[0x14]; + + /* Baud rate generators. + */ + uint cp_brgc1; + uint cp_brgc2; + uint cp_brgc3; + uint cp_brgc4; + + /* Serial Communication Channels. + */ + scc_t cp_scc[4]; + + /* Serial Management Channels. + */ + smc_t cp_smc[2]; + + /* Serial Peripheral Interface. + */ + ushort cp_spmode; + u_char res7[4]; + u_char cp_spie; + u_char res8[3]; + u_char cp_spim; + u_char res9[2]; + u_char cp_spcom; + u_char res10[2]; + + /* Parallel Interface Port. + */ + u_char res11[2]; + ushort cp_pipc; + u_char res12[2]; + ushort cp_ptpr; + uint cp_pbdir; + uint cp_pbpar; + u_char res13[2]; + ushort cp_pbodr; + uint cp_pbdat; + + /* Port E - MPC87x/88x only. + */ + uint cp_pedir; + uint cp_pepar; + uint cp_peso; + uint cp_peodr; + uint cp_pedat; + + /* Communications Processor Timing Register - + Contains RMII Timing for the FECs on MPC87x/88x only. + */ + uint cp_cptr; + + /* Serial Interface and Time Slot Assignment. + */ + uint cp_simode; + u_char cp_sigmr; + u_char res15; + u_char cp_sistr; + u_char cp_sicmr; + u_char res16[4]; + uint cp_sicr; + uint cp_sirp; + u_char res17[0xc]; + + /* 256 bytes of MPC823 video controller RAM array. + */ + u_char cp_vcram[0x100]; + u_char cp_siram[0x200]; + + /* The fast ethernet controller is not really part of the CPM, + * but it resides in the address space. + * The LCD color map is also here. + */ + union fec_lcd fl_un; +#define cp_fec fl_un.fl_un_fec +#define lcd_cmap fl_un.fl_un_cmap + char res18[0xE00]; + + /* The DUET family has a second FEC here */ + fec_t cp_fec2; +#define cp_fec1 cp_fec /* consistency macro */ + + /* Dual Ported RAM follows. + * There are many different formats for this memory area + * depending upon the devices used and options chosen. + * Some processors don't have all of it populated. + */ + u_char cp_dpmem[0x1C00]; /* BD / Data / ucode */ + u_char cp_dparam[0x400]; /* Parameter RAM */ +} cpm8xx_t; + +/* Internal memory map. +*/ +typedef struct immap { + sysconf8xx_t im_siu_conf; /* SIU Configuration */ + pcmconf8xx_t im_pcmcia; /* PCMCIA Configuration */ + memctl8xx_t im_memctl; /* Memory Controller */ + sit8xx_t im_sit; /* System integration timers */ + car8xx_t im_clkrst; /* Clocks and reset */ + sitk8xx_t im_sitk; /* Sys int timer keys */ + cark8xx_t im_clkrstk; /* Clocks and reset keys */ + vid823_t im_vid; /* Video (823 only) */ + lcd823_t im_lcd; /* LCD (823 only) */ + i2c8xx_t im_i2c; /* I2C control/status */ + sdma8xx_t im_sdma; /* SDMA control/status */ + cpic8xx_t im_cpic; /* CPM Interrupt Controller */ + iop8xx_t im_ioport; /* IO Port control/status */ + cpmtimer8xx_t im_cpmtimer; /* CPM timers */ + cpm8xx_t im_cpm; /* Communication processor */ +} immap_t; + +#endif /* __IMMAP_8XX__ */ +#endif /* __KERNEL__ */ diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild new file mode 100644 index 000000000000..5ab7d7fe198c --- /dev/null +++ b/arch/powerpc/include/asm/Kbuild @@ -0,0 +1,37 @@ +include include/asm-generic/Kbuild.asm + +header-y += auxvec.h +header-y += ioctls.h +header-y += sembuf.h +header-y += siginfo.h +header-y += stat.h +header-y += errno.h +header-y += ipcbuf.h +header-y += msgbuf.h +header-y += shmbuf.h +header-y += socket.h +header-y += termbits.h +header-y += fcntl.h +header-y += poll.h +header-y += sockios.h +header-y += ucontext.h +header-y += ioctl.h +header-y += linkage.h +header-y += resource.h +header-y += sigcontext.h +header-y += statfs.h +header-y += ps3fb.h + +unifdef-y += bootx.h +unifdef-y += byteorder.h +unifdef-y += cputable.h +unifdef-y += elf.h +unifdef-y += nvram.h +unifdef-y += param.h +unifdef-y += posix_types.h +unifdef-y += seccomp.h +unifdef-y += signal.h +unifdef-y += spu_info.h +unifdef-y += termios.h +unifdef-y += types.h +unifdef-y += unistd.h diff --git a/arch/powerpc/include/asm/a.out.h b/arch/powerpc/include/asm/a.out.h new file mode 100644 index 000000000000..89cead6b176e --- /dev/null +++ b/arch/powerpc/include/asm/a.out.h @@ -0,0 +1,20 @@ +#ifndef _ASM_POWERPC_A_OUT_H +#define _ASM_POWERPC_A_OUT_H + +struct exec +{ + unsigned long a_info; /* Use macros N_MAGIC, etc for access */ + unsigned a_text; /* length of text, in bytes */ + unsigned a_data; /* length of data, in bytes */ + unsigned a_bss; /* length of uninitialized data area for file, in bytes */ + unsigned a_syms; /* length of symbol table data in file, in bytes */ + unsigned a_entry; /* start address */ + unsigned a_trsize; /* length of relocation info for text, in bytes */ + unsigned a_drsize; /* length of relocation info for data, in bytes */ +}; + +#define N_TRSIZE(a) ((a).a_trsize) +#define N_DRSIZE(a) ((a).a_drsize) +#define N_SYMSIZE(a) ((a).a_syms) + +#endif /* _ASM_POWERPC_A_OUT_H */ diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h new file mode 100644 index 000000000000..98324c5a8286 --- /dev/null +++ b/arch/powerpc/include/asm/abs_addr.h @@ -0,0 +1,75 @@ +#ifndef _ASM_POWERPC_ABS_ADDR_H +#define _ASM_POWERPC_ABS_ADDR_H +#ifdef __KERNEL__ + + +/* + * c 2001 PPC 64 Team, IBM Corp + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include + +#include +#include +#include +#include + +struct mschunks_map { + unsigned long num_chunks; + unsigned long chunk_size; + unsigned long chunk_shift; + unsigned long chunk_mask; + u32 *mapping; +}; + +extern struct mschunks_map mschunks_map; + +/* Chunks are 256 KB */ +#define MSCHUNKS_CHUNK_SHIFT (18) +#define MSCHUNKS_CHUNK_SIZE (1UL << MSCHUNKS_CHUNK_SHIFT) +#define MSCHUNKS_OFFSET_MASK (MSCHUNKS_CHUNK_SIZE - 1) + +static inline unsigned long chunk_to_addr(unsigned long chunk) +{ + return chunk << MSCHUNKS_CHUNK_SHIFT; +} + +static inline unsigned long addr_to_chunk(unsigned long addr) +{ + return addr >> MSCHUNKS_CHUNK_SHIFT; +} + +static inline unsigned long phys_to_abs(unsigned long pa) +{ + unsigned long chunk; + + /* This is a no-op on non-iSeries */ + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return pa; + + chunk = addr_to_chunk(pa); + + if (chunk < mschunks_map.num_chunks) + chunk = mschunks_map.mapping[chunk]; + + return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); +} + +/* Convenience macros */ +#define virt_to_abs(va) phys_to_abs(__pa(va)) +#define abs_to_virt(aa) __va(aa) + +/* + * Converts Virtual Address to Real Address for + * Legacy iSeries Hypervisor calls + */ +#define iseries_hv_addr(virtaddr) \ + (0x8000000000000000 | virt_to_abs(virtaddr)) + +#endif /* __KERNEL__ */ +#endif /* _ASM_POWERPC_ABS_ADDR_H */ diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h new file mode 100644 index 000000000000..86455c4c31ee --- /dev/null +++ b/arch/powerpc/include/asm/agp.h @@ -0,0 +1,22 @@ +#ifndef _ASM_POWERPC_AGP_H +#define _ASM_POWERPC_AGP_H +#ifdef __KERNEL__ + +#include + +#define map_page_into_agp(page) +#define unmap_page_from_agp(page) +#define flush_agp_cache() mb() + +/* Convert a physical address to an address suitable for the GART. */ +#define phys_to_gart(x) (x) +#define gart_to_phys(x) (x) + +/* GATT allocation. Returns/accepts GATT kernel virtual address. */ +#define alloc_gatt_pages(order) \ + ((char *)__get_free_pages(GFP_KERNEL, (order))) +#define free_gatt_pages(table, order) \ + free_pages((unsigned long)(table), (order)) + +#endif /* __KERNEL__ */ +#endif /* _ASM_POWERPC_AGP_H */ diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h new file mode 100644 index 000000000000..8f0fe7971949 --- /dev/null +++ b/arch/powerpc/include/asm/asm-compat.h @@ -0,0 +1,69 @@ +#ifndef _ASM_POWERPC_ASM_COMPAT_H +#define _ASM_POWERPC_ASM_COMPAT_H + +#include + +#ifdef __ASSEMBLY__ +# define stringify_in_c(...) __VA_ARGS__ +# define ASM_CONST(x) x +#else +/* This version of stringify will deal with commas... */ +# define __stringify_in_c(...) #__VA_ARGS__ +# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " " +# define __ASM_CONST(x) x##UL +# define ASM_CONST(x) __ASM_CONST(x) +#endif + + +#ifdef __powerpc64__ + +/* operations for longs and pointers */ +#define PPC_LL stringify_in_c(ld) +#define PPC_STL stringify_in_c(std) +#define PPC_LCMPI stringify_in_c(cmpdi) +#define PPC_LONG stringify_in_c(.llong) +#define PPC_LONG_ALIGN stringify_in_c(.balign 8) +#define PPC_TLNEI stringify_in_c(tdnei) +#define PPC_LLARX stringify_in_c(ldarx) +#define PPC_STLCX stringify_in_c(stdcx.) +#define PPC_CNTLZL stringify_in_c(cntlzd) + +/* Move to CR, single-entry optimized version. Only available + * on POWER4 and later. + */ +#ifdef CONFIG_POWER4_ONLY +#define PPC_MTOCRF stringify_in_c(mtocrf) +#else +#define PPC_MTOCRF stringify_in_c(mtcrf) +#endif + +#else /* 32-bit */ + +/* operations for longs and pointers */ +#define PPC_LL stringify_in_c(lwz) +#define PPC_STL stringify_in_c(stw) +#define PPC_LCMPI stringify_in_c(cmpwi) +#define PPC_LONG stringify_in_c(.long) +#define PPC_LONG_ALIGN stringify_in_c(.balign 4) +#define PPC_TLNEI stringify_in_c(twnei) +#define PPC_LLARX stringify_in_c(lwarx) +#define PPC_STLCX stringify_in_c(stwcx.) +#define PPC_CNTLZL stringify_in_c(cntlzw) +#define PPC_MTOCRF stringify_in_c(mtcrf) + +#endif + +#ifdef __KERNEL__ +#ifdef CONFIG_IBM405_ERR77 +/* Erratum #77 on the 405 means we need a sync or dcbt before every + * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this. + */ +#define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;) +#define PPC405_ERR77_SYNC stringify_in_c(sync;) +#else +#define PPC405_ERR77(ra,rb) +#define PPC405_ERR77_SYNC +#endif +#endif + +#endif /* _ASM_POWERPC_ASM_COMPAT_H */ diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h new file mode 100644 index 000000000000..f3fc733758f5 --- /dev/null +++ b/arch/powerpc/include/asm/atomic.h @@ -0,0 +1,479 @@ +#ifndef _ASM_POWERPC_ATOMIC_H_ +#define _ASM_POWERPC_ATOMIC_H_ + +/* + * PowerPC atomic operations + */ + +typedef struct { int counter; } atomic_t; + +#ifdef __KERNEL__ +#include +#include +#include +#include + +#define ATOMIC_INIT(i) { (i) } + +static __inline__ int atomic_read(const atomic_t *v) +{ + int t; + + __asm__ __volatile__("lwz%U1%X1 %0,%1" : "=r"(t) : "m"(v->counter)); + + return t; +} + +static __inline__ void atomic_set(atomic_t *v, int i) +{ + __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i)); +} + +static __inline__ void atomic_add(int a, atomic_t *v) +{ + int t; + + __asm__ __volatile__( +"1: lwarx %0,0,%3 # atomic_add\n\ + add %0,%2,%0\n" + PPC405_ERR77(0,%3) +" stwcx. %0,0,%3 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (a), "r" (&v->counter) + : "cc"); +} + +static __inline__ int atomic_add_return(int a, atomic_t *v) +{ + int t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: lwarx %0,0,%2 # atomic_add_return\n\ + add %0,%1,%0\n" + PPC405_ERR77(0,%2) +" stwcx. %0,0,%2 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (a), "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) + +static __inline__ void atomic_sub(int a, atomic_t *v) +{ + int t; + + __asm__ __volatile__( +"1: lwarx %0,0,%3 # atomic_sub\n\ + subf %0,%2,%0\n" + PPC405_ERR77(0,%3) +" stwcx. %0,0,%3 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (a), "r" (&v->counter) + : "cc"); +} + +static __inline__ int atomic_sub_return(int a, atomic_t *v) +{ + int t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: lwarx %0,0,%2 # atomic_sub_return\n\ + subf %0,%1,%0\n" + PPC405_ERR77(0,%2) +" stwcx. %0,0,%2 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (a), "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +static __inline__ void atomic_inc(atomic_t *v) +{ + int t; + + __asm__ __volatile__( +"1: lwarx %0,0,%2 # atomic_inc\n\ + addic %0,%0,1\n" + PPC405_ERR77(0,%2) +" stwcx. %0,0,%2 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (&v->counter) + : "cc"); +} + +static __inline__ int atomic_inc_return(atomic_t *v) +{ + int t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: lwarx %0,0,%1 # atomic_inc_return\n\ + addic %0,%0,1\n" + PPC405_ERR77(0,%1) +" stwcx. %0,0,%1 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +/* + * atomic_inc_and_test - increment and test + * @v: pointer of type atomic_t + * + * Atomically increments @v by 1 + * and returns true if the result is zero, or false for all + * other cases. + */ +#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) + +static __inline__ void atomic_dec(atomic_t *v) +{ + int t; + + __asm__ __volatile__( +"1: lwarx %0,0,%2 # atomic_dec\n\ + addic %0,%0,-1\n" + PPC405_ERR77(0,%2)\ +" stwcx. %0,0,%2\n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (&v->counter) + : "cc"); +} + +static __inline__ int atomic_dec_return(atomic_t *v) +{ + int t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: lwarx %0,0,%1 # atomic_dec_return\n\ + addic %0,%0,-1\n" + PPC405_ERR77(0,%1) +" stwcx. %0,0,%1\n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) +#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) + +/** + * atomic_add_unless - add unless the number is a given value + * @v: pointer of type atomic_t + * @a: the amount to add to v... + * @u: ...unless v is equal to u. + * + * Atomically adds @a to @v, so long as it was not @u. + * Returns non-zero if @v was not @u, and zero otherwise. + */ +static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) +{ + int t; + + __asm__ __volatile__ ( + LWSYNC_ON_SMP +"1: lwarx %0,0,%1 # atomic_add_unless\n\ + cmpw 0,%0,%3 \n\ + beq- 2f \n\ + add %0,%2,%0 \n" + PPC405_ERR77(0,%2) +" stwcx. %0,0,%1 \n\ + bne- 1b \n" + ISYNC_ON_SMP +" subf %0,%2,%0 \n\ +2:" + : "=&r" (t) + : "r" (&v->counter), "r" (a), "r" (u) + : "cc", "memory"); + + return t != u; +} + +#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) + +#define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) +#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0) + +/* + * Atomically test *v and decrement if it is greater than 0. + * The function returns the old value of *v minus 1, even if + * the atomic variable, v, was not decremented. + */ +static __inline__ int atomic_dec_if_positive(atomic_t *v) +{ + int t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ + cmpwi %0,1\n\ + addi %0,%0,-1\n\ + blt- 2f\n" + PPC405_ERR77(0,%1) +" stwcx. %0,0,%1\n\ + bne- 1b" + ISYNC_ON_SMP + "\n\ +2:" : "=&b" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define smp_mb__before_atomic_dec() smp_mb() +#define smp_mb__after_atomic_dec() smp_mb() +#define smp_mb__before_atomic_inc() smp_mb() +#define smp_mb__after_atomic_inc() smp_mb() + +#ifdef __powerpc64__ + +typedef struct { long counter; } atomic64_t; + +#define ATOMIC64_INIT(i) { (i) } + +static __inline__ long atomic64_read(const atomic64_t *v) +{ + long t; + + __asm__ __volatile__("ld%U1%X1 %0,%1" : "=r"(t) : "m"(v->counter)); + + return t; +} + +static __inline__ void atomic64_set(atomic64_t *v, long i) +{ + __asm__ __volatile__("std%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i)); +} + +static __inline__ void atomic64_add(long a, atomic64_t *v) +{ + long t; + + __asm__ __volatile__( +"1: ldarx %0,0,%3 # atomic64_add\n\ + add %0,%2,%0\n\ + stdcx. %0,0,%3 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (a), "r" (&v->counter) + : "cc"); +} + +static __inline__ long atomic64_add_return(long a, atomic64_t *v) +{ + long t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: ldarx %0,0,%2 # atomic64_add_return\n\ + add %0,%1,%0\n\ + stdcx. %0,0,%2 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (a), "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) + +static __inline__ void atomic64_sub(long a, atomic64_t *v) +{ + long t; + + __asm__ __volatile__( +"1: ldarx %0,0,%3 # atomic64_sub\n\ + subf %0,%2,%0\n\ + stdcx. %0,0,%3 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (a), "r" (&v->counter) + : "cc"); +} + +static __inline__ long atomic64_sub_return(long a, atomic64_t *v) +{ + long t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: ldarx %0,0,%2 # atomic64_sub_return\n\ + subf %0,%1,%0\n\ + stdcx. %0,0,%2 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (a), "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +static __inline__ void atomic64_inc(atomic64_t *v) +{ + long t; + + __asm__ __volatile__( +"1: ldarx %0,0,%2 # atomic64_inc\n\ + addic %0,%0,1\n\ + stdcx. %0,0,%2 \n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (&v->counter) + : "cc"); +} + +static __inline__ long atomic64_inc_return(atomic64_t *v) +{ + long t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: ldarx %0,0,%1 # atomic64_inc_return\n\ + addic %0,%0,1\n\ + stdcx. %0,0,%1 \n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +/* + * atomic64_inc_and_test - increment and test + * @v: pointer of type atomic64_t + * + * Atomically increments @v by 1 + * and returns true if the result is zero, or false for all + * other cases. + */ +#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) + +static __inline__ void atomic64_dec(atomic64_t *v) +{ + long t; + + __asm__ __volatile__( +"1: ldarx %0,0,%2 # atomic64_dec\n\ + addic %0,%0,-1\n\ + stdcx. %0,0,%2\n\ + bne- 1b" + : "=&r" (t), "+m" (v->counter) + : "r" (&v->counter) + : "cc"); +} + +static __inline__ long atomic64_dec_return(atomic64_t *v) +{ + long t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: ldarx %0,0,%1 # atomic64_dec_return\n\ + addic %0,%0,-1\n\ + stdcx. %0,0,%1\n\ + bne- 1b" + ISYNC_ON_SMP + : "=&r" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define atomic64_sub_and_test(a, v) (atomic64_sub_return((a), (v)) == 0) +#define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0) + +/* + * Atomically test *v and decrement if it is greater than 0. + * The function returns the old value of *v minus 1. + */ +static __inline__ long atomic64_dec_if_positive(atomic64_t *v) +{ + long t; + + __asm__ __volatile__( + LWSYNC_ON_SMP +"1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ + addic. %0,%0,-1\n\ + blt- 2f\n\ + stdcx. %0,0,%1\n\ + bne- 1b" + ISYNC_ON_SMP + "\n\ +2:" : "=&r" (t) + : "r" (&v->counter) + : "cc", "memory"); + + return t; +} + +#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) +#define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) + +/** + * atomic64_add_unless - add unless the number is a given value + * @v: pointer of type atomic64_t + * @a: the amount to add to v... + * @u: ...unless v is equal to u. + * + * Atomically adds @a to @v, so long as it was not @u. + * Returns non-zero if @v was not @u, and zero otherwise. + */ +static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) +{ + long t; + + __asm__ __volatile__ ( + LWSYNC_ON_SMP +"1: ldarx %0,0,%1 # atomic_add_unless\n\ + cmpd 0,%0,%3 \n\ + beq- 2f \n\ + add %0,%2,%0 \n" +" stdcx. %0,0,%1 \n\ + bne- 1b \n" + ISYNC_ON_SMP +" subf %0,%2,%0 \n\ +2:" + : "=&r" (t) + : "r" (&v->counter), "r" (a), "r" (u) + : "cc", "memory"); + + return t != u; +} + +#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) + +#endif /* __powerpc64__ */ + +#include +#endif /* __KERNEL__ */ +#endif /* _ASM_POWERPC_ATOMIC_H_ */ diff --git a/arch/powerpc/include/asm/auxvec.h b/arch/powerpc/include/asm/auxvec.h new file mode 100644 index 000000000000..19a099b62cd6 --- /dev/null +++ b/arch/powerpc/include/asm/auxvec.h @@ -0,0 +1,19 @@ +#ifndef _ASM_POWERPC_AUXVEC_H +#define _ASM_POWERPC_AUXVEC_H + +/* + * We need to put in some extra aux table entries to tell glibc what + * the cache block size is, so it can use the dcbz instruction safely. + */ +#define AT_DCACHEBSIZE 19 +#define AT_ICACHEBSIZE 20 +#define AT_UCACHEBSIZE 21 +/* A special ignored type value for PPC, for glibc compatibility. */ +#define AT_IGNOREPPC 22 + +/* The vDSO location. We have to use the same value as x86 for glibc's + * sake :-) + */ +#define AT_SYSINFO_EHDR 33 + +#endif diff --git a/arch/powerpc/include/asm/backlight.h b/arch/powerpc/include/asm/backlight.h new file mode 100644 index 000000000000..8cf5c37c3817 --- /dev/null +++ b/arch/powerpc/include/asm/backlight.h @@ -0,0 +1,41 @@ +/* + * Routines for handling backlight control on PowerBooks + * + * For now, implementation resides in + * arch/powerpc/platforms/powermac/backlight.c + * + */ +#ifndef __ASM_POWERPC_BACKLIGHT_H +#define __ASM_POWERPC_BACKLIGHT_H +#ifdef __KERNEL__ + +#include +#include + +/* For locking instructions, see the implementation file */ +extern struct backlight_device *pmac_backlight; +extern struct mutex pmac_backlight_mutex; + +extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); + +extern int pmac_has_backlight_type(const char *type); + +extern void pmac_backlight_key(int direction); +static inline void pmac_backlight_key_up(void) +{ + pmac_backlight_key(0); +} +s